ActionBlocker CanInteract uses EntityUid exclusively

ActionBlockerSystem fully uses EntityUid now!
This commit is contained in:
Vera Aguilera Puerto
2021-11-09 14:54:00 +01:00
parent b6337ffe7a
commit 48f8dd2284
44 changed files with 66 additions and 75 deletions

View File

@@ -319,7 +319,7 @@ namespace Content.Server.Instruments
if ((!Handheld && InstrumentPlayer != null)
|| (Handheld && actor.PlayerSession != InstrumentPlayer)
|| !EntitySystem.Get<ActionBlockerSystem>().CanInteract(user)) return;
|| !EntitySystem.Get<ActionBlockerSystem>().CanInteract(user.Uid)) return;
InstrumentPlayer = actor.PlayerSession;
OpenUserInterface(InstrumentPlayer);
@@ -351,8 +351,8 @@ namespace Content.Server.Instruments
var maxMidiBatchDropped = _instrumentSystem.MaxMidiBatchesDropped;
if (_instrumentPlayer != null
&& (_instrumentPlayer.AttachedEntity == null
|| !EntitySystem.Get<ActionBlockerSystem>().CanInteract(_instrumentPlayer.AttachedEntity)))
&& (_instrumentPlayer.AttachedEntityUid == null
|| !EntitySystem.Get<ActionBlockerSystem>().CanInteract(_instrumentPlayer.AttachedEntityUid.Value)))
{
InstrumentPlayer = null;
Clean();