From bdcacba1ccebccd2d87fcf80d9f02209bf91e9e9 Mon Sep 17 00:00:00 2001 From: Jabak <163307958+Jabaks@users.noreply.github.com> Date: Fri, 23 Aug 2024 04:01:50 +0300 Subject: [PATCH] PacifismCommand --- .../_Honk/ConsoleCommand/PacifismCommand.cs | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Content.Server/_Honk/ConsoleCommand/PacifismCommand.cs diff --git a/Content.Server/_Honk/ConsoleCommand/PacifismCommand.cs b/Content.Server/_Honk/ConsoleCommand/PacifismCommand.cs new file mode 100644 index 0000000000..f4eda01183 --- /dev/null +++ b/Content.Server/_Honk/ConsoleCommand/PacifismCommand.cs @@ -0,0 +1,31 @@ +using Content.Server.Administration; +using Content.Shared.Administration; +using Content.Shared.CombatMode.Pacification; +using Robust.Shared.Console; + +namespace Content.Server._Honk.ConsoleCommand; + +[AdminCommand(AdminFlags.Admin)] +public sealed class PacifismCommand : IConsoleCommand +{ + [Dependency] private readonly EntityManager _entityManager = default!; + + public string Command => "addpacifism"; + public string Description => "Add Pacifism Component"; + public string Help => "Poxui mne"; + + public void Execute(IConsoleShell shell, string argStr, string[] args) + { + var player = shell.Player; + + if (player!.AttachedEntity == null) + { + shell.WriteLine("You don't have an entity to add a pacified to."); + return; + } + + var entity = player.AttachedEntity.Value; + shell.WriteLine($"Adding PacifiedComponent to {entity}"); + _entityManager.AddComponent(entity); + } +}