From fcd52fa90c587e74c53b0217ac467c71fa6d2e83 Mon Sep 17 00:00:00 2001 From: DrSmugleaf Date: Sun, 20 Dec 2020 04:26:21 +0100 Subject: [PATCH] Add ActionBlockerExtensions --- .../Tests/Buckle/BuckleTest.cs | 1 + .../ActionBlocker/CanMoveCon.cs | 1 + Content.Server/Actions/ScreamAction.cs | 1 + Content.Server/Chat/ChatManager.cs | 1 + .../Access/IdCardConsoleComponent.cs | 1 + .../ActionBlocking/CuffableComponent.cs | 1 + .../ActionBlocking/HandcuffComponent.cs | 1 + .../Arcade/BlockGameArcadeComponent.cs | 1 + .../Arcade/SpaceVillainArcadeComponent.cs | 1 + .../Components/Atmos/FlammableComponent.cs | 1 + .../Components/Atmos/GasCanisterComponent.cs | 1 + .../Components/Atmos/GasTankComponent.cs | 1 + .../Components/Botany/LogComponent.cs | 1 + .../Components/Botany/PlantHolderComponent.cs | 1 + .../Components/Buckle/BuckleComponent.cs | 1 + .../Chemistry/ChemMasterComponent.cs | 1 + .../Chemistry/ReagentDispenserComponent.cs | 1 + .../Chemistry/SolutionContainerComponent.cs | 1 + .../ConstructionComponent.Verbs.cs | 1 + .../Disposal/DisposalMailingUnitComponent.cs | 1 + .../Disposal/DisposalRouterComponent.cs | 1 + .../Disposal/DisposalTaggerComponent.cs | 1 + .../Disposal/DisposalUnitComponent.cs | 1 + .../Components/Fluids/SpillableComponent.cs | 1 + .../Components/Fluids/SprayComponent.cs | 1 + .../Components/GUI/HandsComponent.cs | 1 + .../Components/GUI/InventoryComponent.cs | 1 + .../Components/GUI/StrippableComponent.cs | 1 + .../Instruments/InstrumentComponent.cs | 1 + .../Interactable/ExpendableLightComponent.cs | 1 + .../Interactable/HandheldLightComponent.cs | 1 + .../Components/Interactable/ToolComponent.cs | 1 + .../Items/Storage/EntityStorageComponent.cs | 1 + .../Components/Items/Storage/ItemComponent.cs | 1 + .../Storage/SecureEntityStorageComponent.cs | 1 + .../MachineLinking/SignalSwitchComponent.cs | 1 + .../Components/Medical/HealingComponent.cs | 1 + .../Medical/MedicalScannerComponent.cs | 1 + .../Metabolism/MetabolismComponent.cs | 1 + .../Components/Mobs/ServerActionsComponent.cs | 1 + .../Morgue/BodyBagEntityStorageComponent.cs | 1 + .../CrematoriumEntityStorageComponent.cs | 1 + .../Components/Movement/ClimbableComponent.cs | 1 + .../ParticleAcceleratorControlBoxComponent.cs | 1 + .../Components/PDA/PDAComponent.cs | 1 + .../Power/AME/AMEControllerComponent.cs | 1 + .../PowerReceiverUsers/BaseCharger.cs | 1 + .../Power/PowerCellSlotComponent.cs | 1 + .../Rotatable/FlippableComponent.cs | 1 + .../Rotatable/RotatableComponent.cs | 1 + .../Components/Strap/StrapComponent.cs | 1 + .../Weapon/Melee/StunbatonComponent.cs | 1 + .../Ranged/Ammunition/AmmoBoxComponent.cs | 1 + .../Barrels/BoltActionBarrelComponent.cs | 1 + .../Ranged/Barrels/RevolverBarrelComponent.cs | 1 + .../Barrels/ServerBatteryBarrelComponent.cs | 1 + .../Barrels/ServerMagazineBarrelComponent.cs | 1 + .../Ranged/ServerRangedWeaponComponent.cs | 1 + .../AI/Steering/AiSteeringSystem.cs | 1 + .../EntitySystems/Click/InteractionSystem.cs | 1 + .../EntitySystems/ConstructionSystem.cs | 1 + .../EntitySystems/PointingSystem.cs | 1 + .../Components/Items/IHandsComponent.cs | 1 + Content.Server/Throw/ThrowHelper.cs | 1 + .../ActionBlocking/SharedCuffableComponent.cs | 1 + .../Buckle/SharedBuckleComponent.cs | 1 + .../GUI/SharedStrippableComponent.cs | 1 + .../Mobs/SharedStunnableComponent.cs | 1 + .../Components/Mobs/State/IMobState.cs | 1 + .../Mobs/State/SharedMobStateComponent.cs | 1 + .../Movement/SharedClimbingComponent.cs | 1 + .../Observer/SharedGhostComponent.cs | 1 + .../Storage/SharedStorageComponent.cs | 1 + .../ActionBlocker/ActionBlockerExtensions.cs | 77 +++++++ .../ActionBlocker/ActionBlockerSystem.cs | 178 ++++++++++++++++ .../ActionBlocker/IActionBlocker.cs | 37 ++++ .../EntitySystems/ActionBlockerSystem.cs | 195 ------------------ .../EntitySystems/EffectBlockerSystem.cs | 3 +- .../EntitySystems/SharedMoverSystem.cs | 1 + .../Physics/ThrowKnockbackController.cs | 1 + 80 files changed, 369 insertions(+), 196 deletions(-) create mode 100644 Content.Shared/GameObjects/EntitySystems/ActionBlocker/ActionBlockerExtensions.cs create mode 100644 Content.Shared/GameObjects/EntitySystems/ActionBlocker/ActionBlockerSystem.cs create mode 100644 Content.Shared/GameObjects/EntitySystems/ActionBlocker/IActionBlocker.cs delete mode 100644 Content.Shared/GameObjects/EntitySystems/ActionBlockerSystem.cs diff --git a/Content.IntegrationTests/Tests/Buckle/BuckleTest.cs b/Content.IntegrationTests/Tests/Buckle/BuckleTest.cs index 394dd11e7c..b6918abae8 100644 --- a/Content.IntegrationTests/Tests/Buckle/BuckleTest.cs +++ b/Content.IntegrationTests/Tests/Buckle/BuckleTest.cs @@ -7,6 +7,7 @@ using Content.Shared.GameObjects.Components.Body; using Content.Shared.GameObjects.Components.Body.Part; using Content.Shared.GameObjects.Components.Buckle; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.Utility; using NUnit.Framework; using Robust.Shared.Interfaces.GameObjects; diff --git a/Content.Server/AI/Utility/Considerations/ActionBlocker/CanMoveCon.cs b/Content.Server/AI/Utility/Considerations/ActionBlocker/CanMoveCon.cs index c45230589b..b53c0d0190 100644 --- a/Content.Server/AI/Utility/Considerations/ActionBlocker/CanMoveCon.cs +++ b/Content.Server/AI/Utility/Considerations/ActionBlocker/CanMoveCon.cs @@ -1,6 +1,7 @@ using Content.Server.AI.WorldState; using Content.Server.AI.WorldState.States; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; namespace Content.Server.AI.Utility.Considerations.ActionBlocker { diff --git a/Content.Server/Actions/ScreamAction.cs b/Content.Server/Actions/ScreamAction.cs index e89d2452e7..58a8acc480 100644 --- a/Content.Server/Actions/ScreamAction.cs +++ b/Content.Server/Actions/ScreamAction.cs @@ -5,6 +5,7 @@ using Content.Shared.Actions; using Content.Shared.Audio; using Content.Shared.GameObjects.Components.Mobs; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.Preferences; using Content.Shared.Utility; using JetBrains.Annotations; diff --git a/Content.Server/Chat/ChatManager.cs b/Content.Server/Chat/ChatManager.cs index afeb0c11b2..7e291f5cef 100644 --- a/Content.Server/Chat/ChatManager.cs +++ b/Content.Server/Chat/ChatManager.cs @@ -11,6 +11,7 @@ using Content.Server.Interfaces.Chat; using Content.Shared.Chat; using Content.Shared.GameObjects.Components.Inventory; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.Interfaces; using Robust.Server.Interfaces.GameObjects; using Robust.Server.Interfaces.Player; diff --git a/Content.Server/GameObjects/Components/Access/IdCardConsoleComponent.cs b/Content.Server/GameObjects/Components/Access/IdCardConsoleComponent.cs index 3457142e88..c611bd2957 100644 --- a/Content.Server/GameObjects/Components/Access/IdCardConsoleComponent.cs +++ b/Content.Server/GameObjects/Components/Access/IdCardConsoleComponent.cs @@ -11,6 +11,7 @@ using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; using Content.Shared.GameObjects.Verbs; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Robust.Server.GameObjects.Components.Container; using Robust.Server.GameObjects.Components.UserInterface; using Robust.Server.Interfaces.GameObjects; diff --git a/Content.Server/GameObjects/Components/ActionBlocking/CuffableComponent.cs b/Content.Server/GameObjects/Components/ActionBlocking/CuffableComponent.cs index b9613c4391..e82dada792 100644 --- a/Content.Server/GameObjects/Components/ActionBlocking/CuffableComponent.cs +++ b/Content.Server/GameObjects/Components/ActionBlocking/CuffableComponent.cs @@ -10,6 +10,7 @@ using Content.Shared.Alert; using Content.Shared.GameObjects.Components.ActionBlocking; using Content.Shared.GameObjects.Components.Mobs; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.GameObjects.Verbs; using Content.Shared.Interfaces; using Content.Shared.Utility; diff --git a/Content.Server/GameObjects/Components/ActionBlocking/HandcuffComponent.cs b/Content.Server/GameObjects/Components/ActionBlocking/HandcuffComponent.cs index 8fb013e5ea..18f4892d11 100644 --- a/Content.Server/GameObjects/Components/ActionBlocking/HandcuffComponent.cs +++ b/Content.Server/GameObjects/Components/ActionBlocking/HandcuffComponent.cs @@ -5,6 +5,7 @@ using Content.Server.GameObjects.Components.Mobs; using Content.Server.GameObjects.EntitySystems.DoAfter; using Content.Shared.GameObjects.Components.ActionBlocking; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; using Content.Shared.Utility; diff --git a/Content.Server/GameObjects/Components/Arcade/BlockGameArcadeComponent.cs b/Content.Server/GameObjects/Components/Arcade/BlockGameArcadeComponent.cs index c3e6c0bf36..8045d71ffb 100644 --- a/Content.Server/GameObjects/Components/Arcade/BlockGameArcadeComponent.cs +++ b/Content.Server/GameObjects/Components/Arcade/BlockGameArcadeComponent.cs @@ -8,6 +8,7 @@ using Content.Server.Utility; using Content.Shared.Arcade; using Content.Shared.GameObjects; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.Interfaces.GameObjects.Components; using Robust.Server.GameObjects.Components.UserInterface; using Robust.Server.Interfaces.GameObjects; diff --git a/Content.Server/GameObjects/Components/Arcade/SpaceVillainArcadeComponent.cs b/Content.Server/GameObjects/Components/Arcade/SpaceVillainArcadeComponent.cs index 285ad7c4c3..99c46516e8 100644 --- a/Content.Server/GameObjects/Components/Arcade/SpaceVillainArcadeComponent.cs +++ b/Content.Server/GameObjects/Components/Arcade/SpaceVillainArcadeComponent.cs @@ -6,6 +6,7 @@ using Content.Server.Utility; using Content.Shared.GameObjects.Components; using Content.Shared.GameObjects.Components.Arcade; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.Interfaces.GameObjects.Components; using Robust.Server.GameObjects.Components.UserInterface; using Robust.Server.GameObjects.EntitySystems; diff --git a/Content.Server/GameObjects/Components/Atmos/FlammableComponent.cs b/Content.Server/GameObjects/Components/Atmos/FlammableComponent.cs index 17c40e111b..c3b6f7bbb1 100644 --- a/Content.Server/GameObjects/Components/Atmos/FlammableComponent.cs +++ b/Content.Server/GameObjects/Components/Atmos/FlammableComponent.cs @@ -12,6 +12,7 @@ using Content.Shared.GameObjects.Components.Atmos; using Content.Shared.GameObjects.Components.Damage; using Content.Shared.GameObjects.Components.Mobs; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; using Robust.Server.GameObjects; diff --git a/Content.Server/GameObjects/Components/Atmos/GasCanisterComponent.cs b/Content.Server/GameObjects/Components/Atmos/GasCanisterComponent.cs index 3ad88356e0..348ba46956 100644 --- a/Content.Server/GameObjects/Components/Atmos/GasCanisterComponent.cs +++ b/Content.Server/GameObjects/Components/Atmos/GasCanisterComponent.cs @@ -17,6 +17,7 @@ using Content.Shared.GameObjects.EntitySystems; using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; using Content.Shared.Atmos; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Robust.Server.GameObjects; using Robust.Server.GameObjects.Components.UserInterface; using Robust.Server.Interfaces.GameObjects; diff --git a/Content.Server/GameObjects/Components/Atmos/GasTankComponent.cs b/Content.Server/GameObjects/Components/Atmos/GasTankComponent.cs index 5dd0bcb40d..0956c66645 100644 --- a/Content.Server/GameObjects/Components/Atmos/GasTankComponent.cs +++ b/Content.Server/GameObjects/Components/Atmos/GasTankComponent.cs @@ -11,6 +11,7 @@ using Content.Shared.Audio; using Content.Shared.GameObjects.Components.Atmos.GasTank; using Content.Shared.GameObjects.Components.Mobs; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.GameObjects.Verbs; using Content.Shared.Interfaces.GameObjects.Components; using JetBrains.Annotations; diff --git a/Content.Server/GameObjects/Components/Botany/LogComponent.cs b/Content.Server/GameObjects/Components/Botany/LogComponent.cs index 3bebc0a902..753d887fa5 100644 --- a/Content.Server/GameObjects/Components/Botany/LogComponent.cs +++ b/Content.Server/GameObjects/Components/Botany/LogComponent.cs @@ -1,5 +1,6 @@ using System.Threading.Tasks; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.Interfaces.GameObjects.Components; using Content.Shared.Utility; using Robust.Shared.GameObjects; diff --git a/Content.Server/GameObjects/Components/Botany/PlantHolderComponent.cs b/Content.Server/GameObjects/Components/Botany/PlantHolderComponent.cs index e1a520a351..6d481b80ed 100644 --- a/Content.Server/GameObjects/Components/Botany/PlantHolderComponent.cs +++ b/Content.Server/GameObjects/Components/Botany/PlantHolderComponent.cs @@ -13,6 +13,7 @@ using Content.Shared.Audio; using Content.Shared.Chemistry; using Content.Shared.GameObjects.Components.Botany; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; using Content.Shared.Utility; diff --git a/Content.Server/GameObjects/Components/Buckle/BuckleComponent.cs b/Content.Server/GameObjects/Components/Buckle/BuckleComponent.cs index df9725041a..f6f4c640f5 100644 --- a/Content.Server/GameObjects/Components/Buckle/BuckleComponent.cs +++ b/Content.Server/GameObjects/Components/Buckle/BuckleComponent.cs @@ -11,6 +11,7 @@ using Content.Shared.Alert; using Content.Shared.GameObjects.Components.Buckle; using Content.Shared.GameObjects.Components.Strap; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.GameObjects.Verbs; using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; diff --git a/Content.Server/GameObjects/Components/Chemistry/ChemMasterComponent.cs b/Content.Server/GameObjects/Components/Chemistry/ChemMasterComponent.cs index 8a80d98b7a..293b4fa0da 100644 --- a/Content.Server/GameObjects/Components/Chemistry/ChemMasterComponent.cs +++ b/Content.Server/GameObjects/Components/Chemistry/ChemMasterComponent.cs @@ -12,6 +12,7 @@ using Content.Server.Utility; using Content.Shared.Chemistry; using Content.Shared.GameObjects.Components.Chemistry.ChemMaster; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; using Content.Shared.Utility; diff --git a/Content.Server/GameObjects/Components/Chemistry/ReagentDispenserComponent.cs b/Content.Server/GameObjects/Components/Chemistry/ReagentDispenserComponent.cs index 8546b0bb41..e27612606c 100644 --- a/Content.Server/GameObjects/Components/Chemistry/ReagentDispenserComponent.cs +++ b/Content.Server/GameObjects/Components/Chemistry/ReagentDispenserComponent.cs @@ -11,6 +11,7 @@ using Content.Server.Utility; using Content.Shared.Chemistry; using Content.Shared.GameObjects.Components.Chemistry.ReagentDispenser; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; using Content.Shared.GameObjects.Verbs; diff --git a/Content.Server/GameObjects/Components/Chemistry/SolutionContainerComponent.cs b/Content.Server/GameObjects/Components/Chemistry/SolutionContainerComponent.cs index afc7899304..d2d72ac1fd 100644 --- a/Content.Server/GameObjects/Components/Chemistry/SolutionContainerComponent.cs +++ b/Content.Server/GameObjects/Components/Chemistry/SolutionContainerComponent.cs @@ -6,6 +6,7 @@ using Content.Server.GameObjects.EntitySystems; using Content.Shared.Chemistry; using Content.Shared.GameObjects.Components.Chemistry; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.GameObjects.Verbs; using Content.Shared.Utility; using Robust.Server.GameObjects; diff --git a/Content.Server/GameObjects/Components/Construction/ConstructionComponent.Verbs.cs b/Content.Server/GameObjects/Components/Construction/ConstructionComponent.Verbs.cs index 61e517f101..04a1d0c739 100644 --- a/Content.Server/GameObjects/Components/Construction/ConstructionComponent.Verbs.cs +++ b/Content.Server/GameObjects/Components/Construction/ConstructionComponent.Verbs.cs @@ -1,4 +1,5 @@ using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.GameObjects.Verbs; using Content.Shared.Interfaces; using Robust.Shared.GameObjects; diff --git a/Content.Server/GameObjects/Components/Disposal/DisposalMailingUnitComponent.cs b/Content.Server/GameObjects/Components/Disposal/DisposalMailingUnitComponent.cs index f358fc1d5d..83069957b0 100644 --- a/Content.Server/GameObjects/Components/Disposal/DisposalMailingUnitComponent.cs +++ b/Content.Server/GameObjects/Components/Disposal/DisposalMailingUnitComponent.cs @@ -17,6 +17,7 @@ using Content.Shared.GameObjects.Components; using Content.Shared.GameObjects.Components.Body; using Content.Shared.GameObjects.Components.Disposal; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.GameObjects.Verbs; using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; diff --git a/Content.Server/GameObjects/Components/Disposal/DisposalRouterComponent.cs b/Content.Server/GameObjects/Components/Disposal/DisposalRouterComponent.cs index 6e62479d38..5a72ff74e4 100644 --- a/Content.Server/GameObjects/Components/Disposal/DisposalRouterComponent.cs +++ b/Content.Server/GameObjects/Components/Disposal/DisposalRouterComponent.cs @@ -6,6 +6,7 @@ using Content.Server.GameObjects.Components.Mobs; using Content.Server.Interfaces.GameObjects.Components.Items; using Content.Server.Utility; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.GameObjects.Verbs; using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; diff --git a/Content.Server/GameObjects/Components/Disposal/DisposalTaggerComponent.cs b/Content.Server/GameObjects/Components/Disposal/DisposalTaggerComponent.cs index e3bc82e674..41d90e1664 100644 --- a/Content.Server/GameObjects/Components/Disposal/DisposalTaggerComponent.cs +++ b/Content.Server/GameObjects/Components/Disposal/DisposalTaggerComponent.cs @@ -21,6 +21,7 @@ using Robust.Shared.Localization; using Robust.Shared.Maths; using Robust.Shared.ViewVariables; using System; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using static Content.Shared.GameObjects.Components.Disposal.SharedDisposalTaggerComponent; namespace Content.Server.GameObjects.Components.Disposal diff --git a/Content.Server/GameObjects/Components/Disposal/DisposalUnitComponent.cs b/Content.Server/GameObjects/Components/Disposal/DisposalUnitComponent.cs index 31a1ac6a86..f366eebe37 100644 --- a/Content.Server/GameObjects/Components/Disposal/DisposalUnitComponent.cs +++ b/Content.Server/GameObjects/Components/Disposal/DisposalUnitComponent.cs @@ -20,6 +20,7 @@ using Content.Shared.GameObjects.Components.Disposal; using Content.Shared.GameObjects.Components.Items; using Content.Shared.GameObjects.Components.Mobs.State; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.GameObjects.Verbs; using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; diff --git a/Content.Server/GameObjects/Components/Fluids/SpillableComponent.cs b/Content.Server/GameObjects/Components/Fluids/SpillableComponent.cs index c6528086de..62b2a5ec6c 100644 --- a/Content.Server/GameObjects/Components/Fluids/SpillableComponent.cs +++ b/Content.Server/GameObjects/Components/Fluids/SpillableComponent.cs @@ -1,6 +1,7 @@ using Content.Server.GameObjects.Components.Chemistry; using Content.Shared.Chemistry; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.GameObjects.Verbs; using Content.Shared.Interfaces; using Robust.Shared.GameObjects; diff --git a/Content.Server/GameObjects/Components/Fluids/SprayComponent.cs b/Content.Server/GameObjects/Components/Fluids/SprayComponent.cs index 5d0c4ef416..71f09c780e 100644 --- a/Content.Server/GameObjects/Components/Fluids/SprayComponent.cs +++ b/Content.Server/GameObjects/Components/Fluids/SprayComponent.cs @@ -7,6 +7,7 @@ using Content.Shared.GameObjects.Components; using Content.Shared.GameObjects.Components.Fluids; using Content.Shared.GameObjects.Components.Items; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; using Robust.Server.GameObjects; diff --git a/Content.Server/GameObjects/Components/GUI/HandsComponent.cs b/Content.Server/GameObjects/Components/GUI/HandsComponent.cs index 5181d442fe..9d1aa7cef9 100644 --- a/Content.Server/GameObjects/Components/GUI/HandsComponent.cs +++ b/Content.Server/GameObjects/Components/GUI/HandsComponent.cs @@ -9,6 +9,7 @@ using Content.Server.Interfaces.GameObjects.Components.Items; using Content.Shared.GameObjects.Components.Body.Part; using Content.Shared.GameObjects.Components.Items; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.Physics.Pull; using Robust.Server.GameObjects; using Robust.Server.GameObjects.Components.Container; diff --git a/Content.Server/GameObjects/Components/GUI/InventoryComponent.cs b/Content.Server/GameObjects/Components/GUI/InventoryComponent.cs index 33152537ec..593fdf7e80 100644 --- a/Content.Server/GameObjects/Components/GUI/InventoryComponent.cs +++ b/Content.Server/GameObjects/Components/GUI/InventoryComponent.cs @@ -7,6 +7,7 @@ using Content.Server.GameObjects.EntitySystems.Click; using Content.Server.Interfaces.GameObjects; using Content.Shared.GameObjects.Components.Inventory; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.Interfaces; using Robust.Server.GameObjects.Components.Container; using Robust.Shared.Containers; diff --git a/Content.Server/GameObjects/Components/GUI/StrippableComponent.cs b/Content.Server/GameObjects/Components/GUI/StrippableComponent.cs index ff755d3cdd..6abb62df94 100644 --- a/Content.Server/GameObjects/Components/GUI/StrippableComponent.cs +++ b/Content.Server/GameObjects/Components/GUI/StrippableComponent.cs @@ -7,6 +7,7 @@ using Content.Server.GameObjects.EntitySystems.DoAfter; using Content.Server.Utility; using Content.Shared.GameObjects.Components.GUI; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.GameObjects.Verbs; using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; diff --git a/Content.Server/GameObjects/Components/Instruments/InstrumentComponent.cs b/Content.Server/GameObjects/Components/Instruments/InstrumentComponent.cs index 289ebcce79..233874b533 100644 --- a/Content.Server/GameObjects/Components/Instruments/InstrumentComponent.cs +++ b/Content.Server/GameObjects/Components/Instruments/InstrumentComponent.cs @@ -7,6 +7,7 @@ using Content.Server.Utility; using Content.Shared; using Content.Shared.GameObjects.Components.Instruments; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; using Robust.Server.GameObjects; diff --git a/Content.Server/GameObjects/Components/Interactable/ExpendableLightComponent.cs b/Content.Server/GameObjects/Components/Interactable/ExpendableLightComponent.cs index 2958f649ff..7529820fb4 100644 --- a/Content.Server/GameObjects/Components/Interactable/ExpendableLightComponent.cs +++ b/Content.Server/GameObjects/Components/Interactable/ExpendableLightComponent.cs @@ -4,6 +4,7 @@ using Content.Server.GameObjects.Components.Items.Storage; using Content.Server.GameObjects.Components.Sound; using Content.Shared.GameObjects.Components; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.GameObjects.Verbs; using Content.Shared.Interfaces.GameObjects.Components; using Robust.Server.GameObjects; diff --git a/Content.Server/GameObjects/Components/Interactable/HandheldLightComponent.cs b/Content.Server/GameObjects/Components/Interactable/HandheldLightComponent.cs index 958ec9768f..430d0e785d 100644 --- a/Content.Server/GameObjects/Components/Interactable/HandheldLightComponent.cs +++ b/Content.Server/GameObjects/Components/Interactable/HandheldLightComponent.cs @@ -11,6 +11,7 @@ using Content.Server.GameObjects.Components.Weapon.Ranged.Barrels; using Content.Shared.GameObjects.Components; using Content.Shared.GameObjects.Components.Mobs; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.GameObjects.Verbs; using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; diff --git a/Content.Server/GameObjects/Components/Interactable/ToolComponent.cs b/Content.Server/GameObjects/Components/Interactable/ToolComponent.cs index 7bc3c0739a..19e16ae678 100644 --- a/Content.Server/GameObjects/Components/Interactable/ToolComponent.cs +++ b/Content.Server/GameObjects/Components/Interactable/ToolComponent.cs @@ -5,6 +5,7 @@ using Content.Server.GameObjects.EntitySystems.DoAfter; using Content.Shared.Audio; using Content.Shared.GameObjects.Components.Interactable; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Robust.Server.GameObjects.EntitySystems; using Robust.Shared.GameObjects; using Robust.Shared.GameObjects.Systems; diff --git a/Content.Server/GameObjects/Components/Items/Storage/EntityStorageComponent.cs b/Content.Server/GameObjects/Components/Items/Storage/EntityStorageComponent.cs index 79f360cb07..632bfd4402 100644 --- a/Content.Server/GameObjects/Components/Items/Storage/EntityStorageComponent.cs +++ b/Content.Server/GameObjects/Components/Items/Storage/EntityStorageComponent.cs @@ -9,6 +9,7 @@ using Content.Shared.GameObjects.Components.Body; using Content.Shared.GameObjects.Components.Interactable; using Content.Shared.GameObjects.Components.Storage; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.GameObjects.Verbs; using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; diff --git a/Content.Server/GameObjects/Components/Items/Storage/ItemComponent.cs b/Content.Server/GameObjects/Components/Items/Storage/ItemComponent.cs index b55870af4b..67c32b1c84 100644 --- a/Content.Server/GameObjects/Components/Items/Storage/ItemComponent.cs +++ b/Content.Server/GameObjects/Components/Items/Storage/ItemComponent.cs @@ -5,6 +5,7 @@ using Content.Shared.GameObjects; using Content.Shared.GameObjects.Components.Items; using Content.Shared.GameObjects.Components.Storage; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.GameObjects.Verbs; using Content.Shared.Interfaces.GameObjects.Components; using Content.Shared.Utility; diff --git a/Content.Server/GameObjects/Components/Items/Storage/SecureEntityStorageComponent.cs b/Content.Server/GameObjects/Components/Items/Storage/SecureEntityStorageComponent.cs index 1f7228d25a..5e4f9076fa 100644 --- a/Content.Server/GameObjects/Components/Items/Storage/SecureEntityStorageComponent.cs +++ b/Content.Server/GameObjects/Components/Items/Storage/SecureEntityStorageComponent.cs @@ -1,6 +1,7 @@ using Content.Server.GameObjects.Components.Access; using Content.Shared.GameObjects.Components.Storage; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.GameObjects.Verbs; using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; diff --git a/Content.Server/GameObjects/Components/MachineLinking/SignalSwitchComponent.cs b/Content.Server/GameObjects/Components/MachineLinking/SignalSwitchComponent.cs index a73bc74e89..9643aa242d 100644 --- a/Content.Server/GameObjects/Components/MachineLinking/SignalSwitchComponent.cs +++ b/Content.Server/GameObjects/Components/MachineLinking/SignalSwitchComponent.cs @@ -1,4 +1,5 @@ using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.GameObjects.Verbs; using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; diff --git a/Content.Server/GameObjects/Components/Medical/HealingComponent.cs b/Content.Server/GameObjects/Components/Medical/HealingComponent.cs index f717e831de..cb4684238a 100644 --- a/Content.Server/GameObjects/Components/Medical/HealingComponent.cs +++ b/Content.Server/GameObjects/Components/Medical/HealingComponent.cs @@ -4,6 +4,7 @@ using Content.Server.GameObjects.Components.Stack; using Content.Shared.Damage; using Content.Shared.GameObjects.Components.Damage; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.Interfaces.GameObjects.Components; using Content.Shared.Utility; using Robust.Shared.GameObjects; diff --git a/Content.Server/GameObjects/Components/Medical/MedicalScannerComponent.cs b/Content.Server/GameObjects/Components/Medical/MedicalScannerComponent.cs index 5b5fff76f2..8013453635 100644 --- a/Content.Server/GameObjects/Components/Medical/MedicalScannerComponent.cs +++ b/Content.Server/GameObjects/Components/Medical/MedicalScannerComponent.cs @@ -13,6 +13,7 @@ using Content.Shared.GameObjects.Components.Damage; using Content.Shared.GameObjects.Components.Medical; using Content.Shared.GameObjects.Components.Mobs.State; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.GameObjects.Verbs; using Content.Shared.Interfaces.GameObjects.Components; using Robust.Server.GameObjects; diff --git a/Content.Server/GameObjects/Components/Metabolism/MetabolismComponent.cs b/Content.Server/GameObjects/Components/Metabolism/MetabolismComponent.cs index f745d6b720..bb459bf544 100644 --- a/Content.Server/GameObjects/Components/Metabolism/MetabolismComponent.cs +++ b/Content.Server/GameObjects/Components/Metabolism/MetabolismComponent.cs @@ -14,6 +14,7 @@ using Content.Shared.GameObjects.Components.Body.Mechanism; using Content.Shared.GameObjects.Components.Damage; using Content.Shared.GameObjects.Components.Mobs.State; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.Interfaces; using Content.Shared.Interfaces.Chemistry; using Robust.Shared.GameObjects; diff --git a/Content.Server/GameObjects/Components/Mobs/ServerActionsComponent.cs b/Content.Server/GameObjects/Components/Mobs/ServerActionsComponent.cs index e5e80544b5..ffaebf02f8 100644 --- a/Content.Server/GameObjects/Components/Mobs/ServerActionsComponent.cs +++ b/Content.Server/GameObjects/Components/Mobs/ServerActionsComponent.cs @@ -3,6 +3,7 @@ using System; using Content.Shared.Actions; using Content.Shared.GameObjects.Components.Mobs; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Robust.Server.Interfaces.GameObjects; using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.GameObjects; diff --git a/Content.Server/GameObjects/Components/Morgue/BodyBagEntityStorageComponent.cs b/Content.Server/GameObjects/Components/Morgue/BodyBagEntityStorageComponent.cs index 3c8d91150b..e4731b2f7f 100644 --- a/Content.Server/GameObjects/Components/Morgue/BodyBagEntityStorageComponent.cs +++ b/Content.Server/GameObjects/Components/Morgue/BodyBagEntityStorageComponent.cs @@ -20,6 +20,7 @@ using Robust.Shared.Localization; using Robust.Shared.Utility; using Robust.Shared.ViewVariables; using System.Threading.Tasks; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; namespace Content.Server.GameObjects.Components.Morgue { diff --git a/Content.Server/GameObjects/Components/Morgue/CrematoriumEntityStorageComponent.cs b/Content.Server/GameObjects/Components/Morgue/CrematoriumEntityStorageComponent.cs index 7b9b6a311b..0ba0ddd75d 100644 --- a/Content.Server/GameObjects/Components/Morgue/CrematoriumEntityStorageComponent.cs +++ b/Content.Server/GameObjects/Components/Morgue/CrematoriumEntityStorageComponent.cs @@ -2,6 +2,7 @@ using Content.Server.GameObjects.Components.Items.Storage; using Content.Shared.GameObjects.Components.Morgue; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.GameObjects.Verbs; using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; diff --git a/Content.Server/GameObjects/Components/Movement/ClimbableComponent.cs b/Content.Server/GameObjects/Components/Movement/ClimbableComponent.cs index efdb161935..97f9d4e21d 100644 --- a/Content.Server/GameObjects/Components/Movement/ClimbableComponent.cs +++ b/Content.Server/GameObjects/Components/Movement/ClimbableComponent.cs @@ -6,6 +6,7 @@ using Content.Shared.GameObjects.Components.Body; using Content.Shared.GameObjects.Components.Body.Part; using Content.Shared.GameObjects.Components.Movement; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.GameObjects.Verbs; using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; diff --git a/Content.Server/GameObjects/Components/PA/ParticleAcceleratorControlBoxComponent.cs b/Content.Server/GameObjects/Components/PA/ParticleAcceleratorControlBoxComponent.cs index 4525a42a25..542878fc98 100644 --- a/Content.Server/GameObjects/Components/PA/ParticleAcceleratorControlBoxComponent.cs +++ b/Content.Server/GameObjects/Components/PA/ParticleAcceleratorControlBoxComponent.cs @@ -10,6 +10,7 @@ using Content.Server.GameObjects.Components.VendingMachines; using Content.Server.Utility; using Content.Shared.GameObjects.Components; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.Interfaces.GameObjects.Components; using Robust.Server.GameObjects; using Robust.Server.GameObjects.Components.UserInterface; diff --git a/Content.Server/GameObjects/Components/PDA/PDAComponent.cs b/Content.Server/GameObjects/Components/PDA/PDAComponent.cs index 0a83101a6a..c5ed36ede8 100644 --- a/Content.Server/GameObjects/Components/PDA/PDAComponent.cs +++ b/Content.Server/GameObjects/Components/PDA/PDAComponent.cs @@ -14,6 +14,7 @@ using Content.Server.Interfaces.PDA; using Content.Server.Utility; using Content.Shared.GameObjects.Components.PDA; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.GameObjects.Verbs; using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; diff --git a/Content.Server/GameObjects/Components/Power/AME/AMEControllerComponent.cs b/Content.Server/GameObjects/Components/Power/AME/AMEControllerComponent.cs index 8e5f590e24..eb6bf1e9fc 100644 --- a/Content.Server/GameObjects/Components/Power/AME/AMEControllerComponent.cs +++ b/Content.Server/GameObjects/Components/Power/AME/AMEControllerComponent.cs @@ -11,6 +11,7 @@ using Content.Server.Interfaces.GameObjects.Components.Items; using Content.Server.Utility; using Content.Shared.GameObjects.Components.Power.AME; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; using Robust.Server.GameObjects; diff --git a/Content.Server/GameObjects/Components/Power/ApcNetComponents/PowerReceiverUsers/BaseCharger.cs b/Content.Server/GameObjects/Components/Power/ApcNetComponents/PowerReceiverUsers/BaseCharger.cs index 986b404aea..9cc926434d 100644 --- a/Content.Server/GameObjects/Components/Power/ApcNetComponents/PowerReceiverUsers/BaseCharger.cs +++ b/Content.Server/GameObjects/Components/Power/ApcNetComponents/PowerReceiverUsers/BaseCharger.cs @@ -6,6 +6,7 @@ using Content.Server.GameObjects.Components.Items.Storage; using Content.Server.GameObjects.Components.Weapon.Ranged.Barrels; using Content.Shared.GameObjects.Components.Power; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.GameObjects.Verbs; using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; diff --git a/Content.Server/GameObjects/Components/Power/PowerCellSlotComponent.cs b/Content.Server/GameObjects/Components/Power/PowerCellSlotComponent.cs index c898b29497..79366c366c 100644 --- a/Content.Server/GameObjects/Components/Power/PowerCellSlotComponent.cs +++ b/Content.Server/GameObjects/Components/Power/PowerCellSlotComponent.cs @@ -4,6 +4,7 @@ using Content.Server.GameObjects.Components.GUI; using Content.Server.GameObjects.Components.Items.Storage; using Content.Shared.Audio; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.GameObjects.Verbs; using Robust.Server.GameObjects.Components.Container; using Robust.Server.GameObjects.EntitySystems; diff --git a/Content.Server/GameObjects/Components/Rotatable/FlippableComponent.cs b/Content.Server/GameObjects/Components/Rotatable/FlippableComponent.cs index 3d890b8883..ff95843d07 100644 --- a/Content.Server/GameObjects/Components/Rotatable/FlippableComponent.cs +++ b/Content.Server/GameObjects/Components/Rotatable/FlippableComponent.cs @@ -1,5 +1,6 @@ #nullable enable using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.GameObjects.Verbs; using Content.Shared.Interfaces; using Robust.Shared.GameObjects; diff --git a/Content.Server/GameObjects/Components/Rotatable/RotatableComponent.cs b/Content.Server/GameObjects/Components/Rotatable/RotatableComponent.cs index 403b7d73fd..18613346ad 100644 --- a/Content.Server/GameObjects/Components/Rotatable/RotatableComponent.cs +++ b/Content.Server/GameObjects/Components/Rotatable/RotatableComponent.cs @@ -1,4 +1,5 @@ using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.GameObjects.Verbs; using Content.Shared.Interfaces; using Robust.Shared.GameObjects; diff --git a/Content.Server/GameObjects/Components/Strap/StrapComponent.cs b/Content.Server/GameObjects/Components/Strap/StrapComponent.cs index a6ad9585b5..253a299ca7 100644 --- a/Content.Server/GameObjects/Components/Strap/StrapComponent.cs +++ b/Content.Server/GameObjects/Components/Strap/StrapComponent.cs @@ -5,6 +5,7 @@ using Content.Server.GameObjects.Components.Buckle; using Content.Shared.Alert; using Content.Shared.GameObjects.Components.Strap; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.GameObjects.Verbs; using Content.Shared.Interfaces.GameObjects.Components; using Content.Shared.Utility; diff --git a/Content.Server/GameObjects/Components/Weapon/Melee/StunbatonComponent.cs b/Content.Server/GameObjects/Components/Weapon/Melee/StunbatonComponent.cs index 03de47d17d..53291488ab 100644 --- a/Content.Server/GameObjects/Components/Weapon/Melee/StunbatonComponent.cs +++ b/Content.Server/GameObjects/Components/Weapon/Melee/StunbatonComponent.cs @@ -8,6 +8,7 @@ using Content.Server.GameObjects.Components.Power; using Content.Server.Interfaces.GameObjects.Components.Items; using Content.Shared.Audio; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.GameObjects.Verbs; using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; diff --git a/Content.Server/GameObjects/Components/Weapon/Ranged/Ammunition/AmmoBoxComponent.cs b/Content.Server/GameObjects/Components/Weapon/Ranged/Ammunition/AmmoBoxComponent.cs index 9c0b83af28..267cffbcf9 100644 --- a/Content.Server/GameObjects/Components/Weapon/Ranged/Ammunition/AmmoBoxComponent.cs +++ b/Content.Server/GameObjects/Components/Weapon/Ranged/Ammunition/AmmoBoxComponent.cs @@ -6,6 +6,7 @@ using Content.Server.GameObjects.Components.Items.Storage; using Content.Server.GameObjects.Components.Weapon.Ranged.Barrels; using Content.Shared.GameObjects.Components.Weapons.Ranged.Barrels; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.GameObjects.Verbs; using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; diff --git a/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/BoltActionBarrelComponent.cs b/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/BoltActionBarrelComponent.cs index 94565b01be..ebd5c16eb8 100644 --- a/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/BoltActionBarrelComponent.cs +++ b/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/BoltActionBarrelComponent.cs @@ -4,6 +4,7 @@ using Content.Server.GameObjects.Components.Weapon.Ranged.Ammunition; using Content.Shared.GameObjects; using Content.Shared.GameObjects.Components.Weapons.Ranged.Barrels; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.GameObjects.Verbs; using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; diff --git a/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/RevolverBarrelComponent.cs b/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/RevolverBarrelComponent.cs index d45af23d24..0037bd7343 100644 --- a/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/RevolverBarrelComponent.cs +++ b/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/RevolverBarrelComponent.cs @@ -4,6 +4,7 @@ using Content.Server.GameObjects.Components.Weapon.Ranged.Ammunition; using Content.Shared.GameObjects; using Content.Shared.GameObjects.Components.Weapons.Ranged.Barrels; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.GameObjects.Verbs; using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; diff --git a/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/ServerBatteryBarrelComponent.cs b/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/ServerBatteryBarrelComponent.cs index 418c1bf93f..639ceae889 100644 --- a/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/ServerBatteryBarrelComponent.cs +++ b/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/ServerBatteryBarrelComponent.cs @@ -9,6 +9,7 @@ using Content.Shared.Damage; using Content.Shared.GameObjects; using Content.Shared.GameObjects.Components.Weapons.Ranged.Barrels; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.GameObjects.Verbs; using Content.Shared.Interfaces.GameObjects.Components; using Robust.Server.GameObjects; diff --git a/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/ServerMagazineBarrelComponent.cs b/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/ServerMagazineBarrelComponent.cs index 9d77992065..1f2b7acba8 100644 --- a/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/ServerMagazineBarrelComponent.cs +++ b/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/ServerMagazineBarrelComponent.cs @@ -8,6 +8,7 @@ using Content.Shared.GameObjects; using Content.Shared.GameObjects.Components.Weapons.Ranged; using Content.Shared.GameObjects.Components.Weapons.Ranged.Barrels; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.GameObjects.Verbs; using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; diff --git a/Content.Server/GameObjects/Components/Weapon/Ranged/ServerRangedWeaponComponent.cs b/Content.Server/GameObjects/Components/Weapon/Ranged/ServerRangedWeaponComponent.cs index e8ea1a012a..f1331d4e7e 100644 --- a/Content.Server/GameObjects/Components/Weapon/Ranged/ServerRangedWeaponComponent.cs +++ b/Content.Server/GameObjects/Components/Weapon/Ranged/ServerRangedWeaponComponent.cs @@ -6,6 +6,7 @@ using Content.Shared.Damage; using Content.Shared.GameObjects.Components.Damage; using Content.Shared.GameObjects.Components.Weapons.Ranged; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; using Robust.Server.GameObjects.EntitySystems; diff --git a/Content.Server/GameObjects/EntitySystems/AI/Steering/AiSteeringSystem.cs b/Content.Server/GameObjects/EntitySystems/AI/Steering/AiSteeringSystem.cs index 4287f5d23f..2350ccb47b 100644 --- a/Content.Server/GameObjects/EntitySystems/AI/Steering/AiSteeringSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/AI/Steering/AiSteeringSystem.cs @@ -8,6 +8,7 @@ using Content.Server.GameObjects.EntitySystems.AI.Pathfinding; using Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Pathfinders; using Content.Server.GameObjects.EntitySystems.JobQueues; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.Utility; using Robust.Server.Interfaces.Timing; using Robust.Shared.GameObjects.Components; diff --git a/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs b/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs index f2ac56a7f7..08119c5363 100644 --- a/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs @@ -11,6 +11,7 @@ using Content.Shared.GameObjects.Components.Inventory; using Content.Shared.GameObjects.Components.Items; using Content.Shared.GameObjects.EntitySystemMessages; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.Input; using Content.Shared.Interfaces.GameObjects.Components; using Content.Shared.Utility; diff --git a/Content.Server/GameObjects/EntitySystems/ConstructionSystem.cs b/Content.Server/GameObjects/EntitySystems/ConstructionSystem.cs index 973c249a07..41640fa5b9 100644 --- a/Content.Server/GameObjects/EntitySystems/ConstructionSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/ConstructionSystem.cs @@ -11,6 +11,7 @@ using Content.Server.GameObjects.EntitySystems.DoAfter; using Content.Shared.Construction; using Content.Shared.GameObjects.Components; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.Interfaces; using Content.Shared.Utility; using JetBrains.Annotations; diff --git a/Content.Server/GameObjects/EntitySystems/PointingSystem.cs b/Content.Server/GameObjects/EntitySystems/PointingSystem.cs index 84862a76db..016d92312e 100644 --- a/Content.Server/GameObjects/EntitySystems/PointingSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/PointingSystem.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using Content.Server.GameObjects.Components.Pointing; using Content.Server.Players; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.Input; using Content.Shared.Interfaces; using Content.Shared.Utility; diff --git a/Content.Server/Interfaces/GameObjects/Components/Items/IHandsComponent.cs b/Content.Server/Interfaces/GameObjects/Components/Items/IHandsComponent.cs index 8de07084ff..c5fd4c9865 100644 --- a/Content.Server/Interfaces/GameObjects/Components/Items/IHandsComponent.cs +++ b/Content.Server/Interfaces/GameObjects/Components/Items/IHandsComponent.cs @@ -5,6 +5,7 @@ using System.Diagnostics.CodeAnalysis; using Content.Server.GameObjects.Components.Items.Storage; using Content.Shared.GameObjects.Components.Items; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Robust.Server.GameObjects.Components.Container; using Robust.Server.GameObjects.EntitySystemMessages; using Robust.Shared.Interfaces.GameObjects; diff --git a/Content.Server/Throw/ThrowHelper.cs b/Content.Server/Throw/ThrowHelper.cs index 300460f578..4d760383f7 100644 --- a/Content.Server/Throw/ThrowHelper.cs +++ b/Content.Server/Throw/ThrowHelper.cs @@ -2,6 +2,7 @@ using Content.Server.GameObjects.Components.Projectiles; using Content.Shared.GameObjects.Components.Movement; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.Physics; using Robust.Shared.GameObjects.Components; using Robust.Shared.Interfaces.GameObjects; diff --git a/Content.Shared/GameObjects/Components/ActionBlocking/SharedCuffableComponent.cs b/Content.Shared/GameObjects/Components/ActionBlocking/SharedCuffableComponent.cs index ce5be9f0e6..188a3bd555 100644 --- a/Content.Shared/GameObjects/Components/ActionBlocking/SharedCuffableComponent.cs +++ b/Content.Shared/GameObjects/Components/ActionBlocking/SharedCuffableComponent.cs @@ -1,5 +1,6 @@ using System; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Robust.Shared.GameObjects; using Robust.Shared.Maths; using Robust.Shared.Serialization; diff --git a/Content.Shared/GameObjects/Components/Buckle/SharedBuckleComponent.cs b/Content.Shared/GameObjects/Components/Buckle/SharedBuckleComponent.cs index 068ce878c7..807c9035a0 100644 --- a/Content.Shared/GameObjects/Components/Buckle/SharedBuckleComponent.cs +++ b/Content.Shared/GameObjects/Components/Buckle/SharedBuckleComponent.cs @@ -2,6 +2,7 @@ using System; using Content.Shared.GameObjects.Components.Strap; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.Interfaces.GameObjects.Components; using Robust.Shared.GameObjects; using Robust.Shared.GameObjects.ComponentDependencies; diff --git a/Content.Shared/GameObjects/Components/GUI/SharedStrippableComponent.cs b/Content.Shared/GameObjects/Components/GUI/SharedStrippableComponent.cs index 9b172820a4..77f41e77a4 100644 --- a/Content.Shared/GameObjects/Components/GUI/SharedStrippableComponent.cs +++ b/Content.Shared/GameObjects/Components/GUI/SharedStrippableComponent.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using Content.Shared.GameObjects.Components.Items; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.Interfaces.GameObjects.Components; using Robust.Shared.GameObjects; using Robust.Shared.GameObjects.Components.UserInterface; diff --git a/Content.Shared/GameObjects/Components/Mobs/SharedStunnableComponent.cs b/Content.Shared/GameObjects/Components/Mobs/SharedStunnableComponent.cs index 9620d186ae..794ab734be 100644 --- a/Content.Shared/GameObjects/Components/Mobs/SharedStunnableComponent.cs +++ b/Content.Shared/GameObjects/Components/Mobs/SharedStunnableComponent.cs @@ -3,6 +3,7 @@ using System.Threading; using Content.Shared.Alert; using Content.Shared.GameObjects.Components.Movement; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.Interfaces.GameObjects.Components; using Robust.Shared.GameObjects; using Robust.Shared.GameObjects.Components.Timers; diff --git a/Content.Shared/GameObjects/Components/Mobs/State/IMobState.cs b/Content.Shared/GameObjects/Components/Mobs/State/IMobState.cs index e17fa2f2b2..1cacbe57ab 100644 --- a/Content.Shared/GameObjects/Components/Mobs/State/IMobState.cs +++ b/Content.Shared/GameObjects/Components/Mobs/State/IMobState.cs @@ -1,4 +1,5 @@ using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.Serialization; diff --git a/Content.Shared/GameObjects/Components/Mobs/State/SharedMobStateComponent.cs b/Content.Shared/GameObjects/Components/Mobs/State/SharedMobStateComponent.cs index 784fd84c3a..4bcda6ac00 100644 --- a/Content.Shared/GameObjects/Components/Mobs/State/SharedMobStateComponent.cs +++ b/Content.Shared/GameObjects/Components/Mobs/State/SharedMobStateComponent.cs @@ -6,6 +6,7 @@ using System.Linq; using Content.Shared.Alert; using Content.Shared.GameObjects.Components.Damage; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Serialization; diff --git a/Content.Shared/GameObjects/Components/Movement/SharedClimbingComponent.cs b/Content.Shared/GameObjects/Components/Movement/SharedClimbingComponent.cs index cf81cdd7ac..e55e599f63 100644 --- a/Content.Shared/GameObjects/Components/Movement/SharedClimbingComponent.cs +++ b/Content.Shared/GameObjects/Components/Movement/SharedClimbingComponent.cs @@ -1,5 +1,6 @@ using System; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.Physics; using Robust.Shared.GameObjects; using Robust.Shared.GameObjects.Components; diff --git a/Content.Shared/GameObjects/Components/Observer/SharedGhostComponent.cs b/Content.Shared/GameObjects/Components/Observer/SharedGhostComponent.cs index 9d17d1258e..3eebfdc8ae 100644 --- a/Content.Shared/GameObjects/Components/Observer/SharedGhostComponent.cs +++ b/Content.Shared/GameObjects/Components/Observer/SharedGhostComponent.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Robust.Shared.GameObjects; using Robust.Shared.Serialization; diff --git a/Content.Shared/GameObjects/Components/Storage/SharedStorageComponent.cs b/Content.Shared/GameObjects/Components/Storage/SharedStorageComponent.cs index 2bbdb8ffe1..2bdbc43363 100644 --- a/Content.Shared/GameObjects/Components/Storage/SharedStorageComponent.cs +++ b/Content.Shared/GameObjects/Components/Storage/SharedStorageComponent.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.Linq; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.Interfaces.GameObjects.Components; using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.GameObjects; diff --git a/Content.Shared/GameObjects/EntitySystems/ActionBlocker/ActionBlockerExtensions.cs b/Content.Shared/GameObjects/EntitySystems/ActionBlocker/ActionBlockerExtensions.cs new file mode 100644 index 0000000000..c8052699d2 --- /dev/null +++ b/Content.Shared/GameObjects/EntitySystems/ActionBlocker/ActionBlockerExtensions.cs @@ -0,0 +1,77 @@ +using Robust.Shared.Interfaces.GameObjects; + +namespace Content.Shared.GameObjects.EntitySystems.ActionBlocker +{ + public static class ActionBlockerExtensions + { + public static bool CanMove(this IEntity entity) + { + return ActionBlockerSystem.CanMove(entity); + } + + public static bool CanInteract(this IEntity entity) + { + return ActionBlockerSystem.CanInteract(entity); + } + + public static bool CanUse(this IEntity entity) + { + return ActionBlockerSystem.CanUse(entity); + } + + public static bool CanThrow(this IEntity entity) + { + return ActionBlockerSystem.CanThrow(entity); + } + + public static bool CanSpeak(this IEntity entity) + { + return ActionBlockerSystem.CanSpeak(entity); + } + + public static bool CanDrop(this IEntity entity) + { + return ActionBlockerSystem.CanDrop(entity); + } + + public static bool CanPickup(this IEntity entity) + { + return ActionBlockerSystem.CanPickup(entity); + } + + public static bool CanEmote(this IEntity entity) + { + return ActionBlockerSystem.CanEmote(entity); + } + + public static bool CanAttack(this IEntity entity) + { + return ActionBlockerSystem.CanAttack(entity); + } + + public static bool CanEquip(this IEntity entity) + { + return ActionBlockerSystem.CanEquip(entity); + } + + public static bool CanUnequip(this IEntity entity) + { + return ActionBlockerSystem.CanUnequip(entity); + } + + public static bool CanChangeDirection(this IEntity entity) + { + return ActionBlockerSystem.CanChangeDirection(entity); + } + + public static bool CanShiver(this IEntity entity) + { + return ActionBlockerSystem.CanShiver(entity); + } + + public static bool CanSweat(this IEntity entity) + { + return ActionBlockerSystem.CanSweat(entity); + } + } +} diff --git a/Content.Shared/GameObjects/EntitySystems/ActionBlocker/ActionBlockerSystem.cs b/Content.Shared/GameObjects/EntitySystems/ActionBlocker/ActionBlockerSystem.cs new file mode 100644 index 0000000000..094ef7b8fa --- /dev/null +++ b/Content.Shared/GameObjects/EntitySystems/ActionBlocker/ActionBlockerSystem.cs @@ -0,0 +1,178 @@ +using JetBrains.Annotations; +using Robust.Shared.GameObjects.Systems; +using Robust.Shared.Interfaces.GameObjects; + +namespace Content.Shared.GameObjects.EntitySystems.ActionBlocker +{ + /// + /// Utility methods to check if a specific entity is allowed to perform an action. + /// For effects see + /// + [UsedImplicitly] + public class ActionBlockerSystem : EntitySystem + { + public static bool CanMove(IEntity entity) + { + var canMove = true; + + foreach (var blockers in entity.GetAllComponents()) + { + canMove &= blockers.CanMove(); // Sets var to false if false + } + + return canMove; + } + + public static bool CanInteract(IEntity entity) + { + var canInteract = true; + + foreach (var blockers in entity.GetAllComponents()) + { + canInteract &= blockers.CanInteract(); + } + + return canInteract; + } + + public static bool CanUse(IEntity entity) + { + var canUse = true; + + foreach (var blockers in entity.GetAllComponents()) + { + canUse &= blockers.CanUse(); + } + + return canUse; + } + + public static bool CanThrow(IEntity entity) + { + var canThrow = true; + + foreach (var blockers in entity.GetAllComponents()) + { + canThrow &= blockers.CanThrow(); + } + + return canThrow; + } + + public static bool CanSpeak(IEntity entity) + { + var canSpeak = true; + + foreach (var blockers in entity.GetAllComponents()) + { + canSpeak &= blockers.CanSpeak(); + } + + return canSpeak; + } + + public static bool CanDrop(IEntity entity) + { + var canDrop = true; + + foreach (var blockers in entity.GetAllComponents()) + { + canDrop &= blockers.CanDrop(); + } + + return canDrop; + } + + public static bool CanPickup(IEntity entity) + { + var canPickup = true; + + foreach (var blockers in entity.GetAllComponents()) + { + canPickup &= blockers.CanPickup(); + } + + return canPickup; + } + + public static bool CanEmote(IEntity entity) + { + var canEmote = true; + + foreach (var blockers in entity.GetAllComponents()) + { + canEmote &= blockers.CanEmote(); + } + + return canEmote; + } + + public static bool CanAttack(IEntity entity) + { + var canAttack = true; + + foreach (var blockers in entity.GetAllComponents()) + { + canAttack &= blockers.CanAttack(); + } + + return canAttack; + } + + public static bool CanEquip(IEntity entity) + { + var canEquip = true; + + foreach (var blockers in entity.GetAllComponents()) + { + canEquip &= blockers.CanEquip(); + } + + return canEquip; + } + + public static bool CanUnequip(IEntity entity) + { + var canUnequip = true; + + foreach (var blockers in entity.GetAllComponents()) + { + canUnequip &= blockers.CanUnequip(); + } + + return canUnequip; + } + + public static bool CanChangeDirection(IEntity entity) + { + var canChangeDirection = true; + + foreach (var blockers in entity.GetAllComponents()) + { + canChangeDirection &= blockers.CanChangeDirection(); + } + + return canChangeDirection; + } + + public static bool CanShiver(IEntity entity) + { + var canShiver = true; + foreach (var component in entity.GetAllComponents()) + { + canShiver &= component.CanShiver(); + } + return canShiver; + } + + public static bool CanSweat(IEntity entity) + { + var canSweat = true; + foreach (var component in entity.GetAllComponents()) + { + canSweat &= component.CanSweat(); + } + return canSweat; + } + } +} diff --git a/Content.Shared/GameObjects/EntitySystems/ActionBlocker/IActionBlocker.cs b/Content.Shared/GameObjects/EntitySystems/ActionBlocker/IActionBlocker.cs new file mode 100644 index 0000000000..0c47f44dca --- /dev/null +++ b/Content.Shared/GameObjects/EntitySystems/ActionBlocker/IActionBlocker.cs @@ -0,0 +1,37 @@ +namespace Content.Shared.GameObjects.EntitySystems.ActionBlocker +{ + /// + /// This interface gives components the ability to block certain actions from + /// being done by the owning entity. For effects see + /// + public interface IActionBlocker + { + bool CanMove() => true; + + bool CanInteract() => true; + + bool CanUse() => true; + + bool CanThrow() => true; + + bool CanSpeak() => true; + + bool CanDrop() => true; + + bool CanPickup() => true; + + bool CanEmote() => true; + + bool CanAttack() => true; + + bool CanEquip() => true; + + bool CanUnequip() => true; + + bool CanChangeDirection() => true; + + bool CanShiver() => true; + + bool CanSweat() => true; + } +} \ No newline at end of file diff --git a/Content.Shared/GameObjects/EntitySystems/ActionBlockerSystem.cs b/Content.Shared/GameObjects/EntitySystems/ActionBlockerSystem.cs deleted file mode 100644 index b0fc6baf20..0000000000 --- a/Content.Shared/GameObjects/EntitySystems/ActionBlockerSystem.cs +++ /dev/null @@ -1,195 +0,0 @@ -using Robust.Shared.GameObjects.Systems; -using Robust.Shared.Interfaces.GameObjects; - -namespace Content.Shared.GameObjects.EntitySystems -{ - /// - /// This interface gives components the ability to block certain actions from - /// being done by the owning entity. For effects see - /// - public interface IActionBlocker - { - bool CanMove() => true; - bool CanInteract() => true; - bool CanUse() => true; - bool CanThrow() => true; - bool CanSpeak() => true; - bool CanDrop() => true; - bool CanPickup() => true; - bool CanEmote() => true; - bool CanAttack() => true; - - bool CanEquip() => true; - - bool CanUnequip() => true; - - bool CanChangeDirection() => true; - - bool CanShiver() => true; - bool CanSweat() => true; - } - - /// - /// Utility methods to check if a specific entity is allowed to perform an action. - /// For effects see - /// - public class ActionBlockerSystem : EntitySystem - { - public static bool CanMove(IEntity entity) - { - bool canmove = true; - foreach (var actionblockercomponents in entity.GetAllComponents()) - { - canmove &= actionblockercomponents.CanMove(); // Sets var to false if false - } - - return canmove; - } - - public static bool CanInteract(IEntity entity) - { - bool caninteract = true; - foreach (var actionblockercomponents in entity.GetAllComponents()) - { - caninteract &= actionblockercomponents.CanInteract(); - } - - return caninteract; - } - - public static bool CanUse(IEntity entity) - { - bool canuse = true; - foreach (var actionblockercomponents in entity.GetAllComponents()) - { - canuse &= actionblockercomponents.CanUse(); - } - - return canuse; - } - - public static bool CanThrow(IEntity entity) - { - bool canthrow = true; - foreach (var actionblockercomponents in entity.GetAllComponents()) - { - canthrow &= actionblockercomponents.CanThrow(); - } - - return canthrow; - } - - public static bool CanSpeak(IEntity entity) - { - bool canspeak = true; - foreach (var actionblockercomponents in entity.GetAllComponents()) - { - canspeak &= actionblockercomponents.CanSpeak(); - } - - return canspeak; - } - - public static bool CanDrop(IEntity entity) - { - bool candrop = true; - foreach (var actionblockercomponents in entity.GetAllComponents()) - { - candrop &= actionblockercomponents.CanDrop(); - } - - return candrop; - } - - public static bool CanPickup(IEntity entity) - { - bool canpickup = true; - foreach (var actionblockercomponents in entity.GetAllComponents()) - { - canpickup &= actionblockercomponents.CanPickup(); - } - - return canpickup; - } - - public static bool CanEmote(IEntity entity) - { - bool canemote = true; - - foreach (var actionblockercomponents in entity.GetAllComponents()) - { - canemote &= actionblockercomponents.CanEmote(); - } - - return canemote; - } - - public static bool CanAttack(IEntity entity) - { - bool canattack = true; - - foreach (var actionblockercomponents in entity.GetAllComponents()) - { - canattack &= actionblockercomponents.CanAttack(); - } - - return canattack; - } - - public static bool CanEquip(IEntity entity) - { - bool canequip = true; - - foreach (var actionblockercomponents in entity.GetAllComponents()) - { - canequip &= actionblockercomponents.CanEquip(); - } - - return canequip; - } - - public static bool CanUnequip(IEntity entity) - { - bool canunequip = true; - - foreach (var actionblockercomponents in entity.GetAllComponents()) - { - canunequip &= actionblockercomponents.CanUnequip(); - } - - return canunequip; - } - - public static bool CanChangeDirection(IEntity entity) - { - bool canchangedirection = true; - - foreach (var actionblockercomponents in entity.GetAllComponents()) - { - canchangedirection &= actionblockercomponents.CanChangeDirection(); - } - - return canchangedirection; - } - - public static bool CanShiver(IEntity entity) - { - var canShiver = true; - foreach (var component in entity.GetAllComponents()) - { - canShiver &= component.CanShiver(); - } - return canShiver; - } - - public static bool CanSweat(IEntity entity) - { - var canSweat = true; - foreach (var component in entity.GetAllComponents()) - { - canSweat &= component.CanSweat(); - } - return canSweat; - } - } -} diff --git a/Content.Shared/GameObjects/EntitySystems/EffectBlockerSystem.cs b/Content.Shared/GameObjects/EntitySystems/EffectBlockerSystem.cs index c7e003f03a..2458dfd847 100644 --- a/Content.Shared/GameObjects/EntitySystems/EffectBlockerSystem.cs +++ b/Content.Shared/GameObjects/EntitySystems/EffectBlockerSystem.cs @@ -1,4 +1,5 @@ -using Robust.Shared.GameObjects.Systems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; +using Robust.Shared.GameObjects.Systems; using Robust.Shared.Interfaces.GameObjects; namespace Content.Shared.GameObjects.EntitySystems diff --git a/Content.Shared/GameObjects/EntitySystems/SharedMoverSystem.cs b/Content.Shared/GameObjects/EntitySystems/SharedMoverSystem.cs index 7a8f266e9c..127cd56b8a 100644 --- a/Content.Shared/GameObjects/EntitySystems/SharedMoverSystem.cs +++ b/Content.Shared/GameObjects/EntitySystems/SharedMoverSystem.cs @@ -2,6 +2,7 @@ using System.Diagnostics.CodeAnalysis; using Content.Shared.GameObjects.Components.Items; using Content.Shared.GameObjects.Components.Movement; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Content.Shared.Physics; using Content.Shared.Physics.Pull; using Robust.Shared.Configuration; diff --git a/Content.Shared/Physics/ThrowKnockbackController.cs b/Content.Shared/Physics/ThrowKnockbackController.cs index d6bf507174..0b11cab2a3 100644 --- a/Content.Shared/Physics/ThrowKnockbackController.cs +++ b/Content.Shared/Physics/ThrowKnockbackController.cs @@ -1,5 +1,6 @@ using Content.Shared.GameObjects.Components.Movement; using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.EntitySystems.ActionBlocker; using Robust.Shared.Interfaces.Physics; using Robust.Shared.IoC; using Robust.Shared.Maths;