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);
}
}

View File

@@ -67,7 +67,7 @@ public sealed class SlipperySystem : EntitySystem
&& _statusEffects.CanApplyEffect(toSlip, "Stun"); //Should be KnockedDown instead?
}
private void TrySlip(EntityUid uid, SlipperyComponent component, EntityUid other)
public void TrySlip(EntityUid uid, SlipperyComponent component, EntityUid other, bool requiresContact = true)
{
if (HasComp<KnockedDownComponent>(other) && !component.SuperSlippery)
return;
@@ -89,7 +89,7 @@ public sealed class SlipperySystem : EntitySystem
{
_physics.SetLinearVelocity(other, physics.LinearVelocity * component.LaunchForwardsMultiplier, body: physics);
if (component.SuperSlippery)
if (component.SuperSlippery && requiresContact)
{
var sliding = EnsureComp<SlidingComponent>(other);
sliding.CollidingEntities.Add(uid);

View File

@@ -14,6 +14,48 @@ admin-smite-run-walk-swap-prompt = You have to press shift to run!
admin-smite-super-speed-prompt = You move at mach 0.8!
admin-smite-lung-removal-self = You can't breathe!
## Smite names
admin-smite-explode-name = Explode
admin-smite-chess-dimension-name = Chess Dimension
admin-smite-set-alight-name = Set Alight
admin-smite-monkeyify-name = Monkeyify
admin-smite-electrocute-name = Garbage Can
admin-smite-creampie-name = Electrocute
admin-smite-remove-blood-name = Creampie
admin-smite-vomit-organs-name = Remove blood
admin-smite-remove-hands-name = Vomit organs
admin-smite-remove-hand-name = Remove hands
admin-smite-pinball-name = Remove hand
admin-smite-yeet-name = Stomach Removal
admin-smite-become-bread-name = Lungs Removal
admin-smite-ghostkick-name = Pinball
admin-smite-nyanify-name = Yeet
admin-smite-kill-sign-name = Become Bread
admin-smite-cluwne-name = Become Mouse
admin-smite-anger-pointing-arrows-name = Ghostkick
admin-smite-dust-name = Nyanify
admin-smite-buffering-name = Kill sign
admin-smite-become-instrument-name = Cluwne
admin-smite-remove-gravity-name = Maid
admin-smite-reptilian-species-swap-name = Anger Pointing Arrows
admin-smite-locker-stuff-name = Dust
admin-smite-headstand-name = Buffering
admin-smite-become-mouse-name = Become Instrument
admin-smite-maid-name = Remove gravity
admin-smite-zoom-in-name = Reptilian Species Swap
admin-smite-flip-eye-name = Locker stuff
admin-smite-run-walk-swap-name = Headstand
admin-smite-super-speed-name = Zoom in
admin-smite-stomach-removal-name = Flip eye
admin-smite-speak-backwards-name = Run Walk Swap
admin-smite-lung-removal-name = Speak Backwards
admin-smite-disarm-prone-name = Disarm Prone
admin-smite-garbage-can-name = Super speed
admin-smite-super-bonk-name = Super Bonk Lite
admin-smite-super-bonk-lite-name = Super Bonk
admin-smite-terminate-name = Terminate
admin-smite-super-slip-name = Super Slip
## Smite descriptions
@@ -21,12 +63,12 @@ admin-smite-explode-description = Explode them.
admin-smite-chess-dimension-description = Banishment to the Chess Dimension.
admin-smite-set-alight-description = Makes them burn.
admin-smite-monkeyify-description = Turns the target into a monkey.
admin-smite-lung-cancer-description = Stage IIIA Lung Cancer, for when they really like the hit show Breaking Bad.
admin-smite-electrocute-description = Electrocutes them, rendering anything they were wearing useless.
admin-smite-creampie-description = A creampie, condensed into a button.
admin-smite-remove-blood-description = Removes all of their blood, messily.
admin-smite-vomit-organs-description = Causes them to vomit, organs included.
admin-smite-remove-hands-description = Removes their hands.
admin-smite-remove-hand-description = Removes only one of their hands instead of all of them.
admin-smite-pinball-description = Turns them into a super bouncy ball, flinging them around until they clip through the station into the abyss.
admin-smite-yeet-description = Banishes them into the depths of space by turning on no-clip and tossing them.
admin-smite-become-bread-description = It turns them into bread. Really, that's all it does.
@@ -42,7 +84,6 @@ admin-smite-remove-gravity-description = Grants them anti-gravity.
admin-smite-reptilian-species-swap-description = It changes their species to Reptilian. Useful for people who were being space racist.
admin-smite-locker-stuff-description = Stuffs them in a (welded) locker.
admin-smite-headstand-description = Vertically flips their sprite.
admin-smite-plasma-internals-description = Replaces the contents of their internals with plasma.
admin-smite-become-mouse-description = They become a mouse. Squeak!
admin-smite-maid-description = Forcibly converts them into a janitorial cat maid. This is actual torture for some players, use it wisely.
admin-smite-zoom-in-description = Zooms in their view so that they can no longer see their surroundings.
@@ -52,11 +93,12 @@ admin-smite-super-speed-description = Makes them really fast, causing them to tu
admin-smite-stomach-removal-description = Removes their stomach, rendering them unable to eat.
admin-smite-speak-backwards-description = Forces them to speak backwards, so they can't call for help.
admin-smite-lung-removal-description = Removes their lungs, drowning them.
admin-smite-remove-hand-description = Removes only one of their hands instead of all of them.
admin-smite-disarm-prone-description = Makes them get disarmed 100% of the time and cuffed instantly.
admin-smite-garbage-can-description = Turn them into a garbage bin to emphasize what they remind you of.
admin-smite-super-bonk-description = Slams them on every single table on the Station and beyond.
admin-smite-super-bonk-lite-description= Slams them on every single table on the Station and beyond. Stops when the target is dead.
admin-smite-terminate-description = Creates a Terminator ghost role with the sole objective of killing them.
admin-smite-super-slip-description = Slips them really, really hard.
## Tricks descriptions