ActionBlocker CanUse uses EntityUid exclusively

This commit is contained in:
Vera Aguilera Puerto
2021-11-09 13:19:56 +01:00
parent 5f9cfaac43
commit c051b1e056
16 changed files with 23 additions and 29 deletions

View File

@@ -105,7 +105,7 @@ namespace Content.Server.Light.Components
/// <returns>True if the light's status was toggled, false otherwise.</returns>
public bool ToggleStatus(IEntity user)
{
if (!EntitySystem.Get<ActionBlockerSystem>().CanUse(user)) return false;
if (!EntitySystem.Get<ActionBlockerSystem>().CanUse(user.Uid)) return false;
return Activated ? TurnOff() : TurnOn(user);
}

View File

@@ -44,7 +44,7 @@ namespace Content.Server.Light.EntitySystems
return;
// standard interaction checks
if (!_blocker.CanUse(eventArgs.User)) return;
if (!_blocker.CanUse(eventArgs.User.Uid)) return;
if (!eventArgs.CanReach) return;
// behaviour will depends on target type