]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Add admin antag control command for making people into Wizards (#41494)
authorThatGuyUSA <thatguyusa123@gmail.com>
Fri, 21 Nov 2025 05:50:42 +0000 (21:50 -0800)
committerGitHub <noreply@github.com>
Fri, 21 Nov 2025 05:50:42 +0000 (05:50 +0000)
* innit bruv, but also done!

* added comment to signify why it's like that

Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs
Resources/Locale/en-US/administration/antag.ftl

index 2b5ea90b1295f3d97426a986de72e4010f3ee3c5..777d40e110d72b0767480a1a052b54a66043ad3a 100644 (file)
@@ -12,6 +12,7 @@ using Content.Shared.Verbs;
 using Robust.Shared.Player;
 using Robust.Shared.Prototypes;
 using Robust.Shared.Utility;
+using Content.Shared.Roles.Components;
 
 namespace Content.Server.Administration.Systems;
 
@@ -29,6 +30,7 @@ public sealed partial class AdminVerbSystem
     private static readonly EntProtoId DefaultThiefRule = "Thief";
     private static readonly EntProtoId DefaultChangelingRule = "Changeling";
     private static readonly EntProtoId ParadoxCloneRuleId = "ParadoxCloneSpawn";
+    private static readonly EntProtoId DefaultWizardRule = "Wizard";
     private static readonly ProtoId<StartingGearPrototype> PirateGearId = "PirateGear";
 
     // All antag verbs have names so invokeverb works.
@@ -189,6 +191,22 @@ public sealed partial class AdminVerbSystem
             Message = string.Join(": ", paradoxCloneName, Loc.GetString("admin-verb-make-paradox-clone")),
         };
 
+        var wizardName = Loc.GetString("admin-verb-text-make-wizard");
+        Verb wizard = new()
+        {
+            Text = wizardName,
+            Category = VerbCategory.Antag,
+            Icon = new SpriteSpecifier.Rsi(new("/Textures/Interface/Misc/job_icons.rsi"), "Wizard"),
+            Act = () =>
+            {
+                // Wizard has no rule components as of writing, but I gotta put something here to satisfy the machine so just make it wizard mind rule :)
+                _antag.ForceMakeAntag<WizardRoleComponent>(targetPlayer, DefaultWizardRule);
+            },
+            Impact = LogImpact.High,
+            Message = string.Join(": ", wizardName, Loc.GetString("admin-verb-make-wizard")),
+        };
+        args.Verbs.Add(wizard);
+
         if (HasComp<HumanoidAppearanceComponent>(args.Target)) // only humanoids can be cloned
             args.Verbs.Add(paradox);
     }
index 161054aca22d668c30e5006e8eb5b04b5e8b82dc..5cb9b3013363eae99512454e9aae4ae54ca0be52 100644 (file)
@@ -7,6 +7,7 @@ admin-verb-make-pirate = Make the target into a pirate. Note this doesn't config
 admin-verb-make-head-rev = Make the target into a Head Revolutionary.
 admin-verb-make-thief = Make the target into a thief.
 admin-verb-make-paradox-clone = Create a Paradox Clone ghost role of the target.
+admin-verb-make-wizard = Make the target into a Wizard.
 admin-verb-make-changeling = Make the target into a Changeling.
 
 
@@ -18,6 +19,7 @@ admin-verb-text-make-pirate = Make Pirate
 admin-verb-text-make-head-rev = Make Head Rev
 admin-verb-text-make-thief = Make Thief
 admin-verb-text-make-paradox-clone = Create Paradox Clone
+admin-verb-text-make-wizard = Make Wizard
 admin-verb-text-make-changeling = Make Changeling (WIP)
 
 admin-overlay-antag-classic = ANTAG