Files
ss14-wl/Content.Server/Fluids/ShowFluidsCommand.cs
Pieter-Jan BriersandGitHub 5168b5f3d4 IoC source gen compatibility (#43863)
* IoC source gen compatibility

Can be merged before or after https://github.com/space-wizards/RobustToolbox/pull/6549 doesn't really matter.

* Missed a spot
2026-05-09 03:29:58 +00:00

32 lines
1.0 KiB
C#

using Content.Server.Administration;
using Content.Server.Fluids.EntitySystems;
using Content.Shared.Administration;
using Robust.Shared.Console;
namespace Content.Server.Fluids;
[AdminCommand(AdminFlags.Debug)]
public sealed partial class ShowFluidsCommand : IConsoleCommand
{
[Dependency] private IEntitySystemManager _entitySystem = default!;
public string Command => "showfluids";
public string Description => "Toggles seeing puddle debug overlay.";
public string Help => $"Usage: {Command}";
public void Execute(IConsoleShell shell, string argStr, string[] args)
{
var player = shell.Player;
if (player == null)
{
shell.WriteLine("You must be a player to use this command.");
return;
}
var fluidDebug = _entitySystem.GetEntitySystem<PuddleDebugDebugOverlaySystem>();
var enabled = fluidDebug.ToggleObserver(player);
shell.WriteLine(enabled
? "Enabled the puddle debug overlay."
: "Disabled the puddle debug overlay.");
}
}