diff --git a/Content.Server/Administration/AdminVerbSystem.cs b/Content.Server/Administration/AdminVerbSystem.cs index e30b8d4b0d..da6b7fd169 100644 --- a/Content.Server/Administration/AdminVerbSystem.cs +++ b/Content.Server/Administration/AdminVerbSystem.cs @@ -20,6 +20,7 @@ using Content.Shared.Database; using Content.Shared.GameTicking; using Content.Shared.Interaction.Helpers; using Content.Shared.Inventory; +using Content.Shared.Movement.Components; using Content.Shared.Popups; using Content.Shared.Verbs; using Robust.Server.Console; @@ -77,6 +78,26 @@ namespace Content.Server.Administration _console.RemoteExecuteCommand(player, $"openahelp \"{targetActor.PlayerSession.UserId}\""); verb.Impact = LogImpact.Low; args.Verbs.Add(verb); + + // Freeze + var frozen = HasComp(args.Target); + args.Verbs.Add(new Verb + { + Priority = -1, // This is just so it doesn't change position in the menu between freeze/unfreeze. + Text = frozen + ? Loc.GetString("admin-verbs-unfreeze") + : Loc.GetString("admin-verbs-freeze"), + Category = VerbCategory.Admin, + IconTexture = "/Textures/Interface/VerbIcons/snow.svg.192dpi.png", + Act = () => + { + if (frozen) + RemComp(args.Target); + else + EnsureComp(args.Target); + }, + Impact = LogImpact.Medium, + }); } // TeleportTo diff --git a/Content.Shared/Administration/AdminFrozenComponent.cs b/Content.Shared/Administration/AdminFrozenComponent.cs new file mode 100644 index 0000000000..591e2a83d2 --- /dev/null +++ b/Content.Shared/Administration/AdminFrozenComponent.cs @@ -0,0 +1,9 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared.Administration; + +[RegisterComponent, Friend(typeof(AdminFrozenSystem))] +[NetworkedComponent] +public sealed class AdminFrozenComponent : Component +{ +} diff --git a/Content.Shared/Administration/AdminFrozenSystem.cs b/Content.Shared/Administration/AdminFrozenSystem.cs new file mode 100644 index 0000000000..68aad166d3 --- /dev/null +++ b/Content.Shared/Administration/AdminFrozenSystem.cs @@ -0,0 +1,21 @@ +using Content.Shared.Interaction.Events; +using Content.Shared.Item; +using Content.Shared.Movement; +using Content.Shared.Throwing; + +namespace Content.Shared.Administration; + +public sealed class AdminFrozenSystem : EntitySystem +{ + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent((_, _, args) => args.Cancel()); + SubscribeLocalEvent((_, _, args) => args.Cancel()); + SubscribeLocalEvent((_, _, args) => args.Cancel()); + SubscribeLocalEvent((_, _, args) => args.Cancel()); + SubscribeLocalEvent((_, _, args) => args.Cancel()); + SubscribeLocalEvent((_, _, args) => args.Cancel()); + } +} diff --git a/Resources/Locale/en-US/administration/admin-verbs.ftl b/Resources/Locale/en-US/administration/admin-verbs.ftl index 1a12ad2f44..5bd9845e42 100644 --- a/Resources/Locale/en-US/administration/admin-verbs.ftl +++ b/Resources/Locale/en-US/administration/admin-verbs.ftl @@ -4,3 +4,5 @@ explode-verb-get-data-text = Explode ahelp-verb-get-data-text = Message admin-verbs-teleport-to = Teleport To admin-verbs-teleport-here = Teleport Here +admin-verbs-freeze = Freeze +admin-verbs-unfreeze = Unfreeze diff --git a/Resources/Textures/Interface/VerbIcons/snow.svg b/Resources/Textures/Interface/VerbIcons/snow.svg new file mode 100644 index 0000000000..b62d2ebe2b --- /dev/null +++ b/Resources/Textures/Interface/VerbIcons/snow.svg @@ -0,0 +1,39 @@ + + + + + + + diff --git a/Resources/Textures/Interface/VerbIcons/snow.svg.192dpi.png b/Resources/Textures/Interface/VerbIcons/snow.svg.192dpi.png new file mode 100644 index 0000000000..8d877261da Binary files /dev/null and b/Resources/Textures/Interface/VerbIcons/snow.svg.192dpi.png differ diff --git a/Resources/Textures/Interface/VerbIcons/snow.svg.192dpi.png.yml b/Resources/Textures/Interface/VerbIcons/snow.svg.192dpi.png.yml new file mode 100644 index 0000000000..5c43e23305 --- /dev/null +++ b/Resources/Textures/Interface/VerbIcons/snow.svg.192dpi.png.yml @@ -0,0 +1,2 @@ +sample: + filter: true