Files
wwdpublic/Content.Client/Weapons/Ranged/Commands/ShowSpreadCommand.cs
RedFoxIV af21168537 Fuselage rust (#551)
* the definition of insanity

* the definition of insanity

* the definition of insanity

* we have hullrot at home

* maybe the real hullrot was the friends we made along the way

* john hullrot

* i am going to hullroooooot

* it's hullrotver

* we're so hullback

* we're rotting the hull with this one

* hullmerge

* the hullrot is leaking

* never gonna rot you up

* hullfresh

* john starsector

* god i wish we had grid collision damage
2025-06-11 11:04:48 +03:00

33 lines
1.2 KiB
C#

using Content.Client.Weapons.Ranged.Systems;
using Robust.Shared.Console;
using Robust.Shared.Reflection;
using System.Linq;
using static Content.Client.Weapons.Ranged.Systems.GunSystem;
namespace Content.Client.Weapons.Ranged;
public sealed class ShowSpreadCommand : IConsoleCommand
{
public string Command => "showgunspread";
public string Description => $"Switches gun spread overlay between normal and debug."; // wwdp edit
// WWDP EDIT START
public string Help => "Shows all the spread related values for currently held gun (or for the localEntity's gunComp, if no gun is held and the component is present.)"; // wwdp edit
public void Execute(IConsoleShell shell, string argStr, string[] args)
{
var system = IoCManager.Resolve<IEntitySystemManager>().GetEntitySystem<GunSystem>();
system.SpreadOverlay = system.SpreadOverlay switch
{
GunSpreadOverlayEnum.Off => GunSpreadOverlayEnum.Normal,
GunSpreadOverlayEnum.Normal => GunSpreadOverlayEnum.Debug,
GunSpreadOverlayEnum.Debug => GunSpreadOverlayEnum.Off,
_ => throw new ArgumentOutOfRangeException()
};
shell.WriteLine($"Set spread overlay to \"{system.SpreadOverlay}\".");
}
}
// WWDP EDIT END