Melee refactor (#10897)
Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user