Add an admin smite for making people slip really far (and localize the admin smites better) (#27246)

* Sliiiiiiiiiiiiiiiiiip

* what

* Localize!

* antiterminate
This commit is contained in:
Джексон Миссиссиппи
2024-05-11 21:01:58 -05:00
committed by GitHub
parent db2beafd59
commit cf148288a0
3 changed files with 113 additions and 43 deletions

View File

@@ -37,6 +37,7 @@ using Content.Shared.Movement.Components;
using Content.Shared.Movement.Systems;
using Content.Shared.Nutrition.Components;
using Content.Shared.Popups;
using Content.Shared.Slippery;
using Content.Shared.Tabletop.Components;
using Content.Shared.Tools.Systems;
using Content.Shared.Verbs;
@@ -77,6 +78,7 @@ public sealed partial class AdminVerbSystem
[Dependency] private readonly SharedContentEyeSystem _eyeSystem = default!;
[Dependency] private readonly SharedTransformSystem _transformSystem = default!;
[Dependency] private readonly SuperBonkSystem _superBonkSystem = default!;
[Dependency] private readonly SlipperySystem _slipperySystem = default!;
// All smite verbs have names so invokeverb works.
private void AddSmiteVerbs(GetVerbsEvent<Verb> args)
@@ -95,7 +97,7 @@ public sealed partial class AdminVerbSystem
Verb explode = new()
{
Text = "Explode",
Text = "admin-smite-explode-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/smite.svg.192dpi.png")),
Act = () =>
@@ -115,7 +117,7 @@ public sealed partial class AdminVerbSystem
Verb chess = new()
{
Text = "Chess Dimension",
Text = "admin-smite-chess-dimension-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Fun/Tabletop/chessboard.rsi"), "chessboard"),
Act = () =>
@@ -143,7 +145,7 @@ public sealed partial class AdminVerbSystem
{
Verb flames = new()
{
Text = "Set Alight",
Text = "admin-smite-set-alight-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/Alerts/Fire/fire.png")),
Act = () =>
@@ -165,7 +167,7 @@ public sealed partial class AdminVerbSystem
Verb monkey = new()
{
Text = "Monkeyify",
Text = "admin-smite-monkeyify-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Mobs/Animals/monkey.rsi"), "monkey"),
Act = () =>
@@ -179,7 +181,7 @@ public sealed partial class AdminVerbSystem
Verb disposalBin = new()
{
Text = "Garbage Can",
Text = "admin-smite-electrocute-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Structures/Piping/disposal.rsi"), "disposal"),
Act = () =>
@@ -196,7 +198,7 @@ public sealed partial class AdminVerbSystem
{
Verb hardElectrocute = new()
{
Text = "Electrocute",
Text = "admin-smite-creampie-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Clothing/Hands/Gloves/Color/yellow.rsi"), "icon"),
Act = () =>
@@ -241,7 +243,7 @@ public sealed partial class AdminVerbSystem
{
Verb creamPie = new()
{
Text = "Creampie",
Text = "admin-smite-remove-blood-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Consumable/Food/Baked/pie.rsi"), "plain-slice"),
Act = () =>
@@ -258,7 +260,7 @@ public sealed partial class AdminVerbSystem
{
Verb bloodRemoval = new()
{
Text = "Remove blood",
Text = "admin-smite-vomit-organs-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Fluids/tomato_splat.rsi"), "puddle-1"),
Act = () =>
@@ -281,7 +283,7 @@ public sealed partial class AdminVerbSystem
{
Verb vomitOrgans = new()
{
Text = "Vomit organs",
Text = "admin-smite-remove-hands-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Fluids/vomit_toxin.rsi"), "vomit_toxin-1"),
Act = () =>
@@ -309,7 +311,7 @@ public sealed partial class AdminVerbSystem
Verb handsRemoval = new()
{
Text = "Remove hands",
Text = "admin-smite-remove-hand-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/remove-hands.png")),
Act = () =>
@@ -331,7 +333,7 @@ public sealed partial class AdminVerbSystem
Verb handRemoval = new()
{
Text = "Remove hand",
Text = "admin-smite-pinball-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/remove-hand.png")),
Act = () =>
@@ -354,7 +356,7 @@ public sealed partial class AdminVerbSystem
Verb stomachRemoval = new()
{
Text = "Stomach Removal",
Text = "admin-smite-yeet-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Mobs/Species/Human/organs.rsi"), "stomach"),
Act = () =>
@@ -374,7 +376,7 @@ public sealed partial class AdminVerbSystem
Verb lungRemoval = new()
{
Text = "Lungs Removal",
Text = "admin-smite-become-bread-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Mobs/Species/Human/organs.rsi"), "lung-r"),
Act = () =>
@@ -397,7 +399,7 @@ public sealed partial class AdminVerbSystem
{
Verb pinball = new()
{
Text = "Pinball",
Text = "admin-smite-ghostkick-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Fun/toys.rsi"), "basketball"),
Act = () =>
@@ -431,7 +433,7 @@ public sealed partial class AdminVerbSystem
Verb yeet = new()
{
Text = "Yeet",
Text = "admin-smite-nyanify-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/eject.svg.192dpi.png")),
Act = () =>
@@ -462,7 +464,7 @@ public sealed partial class AdminVerbSystem
Verb bread = new()
{
Text = "Become Bread",
Text = "admin-smite-kill-sign-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Consumable/Food/Baked/bread.rsi"), "plain"),
Act = () =>
@@ -476,7 +478,7 @@ public sealed partial class AdminVerbSystem
Verb mouse = new()
{
Text = "Become Mouse",
Text = "admin-smite-cluwne-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Mobs/Animals/mouse.rsi"), "icon-0"),
Act = () =>
@@ -492,7 +494,7 @@ public sealed partial class AdminVerbSystem
{
Verb ghostKick = new()
{
Text = "Ghostkick",
Text = "admin-smite-anger-pointing-arrows-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/gavel.svg.192dpi.png")),
Act = () =>
@@ -508,7 +510,7 @@ public sealed partial class AdminVerbSystem
if (TryComp<InventoryComponent>(args.Target, out var inventory)) {
Verb nyanify = new()
{
Text = "Nyanify",
Text = "admin-smite-dust-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Clothing/Head/Hats/catears.rsi"), "icon"),
Act = () =>
@@ -525,7 +527,7 @@ public sealed partial class AdminVerbSystem
Verb killSign = new()
{
Text = "Kill sign",
Text = "admin-smite-buffering-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Misc/killsign.rsi"), "icon"),
Act = () =>
@@ -539,7 +541,7 @@ public sealed partial class AdminVerbSystem
Verb cluwne = new()
{
Text = "Cluwne",
Text = "admin-smite-become-instrument-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Clothing/Mask/cluwne.rsi"), "icon"),
@@ -555,7 +557,7 @@ public sealed partial class AdminVerbSystem
Verb maiden = new()
{
Text = "Maid",
Text = "admin-smite-remove-gravity-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Clothing/Uniforms/Jumpskirt/janimaid.rsi"), "icon"),
Act = () =>
@@ -575,7 +577,7 @@ public sealed partial class AdminVerbSystem
Verb angerPointingArrows = new()
{
Text = "Anger Pointing Arrows",
Text = "admin-smite-reptilian-species-swap-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Interface/Misc/pointing.rsi"), "pointing"),
Act = () =>
@@ -589,7 +591,7 @@ public sealed partial class AdminVerbSystem
Verb dust = new()
{
Text = "Dust",
Text = "admin-smite-locker-stuff-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Materials/materials.rsi"), "ash"),
Act = () =>
@@ -605,7 +607,7 @@ public sealed partial class AdminVerbSystem
Verb youtubeVideoSimulation = new()
{
Text = "Buffering",
Text = "admin-smite-headstand-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/Misc/buffering_smite_icon.png")),
Act = () =>
@@ -619,7 +621,7 @@ public sealed partial class AdminVerbSystem
Verb instrumentation = new()
{
Text = "Become Instrument",
Text = "admin-smite-become-mouse-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Fun/Instruments/h_synthesizer.rsi"), "icon"),
Act = () =>
@@ -633,7 +635,7 @@ public sealed partial class AdminVerbSystem
Verb noGravity = new()
{
Text = "Remove gravity",
Text = "admin-smite-maid-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Rsi(new("/Textures/Structures/Machines/gravity_generator.rsi"), "off"),
Act = () =>
@@ -650,7 +652,7 @@ public sealed partial class AdminVerbSystem
Verb reptilian = new()
{
Text = "Reptilian Species Swap",
Text = "admin-smite-zoom-in-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Fun/toys.rsi"), "plushie_lizard"),
Act = () =>
@@ -664,7 +666,7 @@ public sealed partial class AdminVerbSystem
Verb locker = new()
{
Text = "Locker stuff",
Text = "admin-smite-flip-eye-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Structures/Storage/closet.rsi"), "generic"),
Act = () =>
@@ -686,7 +688,7 @@ public sealed partial class AdminVerbSystem
Verb headstand = new()
{
Text = "Headstand",
Text = "admin-smite-run-walk-swap-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/refresh.svg.192dpi.png")),
Act = () =>
@@ -700,7 +702,7 @@ public sealed partial class AdminVerbSystem
Verb zoomIn = new()
{
Text = "Zoom in",
Text = "admin-smite-super-speed-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/zoom.png")),
Act = () =>
@@ -715,7 +717,7 @@ public sealed partial class AdminVerbSystem
Verb flipEye = new()
{
Text = "Flip eye",
Text = "admin-smite-stomach-removal-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/flip.png")),
Act = () =>
@@ -730,7 +732,7 @@ public sealed partial class AdminVerbSystem
Verb runWalkSwap = new()
{
Text = "Run Walk Swap",
Text = "admin-smite-speak-backwards-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/run-walk-swap.png")),
Act = () =>
@@ -750,7 +752,7 @@ public sealed partial class AdminVerbSystem
Verb backwardsAccent = new()
{
Text = "Speak Backwards",
Text = "admin-smite-lung-removal-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/help-backwards.png")),
Act = () =>
@@ -764,7 +766,7 @@ public sealed partial class AdminVerbSystem
Verb disarmProne = new()
{
Text = "Disarm Prone",
Text = "admin-smite-disarm-prone-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/Actions/disarm.png")),
Act = () =>
@@ -778,7 +780,7 @@ public sealed partial class AdminVerbSystem
Verb superSpeed = new()
{
Text = "Super speed",
Text = "admin-smite-garbage-can-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/super_speed.png")),
Act = () =>
@@ -797,7 +799,7 @@ public sealed partial class AdminVerbSystem
//Bonk
Verb superBonkLite = new()
{
Text = "Super Bonk Lite",
Text = "admin-smite-super-bonk-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Rsi(new("Structures/Furniture/Tables/glass.rsi"), "full"),
Act = () =>
@@ -810,7 +812,7 @@ public sealed partial class AdminVerbSystem
args.Verbs.Add(superBonkLite);
Verb superBonk= new()
{
Text = "Super Bonk",
Text = "admin-smite-super-bonk-lite-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Rsi(new("Structures/Furniture/Tables/generic.rsi"), "full"),
Act = () =>
@@ -821,5 +823,31 @@ public sealed partial class AdminVerbSystem
Impact = LogImpact.Extreme,
};
args.Verbs.Add(superBonk);
Verb superslip = new()
{
Text = "admin-smite-super-slip-name",
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Rsi(new("Objects/Specific/Janitorial/soap.rsi"), "omega-4"),
Act = () =>
{
var hadSlipComponent = EnsureComp(args.Target, out SlipperyComponent slipComponent);
if (!hadSlipComponent)
{
slipComponent.SuperSlippery = true;
slipComponent.ParalyzeTime = 5;
slipComponent.LaunchForwardsMultiplier = 20;
}
_slipperySystem.TrySlip(args.Target, slipComponent, args.Target, requiresContact: false);
if (!hadSlipComponent)
{
RemComp(args.Target, slipComponent);
}
},
Impact = LogImpact.Extreme,
Message = Loc.GetString("admin-smite-super-slip-description")
};
args.Verbs.Add(superslip);
}
}