Refactor actions to be entities with components (#19900)

This commit is contained in:
DrSmugleaf
2023-09-08 18:16:05 -07:00
committed by GitHub
parent e18f731b91
commit c71f97e3a2
210 changed files with 10693 additions and 11714 deletions

View File

@@ -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);
}
}