Fix rsi sprite access for verbs (#14284)
This commit is contained in:
@@ -50,6 +50,7 @@ using Robust.Shared.Physics.Components;
|
||||
using Robust.Shared.Physics.Systems;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Random;
|
||||
using Robust.Shared.Utility;
|
||||
using Timer = Robust.Shared.Timing.Timer;
|
||||
|
||||
namespace Content.Server.Administration.Systems;
|
||||
@@ -71,7 +72,6 @@ public sealed partial class AdminVerbSystem
|
||||
[Dependency] private readonly InventorySystem _inventorySystem = default!;
|
||||
[Dependency] private readonly MovementSpeedModifierSystem _movementSpeedModifierSystem = default!;
|
||||
[Dependency] private readonly PolymorphableSystem _polymorphableSystem = default!;
|
||||
[Dependency] private readonly MobStateSystem _mobStateSystem = default!;
|
||||
[Dependency] private readonly MobThresholdSystem _mobThresholdSystem = default!;
|
||||
[Dependency] private readonly PopupSystem _popupSystem = default!;
|
||||
[Dependency] private readonly SharedPhysicsSystem _physics = default!;
|
||||
@@ -98,7 +98,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Explode",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Interface/VerbIcons/smite.svg.192dpi.png",
|
||||
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/smite.svg.192dpi.png")),
|
||||
Act = () =>
|
||||
{
|
||||
var coords = Transform(args.Target).MapPosition;
|
||||
@@ -118,7 +118,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Chess Dimension",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Objects/Fun/Tabletop/chessboard.rsi/chessboard.png",
|
||||
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Fun/Tabletop/chessboard.rsi"), "chessboard"),
|
||||
Act = () =>
|
||||
{
|
||||
_godmodeSystem.EnableGodmode(args.Target); // So they don't suffocate.
|
||||
@@ -146,7 +146,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Set Alight",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Interface/Alerts/Fire/fire.png",
|
||||
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/Alerts/Fire/fire.png")),
|
||||
Act = () =>
|
||||
{
|
||||
// Fuck you. Burn Forever.
|
||||
@@ -168,7 +168,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Monkeyify",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Mobs/Animals/monkey.rsi/dead.png",
|
||||
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Mobs/Animals/monkey.rsi"), "dead"),
|
||||
Act = () =>
|
||||
{
|
||||
_polymorphableSystem.PolymorphEntity(args.Target, "AdminMonkeySmite");
|
||||
@@ -182,7 +182,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Garbage Can",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Structures/Piping/disposal.rsi/disposal.png",
|
||||
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Structures/Piping/disposal.rsi"), "disposal"),
|
||||
Act = () =>
|
||||
{
|
||||
_polymorphableSystem.PolymorphEntity(args.Target, "AdminDisposalsSmite");
|
||||
@@ -198,7 +198,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Lung Cancer",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Mobs/Species/Human/organs.rsi/lung-l.png",
|
||||
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Mobs/Species/Human/organs.rsi"), "lung-l"),
|
||||
Act = () =>
|
||||
{
|
||||
_diseaseSystem.TryInfect(carrier, _prototypeManager.Index<DiseasePrototype>("StageIIIALungCancer"),
|
||||
@@ -211,13 +211,13 @@ public sealed partial class AdminVerbSystem
|
||||
}
|
||||
|
||||
if (TryComp<DamageableComponent>(args.Target, out var damageable) &&
|
||||
TryComp<MobStateComponent>(args.Target, out var mobState))
|
||||
HasComp<MobStateComponent>(args.Target))
|
||||
{
|
||||
Verb hardElectrocute = new()
|
||||
{
|
||||
Text = "Electrocute",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Clothing/Hands/Gloves/Color/yellow.rsi/icon.png",
|
||||
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Clothing/Hands/Gloves/Color/yellow.rsi"), "icon"),
|
||||
Act = () =>
|
||||
{
|
||||
int damageToDeal;
|
||||
@@ -262,7 +262,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Creampie",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Objects/Consumable/Food/Baked/pie.rsi/plain-slice.png",
|
||||
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Consumable/Food/Baked/pie.rsi"), "plain-slice"),
|
||||
Act = () =>
|
||||
{
|
||||
_creamPieSystem.SetCreamPied(args.Target, creamPied, true);
|
||||
@@ -279,7 +279,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Remove blood",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Fluids/tomato_splat.rsi/puddle-1.png",
|
||||
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Fluids/tomato_splat.rsi"), "puddle-1"),
|
||||
Act = () =>
|
||||
{
|
||||
_bloodstreamSystem.SpillAllSolutions(args.Target, bloodstream);
|
||||
@@ -302,7 +302,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Vomit organs",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Fluids/vomit_toxin.rsi/vomit_toxin-1.png",
|
||||
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Fluids/vomit_toxin.rsi"), "vomit_toxin-1"),
|
||||
Act = () =>
|
||||
{
|
||||
_vomitSystem.Vomit(args.Target, -1000, -1000); // You feel hollow!
|
||||
@@ -331,7 +331,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Remove hands",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Interface/AdminActions/remove-hands.png",
|
||||
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/remove-hands.png")),
|
||||
Act = () =>
|
||||
{
|
||||
var baseXform = Transform(args.Target);
|
||||
@@ -353,7 +353,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Remove hands",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Interface/AdminActions/remove-hand.png",
|
||||
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/remove-hand.png")),
|
||||
Act = () =>
|
||||
{
|
||||
var baseXform = Transform(args.Target);
|
||||
@@ -376,7 +376,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Stomach Removal",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Mobs/Species/Human/organs.rsi/stomach.png",
|
||||
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Mobs/Species/Human/organs.rsi"), "stomach"),
|
||||
Act = () =>
|
||||
{
|
||||
foreach (var (component, _) in _bodySystem.GetBodyOrganComponents<StomachComponent>(args.Target, body))
|
||||
@@ -396,7 +396,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Lungs Removal",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Mobs/Species/Human/organs.rsi/lung-r.png",
|
||||
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Mobs/Species/Human/organs.rsi"), "lung-r"),
|
||||
Act = () =>
|
||||
{
|
||||
foreach (var (component, _) in _bodySystem.GetBodyOrganComponents<LungComponent>(args.Target, body))
|
||||
@@ -419,7 +419,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Pinball",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Objects/Fun/toys.rsi/basketball.png",
|
||||
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Fun/toys.rsi"), "basketball"),
|
||||
Act = () =>
|
||||
{
|
||||
var xform = Transform(args.Target);
|
||||
@@ -453,7 +453,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Yeet",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Interface/VerbIcons/eject.svg.192dpi.png",
|
||||
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/eject.svg.192dpi.png")),
|
||||
Act = () =>
|
||||
{
|
||||
var xform = Transform(args.Target);
|
||||
@@ -484,7 +484,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Become Bread",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Objects/Consumable/Food/Baked/bread.rsi/plain.png",
|
||||
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Consumable/Food/Baked/bread.rsi"), "plain"),
|
||||
Act = () =>
|
||||
{
|
||||
_polymorphableSystem.PolymorphEntity(args.Target, "AdminBreadSmite");
|
||||
@@ -498,7 +498,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Become Mouse",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Mobs/Animals/mouse.rsi/icon-0.png",
|
||||
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Mobs/Animals/mouse.rsi"), "icon-0"),
|
||||
Act = () =>
|
||||
{
|
||||
_polymorphableSystem.PolymorphEntity(args.Target, "AdminMouseSmite");
|
||||
@@ -514,7 +514,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Ghostkick",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Interface/gavel.svg.192dpi.png",
|
||||
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/gavel.svg.192dpi.png")),
|
||||
Act = () =>
|
||||
{
|
||||
_ghostKickManager.DoDisconnect(actorComponent.PlayerSession.ConnectedClient, "Smitten.");
|
||||
@@ -530,7 +530,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Nyanify",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Clothing/Head/Hats/catears.rsi/icon.png",
|
||||
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Clothing/Head/Hats/catears.rsi"), "icon"),
|
||||
Act = () =>
|
||||
{
|
||||
var ears = Spawn("ClothingHeadHatCatEars", Transform(args.Target).Coordinates);
|
||||
@@ -547,7 +547,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Kill sign",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Objects/Misc/killsign.rsi/icon.png",
|
||||
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Misc/killsign.rsi"), "icon"),
|
||||
Act = () =>
|
||||
{
|
||||
EnsureComp<KillSignComponent>(args.Target);
|
||||
@@ -562,7 +562,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Clown",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Objects/Fun/bikehorn.rsi/icon.png",
|
||||
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Fun/bikehorn.rsi"), "icon"),
|
||||
Act = () =>
|
||||
{
|
||||
SetOutfitCommand.SetOutfit(args.Target, "ClownGear", EntityManager, (_, clothing) =>
|
||||
@@ -581,7 +581,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Maid",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Clothing/Uniforms/Jumpskirt/janimaid.rsi/icon.png",
|
||||
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Clothing/Uniforms/Jumpskirt/janimaid.rsi"), "icon"),
|
||||
Act = () =>
|
||||
{
|
||||
SetOutfitCommand.SetOutfit(args.Target, "JanitorMaidGear", EntityManager, (_, clothing) =>
|
||||
@@ -595,15 +595,13 @@ public sealed partial class AdminVerbSystem
|
||||
Message = Loc.GetString("admin-smite-maid-description")
|
||||
};
|
||||
args.Verbs.Add(maiden);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Verb angerPointingArrows = new()
|
||||
{
|
||||
Text = "Anger Pointing Arrows",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Interface/Misc/pointing.rsi/pointing.png",
|
||||
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Interface/Misc/pointing.rsi"), "pointing"),
|
||||
Act = () =>
|
||||
{
|
||||
EnsureComp<PointingArrowAngeringComponent>(args.Target);
|
||||
@@ -617,7 +615,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Dust",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Objects/Materials/materials.rsi/ash.png",
|
||||
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Materials/materials"), "ash"),
|
||||
Act = () =>
|
||||
{
|
||||
EntityManager.QueueDeleteEntity(args.Target);
|
||||
@@ -633,7 +631,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Buffering",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Interface/Misc/buffering_smite_icon.png",
|
||||
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/Misc/buffering_smite_icon.png")),
|
||||
Act = () =>
|
||||
{
|
||||
EnsureComp<BufferingComponent>(args.Target);
|
||||
@@ -647,7 +645,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Become Instrument",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Objects/Fun/Instruments/h_synthesizer.rsi/icon.png",
|
||||
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Fun/Instruments/h_synthesizer.rsi"), "icon"),
|
||||
Act = () =>
|
||||
{
|
||||
_polymorphableSystem.PolymorphEntity(args.Target, "AdminInstrumentSmite");
|
||||
@@ -661,7 +659,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Remove gravity",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Structures/Machines/gravity_generator.rsi/off.png",
|
||||
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Structures/Machines/gravity_generator.rsi"), "off"),
|
||||
Act = () =>
|
||||
{
|
||||
var grav = EnsureComp<MovementIgnoreGravityComponent>(args.Target);
|
||||
@@ -678,7 +676,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Reptilian Species Swap",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Objects/Fun/toys.rsi/plushie_lizard.png",
|
||||
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Fun/toys.rsi"), "plushie_lizard"),
|
||||
Act = () =>
|
||||
{
|
||||
_polymorphableSystem.PolymorphEntity(args.Target, "AdminLizardSmite");
|
||||
@@ -692,7 +690,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Locker stuff",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Structures/Storage/closet.rsi/generic.png",
|
||||
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Structures/Storage/closet.rsi"), "generic"),
|
||||
Act = () =>
|
||||
{
|
||||
var xform = Transform(args.Target);
|
||||
@@ -714,7 +712,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Headstand",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Interface/VerbIcons/refresh.svg.192dpi.png",
|
||||
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/refresh.svg.192dpi.png")),
|
||||
Act = () =>
|
||||
{
|
||||
EnsureComp<HeadstandComponent>(args.Target);
|
||||
@@ -728,7 +726,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Zoom in",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Interface/AdminActions/zoom.png",
|
||||
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/zoom.png")),
|
||||
Act = () =>
|
||||
{
|
||||
var eye = EnsureComp<EyeComponent>(args.Target);
|
||||
@@ -746,7 +744,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Flip eye",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Interface/AdminActions/flip.png",
|
||||
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/flip.png")),
|
||||
Act = () =>
|
||||
{
|
||||
var eye = EnsureComp<EyeComponent>(args.Target);
|
||||
@@ -764,7 +762,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Run Walk Swap",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Interface/AdminActions/run-walk-swap.png",
|
||||
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/run-walk-swap.png")),
|
||||
Act = () =>
|
||||
{
|
||||
var movementSpeed = EnsureComp<MovementSpeedModifierComponent>(args.Target);
|
||||
@@ -784,7 +782,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Speak Backwards",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Interface/AdminActions/help-backwards.png",
|
||||
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/help-backwards.png")),
|
||||
Act = () =>
|
||||
{
|
||||
EnsureComp<BackwardsAccentComponent>(args.Target);
|
||||
@@ -798,7 +796,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Disarm Prone",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Interface/Actions/disarm.png",
|
||||
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/Actions/disarm.png")),
|
||||
Act = () =>
|
||||
{
|
||||
EnsureComp<DisarmProneComponent>(args.Target);
|
||||
@@ -812,7 +810,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = "Super speed",
|
||||
Category = VerbCategory.Smite,
|
||||
IconTexture = "/Textures/Interface/AdminActions/super_speed.png",
|
||||
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/super_speed.png")),
|
||||
Act = () =>
|
||||
{
|
||||
var movementSpeed = EnsureComp<MovementSpeedModifierComponent>(args.Target);
|
||||
|
||||
Reference in New Issue
Block a user