]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Add antag control for the space ninja (#42133)
authorYoungThug <ramialanbagy@gmail.com>
Mon, 29 Dec 2025 00:01:35 +0000 (17:01 -0700)
committerGitHub <noreply@github.com>
Mon, 29 Dec 2025 00:01:35 +0000 (00:01 +0000)
* Add antag control for the space ninja

* Remove whitespace

---------

Co-authored-by: beck-thompson <beck314159@hotmail.com>
Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs
Resources/Locale/en-US/administration/antag.ftl

index 777d40e110d72b0767480a1a052b54a66043ad3a..786a4294bf560395091b59f3ed3c46129d1b4cce 100644 (file)
@@ -31,6 +31,7 @@ public sealed partial class AdminVerbSystem
     private static readonly EntProtoId DefaultChangelingRule = "Changeling";
     private static readonly EntProtoId ParadoxCloneRuleId = "ParadoxCloneSpawn";
     private static readonly EntProtoId DefaultWizardRule = "Wizard";
+    private static readonly EntProtoId DefaultNinjaRule = "NinjaSpawn";
     private static readonly ProtoId<StartingGearPrototype> PirateGearId = "PirateGear";
 
     // All antag verbs have names so invokeverb works.
@@ -207,6 +208,21 @@ public sealed partial class AdminVerbSystem
         };
         args.Verbs.Add(wizard);
 
+        var ninjaName = Loc.GetString("admin-verb-text-make-space-ninja");
+        Verb ninja = new()
+        {
+            Text = ninjaName,
+            Category = VerbCategory.Antag,
+            Icon = new SpriteSpecifier.Rsi(new("/Textures/Objects/Weapons/Melee/energykatana.rsi"), "icon"),
+            Act = () =>
+            {
+                _antag.ForceMakeAntag<NinjaRoleComponent>(targetPlayer, DefaultNinjaRule);
+            },
+            Impact = LogImpact.High,
+            Message = string.Join(": ", ninjaName, Loc.GetString("admin-verb-make-space-ninja")),
+        };
+        args.Verbs.Add(ninja);
+
         if (HasComp<HumanoidAppearanceComponent>(args.Target)) // only humanoids can be cloned
             args.Verbs.Add(paradox);
     }
index 5cb9b3013363eae99512454e9aae4ae54ca0be52..a81dd048b811860a755719cf53ee7c52a7bbc84b 100644 (file)
@@ -8,6 +8,7 @@ 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-space-ninja = Make the target into a Space Ninja.
 admin-verb-make-changeling = Make the target into a Changeling.
 
 
@@ -20,6 +21,7 @@ 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-space-ninja = Make Ninja
 admin-verb-text-make-changeling = Make Changeling (WIP)
 
 admin-overlay-antag-classic = ANTAG