diff --git a/Content.Client/Shuttles/Commands/ShowEmergencyShuttleCommand.cs b/Content.Client/Shuttles/Commands/ShowEmergencyShuttleCommand.cs index 51430ca315..d14136957f 100644 --- a/Content.Client/Shuttles/Commands/ShowEmergencyShuttleCommand.cs +++ b/Content.Client/Shuttles/Commands/ShowEmergencyShuttleCommand.cs @@ -3,15 +3,15 @@ using Robust.Shared.Console; namespace Content.Client.Shuttles.Commands; -public sealed class ShowEmergencyShuttleCommand : IConsoleCommand +public sealed class ShowEmergencyShuttleCommand : LocalizedEntityCommands { - public string Command => "showemergencyshuttle"; - public string Description => "Shows the expected position of the emergency shuttle"; - public string Help => $"{Command}"; - public void Execute(IConsoleShell shell, string argStr, string[] args) + [Dependency] private readonly ShuttleSystem _shuttle = default!; + + public override string Command => "showemergencyshuttle"; + + public override void Execute(IConsoleShell shell, string argStr, string[] args) { - var tstalker = IoCManager.Resolve().GetEntitySystem(); - tstalker.EnableShuttlePosition ^= true; - shell.WriteLine($"Set emergency shuttle debug to {tstalker.EnableShuttlePosition}"); + _shuttle.EnableShuttlePosition ^= true; + shell.WriteLine(Loc.GetString($"cmd-showemergencyshuttle-status", ("status", _shuttle.EnableShuttlePosition))); } } diff --git a/Content.Client/Weapons/Melee/MeleeSpreadCommand.cs b/Content.Client/Weapons/Melee/MeleeSpreadCommand.cs index eda469deaf..1eb82bde1c 100644 --- a/Content.Client/Weapons/Melee/MeleeSpreadCommand.cs +++ b/Content.Client/Weapons/Melee/MeleeSpreadCommand.cs @@ -3,39 +3,33 @@ using Robust.Client.Graphics; using Robust.Client.Input; using Robust.Client.Player; using Robust.Shared.Console; -using Robust.Shared.Map; namespace Content.Client.Weapons.Melee; - -public sealed class MeleeSpreadCommand : IConsoleCommand +public sealed class MeleeSpreadCommand : LocalizedEntityCommands { - public string Command => "showmeleespread"; - public string Description => "Shows the current weapon's range and arc for debugging"; - public string Help => $"{Command}"; - public void Execute(IConsoleShell shell, string argStr, string[] args) + [Dependency] private readonly IEyeManager _eyeManager = default!; + [Dependency] private readonly IInputManager _inputManager = default!; + [Dependency] private readonly IOverlayManager _overlay = default!; + [Dependency] private readonly IPlayerManager _playerManager = default!; + [Dependency] private readonly MeleeWeaponSystem _meleeSystem = default!; + [Dependency] private readonly SharedCombatModeSystem _combatSystem = default!; + [Dependency] private readonly SharedTransformSystem _transformSystem = default!; + + public override string Command => "showmeleespread"; + + public override void Execute(IConsoleShell shell, string argStr, string[] args) { - var collection = IoCManager.Instance; - - if (collection == null) + if (_overlay.RemoveOverlay()) return; - var overlayManager = collection.Resolve(); - - if (overlayManager.RemoveOverlay()) - { - return; - } - - var sysManager = collection.Resolve(); - - overlayManager.AddOverlay(new MeleeArcOverlay( - collection.Resolve(), - collection.Resolve(), - collection.Resolve(), - collection.Resolve(), - sysManager.GetEntitySystem(), - sysManager.GetEntitySystem(), - sysManager.GetEntitySystem())); + _overlay.AddOverlay(new MeleeArcOverlay( + EntityManager, + _eyeManager, + _inputManager, + _playerManager, + _meleeSystem, + _combatSystem, + _transformSystem)); } } diff --git a/Resources/Locale/en-US/commands/melee-spread-command.ftl b/Resources/Locale/en-US/commands/melee-spread-command.ftl new file mode 100644 index 0000000000..7e62fb53b9 --- /dev/null +++ b/Resources/Locale/en-US/commands/melee-spread-command.ftl @@ -0,0 +1 @@ +cmd-showmeleespread-desc = Shows the current weapon's range and arc for debugging. diff --git a/Resources/Locale/en-US/commands/show-emergency-shuttle-command.ftl b/Resources/Locale/en-US/commands/show-emergency-shuttle-command.ftl new file mode 100644 index 0000000000..e51494685c --- /dev/null +++ b/Resources/Locale/en-US/commands/show-emergency-shuttle-command.ftl @@ -0,0 +1,2 @@ +cmd-showemergencyshuttle-desc = Shows the expected position of the emergency shuttle. +cmd-showemergencyshuttle-status = Set emergency shuttle debug to {$status}.