Fix rsi sprite access for verbs (#14284)

This commit is contained in:
metalgearsloth
2023-02-26 18:48:57 +11:00
committed by GitHub
parent a6d0c9b129
commit 44fb8a9e2d
53 changed files with 313 additions and 271 deletions

View File

@@ -6,6 +6,7 @@ using Content.Shared.Database;
using Content.Shared.Verbs;
using Robust.Server.GameObjects;
using Robust.Shared.Configuration;
using Robust.Shared.Utility;
namespace Content.Server.Administration.Systems;
@@ -35,7 +36,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Make Traitor",
Category = VerbCategory.Antag,
IconTexture = "/Textures/Structures/Wallmounts/posters.rsi/poster5_contraband.png",
Icon = new SpriteSpecifier.Rsi((new ResourcePath("/Textures/Structures/Wallmounts/posters.rsi")), "poster5_contraband"),
Act = () =>
{
if (targetMindComp.Mind == null || targetMindComp.Mind.Session == null)
@@ -52,7 +53,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Make Zombie",
Category = VerbCategory.Antag,
IconTexture = "/Textures/Structures/Wallmounts/signs.rsi/bio.png",
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Structures/Wallmounts/signs.rsi"), "bio"),
Act = () =>
{
TryComp(args.Target, out MindComponent? mindComp);
@@ -71,7 +72,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Make nuclear operative",
Category = VerbCategory.Antag,
IconTexture = "/Textures/Structures/Wallmounts/signs.rsi/radiation.png",
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Structures/Wallmounts/signs.rsi"), "radiation"),
Act = () =>
{
if (targetMindComp.Mind == null || targetMindComp.Mind.Session == null)
@@ -88,7 +89,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Make Pirate",
Category = VerbCategory.Antag,
IconTexture = "/Textures/Clothing/Head/Hats/pirate.rsi/icon.png",
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Clothing/Head/Hats/pirate.rsi"), "icon"),
Act = () =>
{
if (targetMindComp.Mind == null || targetMindComp.Mind.Session == null)

View File

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

View File

@@ -36,6 +36,7 @@ using Robust.Shared.Map.Components;
using Robust.Shared.Physics;
using Robust.Shared.Physics.Components;
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
namespace Content.Server.Administration.Systems;
@@ -68,9 +69,9 @@ public sealed partial class AdminVerbSystem
{
Text = airlock.BoltsDown ? "Unbolt" : "Bolt",
Category = VerbCategory.Tricks,
IconTexture = airlock.BoltsDown
? "/Textures/Interface/AdminActions/unbolt.png"
: "/Textures/Interface/AdminActions/bolt.png",
Icon = airlock.BoltsDown
? new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/unbolt.png"))
: new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/bolt.png")),
Act = () =>
{
_airlockSystem.SetBoltsWithAudio(args.Target, airlock, !airlock.BoltsDown);
@@ -88,7 +89,7 @@ public sealed partial class AdminVerbSystem
{
Text = airlock.EmergencyAccess ? "Emergency Access Off" : "Emergency Access On",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Interface/AdminActions/emergency_access.png",
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/emergency_access.png")),
Act = () =>
{
_airlockSystem.ToggleEmergencyAccess(args.Target, airlock);
@@ -110,7 +111,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Rejuvenate",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Interface/AdminActions/rejuvenate.png",
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/rejuvenate.png")),
Act = () =>
{
RejuvenateCommand.PerformRejuvenate(args.Target);
@@ -128,7 +129,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Make Indestructible",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Interface/VerbIcons/plus.svg.192dpi.png",
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/plus.svg.192dpi.png")),
Act = () =>
{
_godmodeSystem.EnableGodmode(args.Target);
@@ -145,7 +146,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Make Vulnerable",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Interface/VerbIcons/plus.svg.192dpi.png",
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/plus.svg.192dpi.png")),
Act = () =>
{
_godmodeSystem.DisableGodmode(args.Target);
@@ -163,7 +164,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Refill Battery",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Interface/AdminActions/fill_battery.png",
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/fill_battery.png")),
Act = () =>
{
battery.CurrentCharge = battery.MaxCharge;
@@ -179,7 +180,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Drain Battery",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Interface/AdminActions/drain_battery.png",
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/drain_battery.png")),
Act = () =>
{
battery.CurrentCharge = 0;
@@ -195,7 +196,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Infinite Battery",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Interface/AdminActions/infinite_battery.png",
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/infinite_battery.png")),
Act = () =>
{
var recharger = EnsureComp<BatterySelfRechargerComponent>(args.Target);
@@ -215,7 +216,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Block Unanchoring",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Interface/VerbIcons/anchor.svg.192dpi.png",
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/anchor.svg.192dpi.png")),
Act = () =>
{
RemComp(args.Target, anchor);
@@ -233,7 +234,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Refill Internals Oxygen",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Objects/Tanks/oxygen.rsi/icon.png",
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Tanks/oxygen.rsi"), "icon"),
Act = () =>
{
RefillGasTank(args.Target, Gas.Oxygen, tank);
@@ -248,7 +249,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Refill Internals Nitrogen",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Objects/Tanks/red.rsi/icon.png",
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Tanks/red.rsi"), "icon"),
Act = () =>
{
RefillGasTank(args.Target, Gas.Nitrogen, tank);
@@ -263,7 +264,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Refill Internals Plasma",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Objects/Tanks/plasma.rsi/icon.png",
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Tanks/plasma.rsi"), "icon"),
Act = () =>
{
RefillGasTank(args.Target, Gas.Plasma, tank);
@@ -275,13 +276,13 @@ public sealed partial class AdminVerbSystem
args.Verbs.Add(refillInternalsPlasma);
}
if (TryComp<InventoryComponent>(args.Target, out var inventory))
if (HasComp<InventoryComponent>(args.Target))
{
Verb refillInternalsO2 = new()
{
Text = "Refill Internals Oxygen",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Objects/Tanks/oxygen.rsi/icon.png",
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Tanks/oxygen.rsi"), "icon"),
Act = () =>
{
foreach (var slot in _inventorySystem.GetSlots(args.Target))
@@ -289,7 +290,7 @@ public sealed partial class AdminVerbSystem
if (!_inventorySystem.TryGetSlotEntity(args.Target, slot.Name, out var entity))
continue;
if (!TryComp<GasTankComponent>(entity, out var tank))
if (!TryComp(entity, out tank))
continue;
RefillGasTank(entity.Value, Gas.Oxygen, tank);
@@ -297,7 +298,7 @@ public sealed partial class AdminVerbSystem
foreach (var held in _handsSystem.EnumerateHeld(args.Target))
{
if (!TryComp<GasTankComponent>(held, out var tank))
if (!TryComp(held, out tank))
continue;
RefillGasTank(held, Gas.Oxygen, tank);
@@ -313,7 +314,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Refill Internals Nitrogen",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Objects/Tanks/red.rsi/icon.png",
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Tanks/red.rsi"), "icon"),
Act = () =>
{
foreach (var slot in _inventorySystem.GetSlots(args.Target))
@@ -321,7 +322,7 @@ public sealed partial class AdminVerbSystem
if (!_inventorySystem.TryGetSlotEntity(args.Target, slot.Name, out var entity))
continue;
if (!TryComp<GasTankComponent>(entity, out var tank))
if (!TryComp(entity, out tank))
continue;
RefillGasTank(entity.Value, Gas.Nitrogen, tank);
@@ -329,7 +330,7 @@ public sealed partial class AdminVerbSystem
foreach (var held in _handsSystem.EnumerateHeld(args.Target))
{
if (!TryComp<GasTankComponent>(held, out var tank))
if (!TryComp(held, out tank))
continue;
RefillGasTank(held, Gas.Nitrogen, tank);
@@ -345,7 +346,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Refill Internals Plasma",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Objects/Tanks/plasma.rsi/icon.png",
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Tanks/plasma.rsi"), "icon"),
Act = () =>
{
foreach (var slot in _inventorySystem.GetSlots(args.Target))
@@ -353,7 +354,7 @@ public sealed partial class AdminVerbSystem
if (!_inventorySystem.TryGetSlotEntity(args.Target, slot.Name, out var entity))
continue;
if (!TryComp<GasTankComponent>(entity, out var tank))
if (!TryComp(entity, out tank))
continue;
RefillGasTank(entity.Value, Gas.Plasma, tank);
@@ -361,7 +362,7 @@ public sealed partial class AdminVerbSystem
foreach (var held in _handsSystem.EnumerateHeld(args.Target))
{
if (!TryComp<GasTankComponent>(held, out var tank))
if (!TryComp(held, out tank))
continue;
RefillGasTank(held, Gas.Plasma, tank);
@@ -378,7 +379,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Send to test arena",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Interface/VerbIcons/eject.svg.192dpi.png",
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/eject.svg.192dpi.png")),
Act = () =>
{
@@ -399,7 +400,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Grant All Access",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Objects/Misc/id_cards.rsi/centcom.png",
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Misc/id_cards.rsi"), "centcom"),
Act = () =>
{
GiveAllAccess(activeId.Value);
@@ -414,7 +415,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Revoke All Access",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Objects/Misc/id_cards.rsi/default.png",
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Misc/id_cards.rsi"), "default"),
Act = () =>
{
RevokeAllAccess(activeId.Value);
@@ -432,7 +433,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Grant All Access",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Objects/Misc/id_cards.rsi/centcom.png",
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Misc/id_cards.rsi"), "centcom"),
Act = () =>
{
GiveAllAccess(args.Target);
@@ -447,7 +448,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Revoke All Access",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Objects/Misc/id_cards.rsi/default.png",
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Misc/id_cards.rsi"), "default"),
Act = () =>
{
RevokeAllAccess(args.Target);
@@ -466,7 +467,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Adjust Stack",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Interface/AdminActions/adjust-stack.png",
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/adjust-stack.png")),
Act = () =>
{
// Unbounded intentionally.
@@ -485,7 +486,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Fill Stack",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Interface/AdminActions/fill-stack.png",
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/fill-stack.png")),
Act = () =>
{
_stackSystem.SetCount(args.Target, _stackSystem.GetMaxCount(stack), stack);
@@ -501,7 +502,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Rename",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Interface/AdminActions/rename.png",
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/rename.png")),
Act = () =>
{
_quickDialog.OpenDialog(player, "Rename", "Name", (string newName) =>
@@ -519,7 +520,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Redescribe",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Interface/AdminActions/redescribe.png",
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/redescribe.png")),
Act = () =>
{
_quickDialog.OpenDialog(player, "Redescribe", "Description", (LongString newDescription) =>
@@ -537,7 +538,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Redescribe",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Interface/AdminActions/rename_and_redescribe.png",
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/rename_and_redescribe.png")),
Act = () =>
{
_quickDialog.OpenDialog(player, "Rename & Redescribe", "Name", "Description",
@@ -562,7 +563,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Bar job slots",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Interface/AdminActions/bar_jobslots.png",
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/bar_jobslots.png")),
Act = () =>
{
foreach (var (job, _) in _stationJobsSystem.GetJobs(args.Target))
@@ -581,7 +582,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Locate Cargo Shuttle",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Clothing/Head/Soft/cargosoft.rsi/icon.png",
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Clothing/Head/Soft/cargosoft.rsi"), "icon"),
Act = () =>
{
var shuttle = Comp<StationCargoOrderDatabaseComponent>(args.Target).Shuttle;
@@ -604,7 +605,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Refill Battery",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Interface/AdminActions/fill_battery.png",
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/fill_battery.png")),
Act = () =>
{
foreach (var ent in childEnum)
@@ -626,7 +627,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Drain Battery",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Interface/AdminActions/drain_battery.png",
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/drain_battery.png")),
Act = () =>
{
foreach (var ent in childEnum)
@@ -648,7 +649,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Infinite Battery",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Interface/AdminActions/infinite_battery.png",
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/infinite_battery.png")),
Act = () =>
{
// this kills the sloth
@@ -677,7 +678,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Halt Movement",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Interface/AdminActions/halt.png",
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/halt.png")),
Act = () =>
{
_physics.SetLinearVelocity(args.Target, Vector2.Zero, body: physics);
@@ -700,7 +701,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Unpause Map",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Interface/AdminActions/play.png",
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/play.png")),
Act = () =>
{
_mapManager.SetMapPaused(map.WorldMap, false);
@@ -717,7 +718,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Pause Map",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Interface/AdminActions/pause.png",
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/pause.png")),
Act = () =>
{
_mapManager.SetMapPaused(map.WorldMap, true);
@@ -737,7 +738,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Snap Joints",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Interface/AdminActions/snap_joints.png",
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/snap_joints.png")),
Act = () =>
{
_jointSystem.ClearJoints(joints);
@@ -755,7 +756,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Make Minigun",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Objects/Weapons/Guns/HMGs/minigun.rsi/icon.png",
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Weapons/Guns/HMGs/minigun.rsi"), "icon"),
Act = () =>
{
gun.FireRate = 15;
@@ -773,7 +774,7 @@ public sealed partial class AdminVerbSystem
{
Text = "Set Bullet Amount",
Category = VerbCategory.Tricks,
IconTexture = "/Textures/Objects/Fun/caps.rsi/mag-6.png",
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Objects/Fun/caps.rsi"), "mag-6"),
Act = () =>
{
_quickDialog.OpenDialog(player, "Set Bullet Amount", $"Amount (max {ballisticAmmo.Capacity}):", (int amount) =>

View File

@@ -29,6 +29,7 @@ using Robust.Shared.Console;
using Robust.Shared.Map;
using Robust.Shared.Prototypes;
using Robust.Shared.Timing;
using Robust.Shared.Utility;
using static Content.Shared.Configurable.ConfigurationComponent;
namespace Content.Server.Administration.Systems
@@ -79,7 +80,7 @@ namespace Content.Server.Administration.Systems
Verb verb = new();
verb.Text = Loc.GetString("ahelp-verb-get-data-text");
verb.Category = VerbCategory.Admin;
verb.IconTexture = "/Textures/Interface/gavel.svg.192dpi.png";
verb.Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/gavel.svg.192dpi.png"));
verb.Act = () =>
_console.RemoteExecuteCommand(player, $"openahelp \"{targetActor.PlayerSession.UserId}\"");
verb.Impact = LogImpact.Low;
@@ -89,7 +90,7 @@ namespace Content.Server.Administration.Systems
Verb prayerVerb = new();
prayerVerb.Text = Loc.GetString("prayer-verbs-subtle-message");
prayerVerb.Category = VerbCategory.Admin;
prayerVerb.IconTexture = "/Textures/Interface/pray.svg.png";
prayerVerb.Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/pray.svg.png"));
prayerVerb.Act = () =>
{
_quickDialog.OpenDialog(player, "Subtle Message", "Message", "Popup Message", (string message, string popupMessage) =>
@@ -109,7 +110,7 @@ namespace Content.Server.Administration.Systems
? Loc.GetString("admin-verbs-unfreeze")
: Loc.GetString("admin-verbs-freeze"),
Category = VerbCategory.Admin,
IconTexture = "/Textures/Interface/VerbIcons/snow.svg.192dpi.png",
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/snow.svg.192dpi.png")),
Act = () =>
{
if (frozen)
@@ -145,7 +146,7 @@ namespace Content.Server.Administration.Systems
{
Text = Loc.GetString("admin-verbs-teleport-to"),
Category = VerbCategory.Admin,
IconTexture = "/Textures/Interface/VerbIcons/open.svg.192dpi.png",
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/open.svg.192dpi.png")),
Act = () => _console.ExecuteCommand(player, $"tpto {args.Target}"),
Impact = LogImpact.Low
});
@@ -155,7 +156,7 @@ namespace Content.Server.Administration.Systems
{
Text = Loc.GetString("admin-verbs-teleport-here"),
Category = VerbCategory.Admin,
IconTexture = "/Textures/Interface/VerbIcons/close.svg.192dpi.png",
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/close.svg.192dpi.png")),
Act = () => _console.ExecuteCommand(player, $"tpto {args.Target} {args.User}"),
Impact = LogImpact.Low
});
@@ -194,7 +195,7 @@ namespace Content.Server.Administration.Systems
{
Text = Loc.GetString("delete-verb-get-data-text"),
Category = VerbCategory.Debug,
IconTexture = "/Textures/Interface/VerbIcons/delete_transparent.svg.192dpi.png",
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/delete_transparent.svg.192dpi.png")),
Act = () => EntityManager.DeleteEntity(args.Target),
Impact = LogImpact.Medium,
ConfirmationPopup = true
@@ -209,7 +210,7 @@ namespace Content.Server.Administration.Systems
{
Text = Loc.GetString("rejuvenate-verb-get-data-text"),
Category = VerbCategory.Debug,
IconTexture = "/Textures/Interface/VerbIcons/rejuvenate.svg.192dpi.png",
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/rejuvenate.svg.192dpi.png")),
Act = () => RejuvenateCommand.PerformRejuvenate(args.Target),
Impact = LogImpact.Medium
};
@@ -268,7 +269,7 @@ namespace Content.Server.Administration.Systems
{
Text = Loc.GetString("make-sentient-verb-get-data-text"),
Category = VerbCategory.Debug,
IconTexture = "/Textures/Interface/VerbIcons/sentient.svg.192dpi.png",
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/sentient.svg.192dpi.png")),
Act = () => MakeSentientCommand.MakeSentient(args.Target, EntityManager),
Impact = LogImpact.Medium
};
@@ -283,7 +284,7 @@ namespace Content.Server.Administration.Systems
{
Text = Loc.GetString("set-outfit-verb-get-data-text"),
Category = VerbCategory.Debug,
IconTexture = "/Textures/Interface/VerbIcons/outfit.svg.192dpi.png",
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/outfit.svg.192dpi.png")),
Act = () => _euiManager.OpenEui(new SetOutfitEui(args.Target), player),
Impact = LogImpact.Medium
};
@@ -297,7 +298,7 @@ namespace Content.Server.Administration.Systems
{
Text = Loc.GetString("in-range-unoccluded-verb-get-data-text"),
Category = VerbCategory.Debug,
IconTexture = "/Textures/Interface/VerbIcons/information.svg.192dpi.png",
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/information.svg.192dpi.png")),
Act = () =>
{
var message = args.User.InRangeUnOccluded(args.Target)
@@ -317,7 +318,7 @@ namespace Content.Server.Administration.Systems
{
Text = Loc.GetString("tube-direction-verb-get-data-text"),
Category = VerbCategory.Debug,
IconTexture = "/Textures/Interface/VerbIcons/information.svg.192dpi.png",
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/information.svg.192dpi.png")),
Act = () => tube.PopupDirections(args.User)
};
args.Verbs.Add(verb);
@@ -343,7 +344,7 @@ namespace Content.Server.Administration.Systems
Verb verb = new()
{
Text = Loc.GetString("configure-verb-get-data-text"),
IconTexture = "/Textures/Interface/VerbIcons/settings.svg.192dpi.png",
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/settings.svg.192dpi.png")),
Category = VerbCategory.Debug,
Act = () => _uiSystem.TryOpen(args.Target, ConfigurationUiKey.Key, actor.PlayerSession)
};
@@ -358,7 +359,7 @@ namespace Content.Server.Administration.Systems
{
Text = Loc.GetString("edit-solutions-verb-get-data-text"),
Category = VerbCategory.Debug,
IconTexture = "/Textures/Interface/VerbIcons/spill.svg.192dpi.png",
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/spill.svg.192dpi.png")),
Act = () => OpenEditSolutionsEui(player, args.Target),
Impact = LogImpact.Medium // maybe high depending on WHAT reagents they add...
};