Goes in-game now

This commit is contained in:
Vera Aguilera Puerto
2021-12-06 15:34:46 +01:00
parent af4eb3c7cd
commit c57b07a4d0
43 changed files with 129 additions and 130 deletions

View File

@@ -104,7 +104,7 @@ namespace Content.Server.Disposal.Tube.Components
private bool PlayerCanUseDisposalTagger(IPlayerSession session)
{
//Need player entity to check if they are still able to use the configuration interface
if (session.AttachedEntity == null)
if (session.AttachedEntity is not {} attached)
return false;
if (!Anchored)
return false;
@@ -112,7 +112,7 @@ namespace Content.Server.Disposal.Tube.Components
var actionBlocker = EntitySystem.Get<ActionBlockerSystem>();
var groupController = IoCManager.Resolve<IConGroupController>();
//Check if player can interact in their current state
if (!groupController.CanAdminMenu(session) && (!actionBlocker.CanInteract(session.AttachedEntity) || !actionBlocker.CanUse(session.AttachedEntity)))
if (!groupController.CanAdminMenu(session) && (!actionBlocker.CanInteract(attached) || !actionBlocker.CanUse(attached)))
return false;
return true;