Refactor actions to be entities with components (#19900)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using Content.Shared.Actions;
|
||||
using Content.Shared.Alert;
|
||||
using Content.Shared.Interaction.Events;
|
||||
using Content.Shared.Popups;
|
||||
|
||||
namespace Content.Shared.CombatMode.Pacification;
|
||||
|
||||
@@ -33,10 +32,7 @@ public sealed class PacificationSystem : EntitySystem
|
||||
_combatSystem.SetCanDisarm(uid, false, combatMode);
|
||||
|
||||
_combatSystem.SetInCombatMode(uid, false, combatMode);
|
||||
|
||||
if (combatMode.CombatToggleAction != null)
|
||||
_actionsSystem.SetEnabled(combatMode.CombatToggleAction, false);
|
||||
|
||||
_actionsSystem.SetEnabled(combatMode.CombatToggleActionEntity, false);
|
||||
_alertsSystem.ShowAlert(uid, AlertType.Pacified);
|
||||
}
|
||||
|
||||
@@ -48,9 +44,7 @@ public sealed class PacificationSystem : EntitySystem
|
||||
if (combatMode.CanDisarm != null)
|
||||
_combatSystem.SetCanDisarm(uid, true, combatMode);
|
||||
|
||||
if (combatMode.CombatToggleAction != null)
|
||||
_actionsSystem.SetEnabled(combatMode.CombatToggleAction, true);
|
||||
|
||||
_actionsSystem.SetEnabled(combatMode.CombatToggleActionEntity, true);
|
||||
_alertsSystem.ClearAlert(uid, AlertType.Pacified);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user