Add command to toggle ghost visibility on the client (#27314)
* Add command to toggle ghost visibility on the client * Fix description * Fix index of arg parsing * Allow setting GhostVisibility directly
This commit is contained in:
@@ -3,7 +3,6 @@ using Content.Shared.Actions;
|
||||
using Content.Shared.Ghost;
|
||||
using Robust.Client.Console;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.Player;
|
||||
using Robust.Shared.Player;
|
||||
|
||||
@@ -177,9 +176,9 @@ namespace Content.Client.Ghost
|
||||
_console.RemoteExecuteCommand(null, "ghostroles");
|
||||
}
|
||||
|
||||
public void ToggleGhostVisibility()
|
||||
public void ToggleGhostVisibility(bool? visibility = null)
|
||||
{
|
||||
GhostVisibility = !GhostVisibility;
|
||||
GhostVisibility = visibility ?? !GhostVisibility;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user