Deprecate IActionBlocker in favour of cancellable events (#4193)
* Deprecate IActionBlocker in favour of cancellable events * Bring back old speech/emoting component restrictions * Rename action blocker listener methods * Use Entity System public methods instead of extension methods Co-authored-by: Vera Aguilera Puerto <gradientvera@outlook.com>
This commit is contained in:
@@ -4,6 +4,7 @@ using Content.Shared.ActionBlocker;
|
||||
using Content.Shared.Actions;
|
||||
using Content.Shared.Actions.Components;
|
||||
using Content.Shared.Actions.Prototypes;
|
||||
using Content.Shared.Interaction.Events;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Server.GameStates;
|
||||
using Robust.Shared.GameObjects;
|
||||
@@ -186,7 +187,7 @@ namespace Content.Server.Actions
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!ActionBlockerSystem.CanChangeDirection(player)) return true;
|
||||
if (!EntitySystem.Get<ActionBlockerSystem>().CanChangeDirection(player)) return true;
|
||||
|
||||
// don't set facing unless they clicked far enough away
|
||||
var diff = targetWorldPos - player.Transform.WorldPosition;
|
||||
|
||||
Reference in New Issue
Block a user