mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-19 06:28:40 +03:00
* 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
33 lines
1.2 KiB
C#
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
|