Add admin antag control command for making people into Wizards (#41494)
* innit bruv, but also done! * added comment to signify why it's like that
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user