2020-10-30 16:06:48 +01:00
|
|
|
using Content.Server.Administration;
|
2021-06-09 22:19:39 +02:00
|
|
|
using Content.Server.Verbs;
|
2020-10-30 16:06:48 +01:00
|
|
|
using Content.Shared.Administration;
|
2021-02-11 01:13:03 -08:00
|
|
|
using Robust.Server.Player;
|
2021-02-01 16:49:43 -08:00
|
|
|
using Robust.Shared.Console;
|
2021-02-11 01:13:03 -08:00
|
|
|
using Robust.Shared.GameObjects;
|
2020-10-26 12:11:32 +01:00
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Server.Containers.Commands
|
2020-10-26 12:11:32 +01:00
|
|
|
{
|
2020-10-30 16:06:48 +01:00
|
|
|
[AdminCommand(AdminFlags.Debug)]
|
2021-02-01 16:49:43 -08:00
|
|
|
public class HideContainedContextCommand : IConsoleCommand
|
2020-10-26 12:11:32 +01:00
|
|
|
{
|
|
|
|
|
public string Command => "hidecontainedcontext";
|
|
|
|
|
public string Description => $"Reverts the effects of {ShowContainedContextCommand.CommandName}";
|
|
|
|
|
public string Help => $"{Command}";
|
|
|
|
|
|
2021-02-01 16:49:43 -08:00
|
|
|
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
2020-10-26 12:11:32 +01:00
|
|
|
{
|
2021-02-01 16:49:43 -08:00
|
|
|
var player = shell.Player as IPlayerSession;
|
2020-10-26 12:11:32 +01:00
|
|
|
if (player == null)
|
|
|
|
|
{
|
2021-02-01 16:49:43 -08:00
|
|
|
shell.WriteLine("You need to be a player to use this command.");
|
2020-10-26 12:11:32 +01:00
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
EntitySystem.Get<VerbSystem>().RemoveContainerVisibility(player);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|