Melee refactor (#10897)

Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
This commit is contained in:
metalgearsloth
2022-09-29 15:51:59 +10:00
committed by GitHub
parent c583b7b361
commit f51248ecaa
140 changed files with 2440 additions and 1824 deletions

View File

@@ -1,4 +1,3 @@
using Content.Shared.CombatMode;
using Content.Shared.Actions;
namespace Content.Shared.CombatMode.Pacification
@@ -18,11 +17,9 @@ namespace Content.Shared.CombatMode.Pacification
if (!TryComp<SharedCombatModeComponent>(uid, out var combatMode))
return;
if (combatMode.DisarmAction != null)
{
_actionsSystem.SetToggled(combatMode.DisarmAction, false);
_actionsSystem.SetEnabled(combatMode.DisarmAction, false);
}
if (combatMode.CanDisarm != null)
combatMode.CanDisarm = false;
if (combatMode.CombatToggleAction != null)
{
combatMode.IsInCombatMode = false;
@@ -35,8 +32,8 @@ namespace Content.Shared.CombatMode.Pacification
if (!TryComp<SharedCombatModeComponent>(uid, out var combatMode))
return;
if (combatMode.DisarmAction != null)
_actionsSystem.SetEnabled(combatMode.DisarmAction, true);
if (combatMode.CanDisarm != null)
combatMode.CanDisarm = true;
if (combatMode.CombatToggleAction != null)
_actionsSystem.SetEnabled(combatMode.CombatToggleAction, true);
}