ActionBlocker CanUse uses EntityUid exclusively
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user