Merge remote-tracking branch 'upstream/stable' into ed-29-09-2025-upstream
# Conflicts: # .github/CODEOWNERS # Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs # Content.Server/IdentityManagement/IdentitySystem.cs # Content.Server/Players/PlayTimeTracking/PlayTimeTrackingSystem.cs
This commit is contained in:
@@ -11,10 +11,12 @@ using Content.Server.Nutrition.EntitySystems;
|
||||
using Content.Server.Pointing.Components;
|
||||
using Content.Server.Polymorph.Systems;
|
||||
using Content.Server.Popups;
|
||||
using Content.Server.Roles;
|
||||
using Content.Server.Speech.Components;
|
||||
using Content.Server.Storage.EntitySystems;
|
||||
using Content.Server.Tabletop;
|
||||
using Content.Server.Tabletop.Components;
|
||||
using Content.Shared.Actions;
|
||||
using Content.Shared.Administration;
|
||||
using Content.Shared.Administration.Components;
|
||||
using Content.Shared.Atmos.Components;
|
||||
@@ -36,7 +38,10 @@ using Content.Shared.Mobs.Systems;
|
||||
using Content.Shared.Movement.Components;
|
||||
using Content.Shared.Movement.Systems;
|
||||
using Content.Shared.Nutrition.Components;
|
||||
using Content.Shared.Polymorph;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Silicons.Laws;
|
||||
using Content.Shared.Silicons.Laws.Components;
|
||||
using Content.Shared.Slippery;
|
||||
using Content.Shared.Storage.Components;
|
||||
using Content.Shared.Tabletop.Components;
|
||||
@@ -47,6 +52,7 @@ using Robust.Shared.Physics;
|
||||
using Robust.Shared.Physics.Components;
|
||||
using Robust.Shared.Physics.Systems;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Random;
|
||||
using Robust.Shared.Utility;
|
||||
using Timer = Robust.Shared.Timing.Timer;
|
||||
@@ -55,6 +61,10 @@ namespace Content.Server.Administration.Systems;
|
||||
|
||||
public sealed partial class AdminVerbSystem
|
||||
{
|
||||
private readonly ProtoId<PolymorphPrototype> LizardSmite = "AdminLizardSmite";
|
||||
private readonly ProtoId<PolymorphPrototype> VulpkaninSmite = "AdminVulpSmite";
|
||||
|
||||
[Dependency] private readonly SharedActionsSystem _actions = default!;
|
||||
[Dependency] private readonly IRobustRandom _random = default!;
|
||||
[Dependency] private readonly BloodstreamSystem _bloodstreamSystem = default!;
|
||||
[Dependency] private readonly BodySystem _bodySystem = default!;
|
||||
@@ -72,6 +82,7 @@ public sealed partial class AdminVerbSystem
|
||||
[Dependency] private readonly MobThresholdSystem _mobThresholdSystem = default!;
|
||||
[Dependency] private readonly PopupSystem _popupSystem = default!;
|
||||
[Dependency] private readonly SharedPhysicsSystem _physics = default!;
|
||||
[Dependency] private readonly RoleSystem _role = default!;
|
||||
[Dependency] private readonly TabletopSystem _tabletopSystem = default!;
|
||||
[Dependency] private readonly VomitSystem _vomitSystem = default!;
|
||||
[Dependency] private readonly WeldableSystem _weldableSystem = default!;
|
||||
@@ -80,6 +91,12 @@ public sealed partial class AdminVerbSystem
|
||||
[Dependency] private readonly SuperBonkSystem _superBonkSystem = default!;
|
||||
[Dependency] private readonly SlipperySystem _slipperySystem = default!;
|
||||
|
||||
private readonly EntProtoId _actionViewLawsProtoId = "ActionViewLaws";
|
||||
private readonly ProtoId<SiliconLawsetPrototype> _crewsimovLawset = "Crewsimov";
|
||||
|
||||
private readonly EntProtoId _siliconMindRole = "MindRoleSiliconBrain";
|
||||
private const string SiliconLawBoundUserInterface = "SiliconLawBoundUserInterface";
|
||||
|
||||
// All smite verbs have names so invokeverb works.
|
||||
private void AddSmiteVerbs(GetVerbsEvent<Verb> args)
|
||||
{
|
||||
@@ -100,7 +117,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = explodeName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/smite.svg.192dpi.png")),
|
||||
Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/smite.svg.192dpi.png")),
|
||||
Act = () =>
|
||||
{
|
||||
var coords = _transformSystem.GetMapCoordinates(args.Target);
|
||||
@@ -121,7 +138,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = chessName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Fun/Tabletop/chessboard.rsi"), "chessboard"),
|
||||
Icon = new SpriteSpecifier.Rsi(new("/Textures/Objects/Fun/Tabletop/chessboard.rsi"), "chessboard"),
|
||||
Act = () =>
|
||||
{
|
||||
_sharedGodmodeSystem.EnableGodmode(args.Target); // So they don't suffocate.
|
||||
@@ -150,7 +167,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = flamesName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/Alerts/Fire/fire.png")),
|
||||
Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/Alerts/Fire/fire.png")),
|
||||
Act = () =>
|
||||
{
|
||||
// Fuck you. Burn Forever.
|
||||
@@ -173,7 +190,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = monkeyName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Mobs/Animals/monkey.rsi"), "monkey"),
|
||||
Icon = new SpriteSpecifier.Rsi(new("/Textures/Mobs/Animals/monkey.rsi"), "monkey"),
|
||||
Act = () =>
|
||||
{
|
||||
_polymorphSystem.PolymorphEntity(args.Target, "AdminMonkeySmite");
|
||||
@@ -188,7 +205,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = disposalBinName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Structures/Piping/disposal.rsi"), "disposal"),
|
||||
Icon = new SpriteSpecifier.Rsi(new("/Textures/Structures/Piping/disposal.rsi"), "disposal"),
|
||||
Act = () =>
|
||||
{
|
||||
_polymorphSystem.PolymorphEntity(args.Target, "AdminDisposalsSmite");
|
||||
@@ -206,20 +223,21 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = hardElectrocuteName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Clothing/Hands/Gloves/Color/yellow.rsi"), "icon"),
|
||||
Icon = new SpriteSpecifier.Rsi(new("/Textures/Clothing/Hands/Gloves/Color/yellow.rsi"), "icon"),
|
||||
Act = () =>
|
||||
{
|
||||
int damageToDeal;
|
||||
if (!_mobThresholdSystem.TryGetThresholdForState(args.Target, MobState.Critical, out var criticalThreshold)) {
|
||||
if (!_mobThresholdSystem.TryGetThresholdForState(args.Target, MobState.Critical, out var criticalThreshold))
|
||||
{
|
||||
// We can't crit them so try killing them.
|
||||
if (!_mobThresholdSystem.TryGetThresholdForState(args.Target, MobState.Dead,
|
||||
out var deadThreshold))
|
||||
return;// whelp.
|
||||
damageToDeal = deadThreshold.Value.Int() - (int) damageable.TotalDamage;
|
||||
damageToDeal = deadThreshold.Value.Int() - (int)damageable.TotalDamage;
|
||||
}
|
||||
else
|
||||
{
|
||||
damageToDeal = criticalThreshold.Value.Int() - (int) damageable.TotalDamage;
|
||||
damageToDeal = criticalThreshold.Value.Int() - (int)damageable.TotalDamage;
|
||||
}
|
||||
|
||||
if (damageToDeal <= 0)
|
||||
@@ -252,7 +270,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = creamPieName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Consumable/Food/Baked/pie.rsi"), "plain-slice"),
|
||||
Icon = new SpriteSpecifier.Rsi(new("/Textures/Objects/Consumable/Food/Baked/pie.rsi"), "plain-slice"),
|
||||
Act = () =>
|
||||
{
|
||||
_creamPieSystem.SetCreamPied(args.Target, creamPied, true);
|
||||
@@ -270,7 +288,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = bloodRemovalName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Fluids/tomato_splat.rsi"), "puddle-1"),
|
||||
Icon = new SpriteSpecifier.Rsi(new("/Textures/Fluids/tomato_splat.rsi"), "puddle-1"),
|
||||
Act = () =>
|
||||
{
|
||||
_bloodstreamSystem.SpillAllSolutions((args.Target, bloodstream));
|
||||
@@ -323,7 +341,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = handsRemovalName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/remove-hands.png")),
|
||||
Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/AdminActions/remove-hands.png")),
|
||||
Act = () =>
|
||||
{
|
||||
var baseXform = Transform(args.Target);
|
||||
@@ -346,7 +364,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = handRemovalName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/remove-hand.png")),
|
||||
Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/AdminActions/remove-hand.png")),
|
||||
Act = () =>
|
||||
{
|
||||
var baseXform = Transform(args.Target);
|
||||
@@ -370,7 +388,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = stomachRemovalName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Mobs/Species/Human/organs.rsi"), "stomach"),
|
||||
Icon = new SpriteSpecifier.Rsi(new("/Textures/Mobs/Species/Human/organs.rsi"), "stomach"),
|
||||
Act = () =>
|
||||
{
|
||||
foreach (var entity in _bodySystem.GetBodyOrganEntityComps<StomachComponent>((args.Target, body)))
|
||||
@@ -391,7 +409,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = lungRemovalName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Mobs/Species/Human/organs.rsi"), "lung-r"),
|
||||
Icon = new SpriteSpecifier.Rsi(new("/Textures/Mobs/Species/Human/organs.rsi"), "lung-r"),
|
||||
Act = () =>
|
||||
{
|
||||
foreach (var entity in _bodySystem.GetBodyOrganEntityComps<LungComponent>((args.Target, body)))
|
||||
@@ -415,7 +433,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = pinballName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Fun/Balls/basketball.rsi"), "icon"),
|
||||
Icon = new SpriteSpecifier.Rsi(new("/Textures/Objects/Fun/Balls/basketball.rsi"), "icon"),
|
||||
Act = () =>
|
||||
{
|
||||
var xform = Transform(args.Target);
|
||||
@@ -450,7 +468,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = yeetName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/eject.svg.192dpi.png")),
|
||||
Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/eject.svg.192dpi.png")),
|
||||
Act = () =>
|
||||
{
|
||||
var xform = Transform(args.Target);
|
||||
@@ -482,7 +500,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = breadName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Consumable/Food/Baked/bread.rsi"), "plain"),
|
||||
Icon = new SpriteSpecifier.Rsi(new("/Textures/Objects/Consumable/Food/Baked/bread.rsi"), "plain"),
|
||||
Act = () =>
|
||||
{
|
||||
_polymorphSystem.PolymorphEntity(args.Target, "AdminBreadSmite");
|
||||
@@ -497,7 +515,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = mouseName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Mobs/Animals/mouse.rsi"), "icon-0"),
|
||||
Icon = new SpriteSpecifier.Rsi(new("/Textures/Mobs/Animals/mouse.rsi"), "icon-0"),
|
||||
Act = () =>
|
||||
{
|
||||
_polymorphSystem.PolymorphEntity(args.Target, "AdminMouseSmite");
|
||||
@@ -514,7 +532,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = ghostKickName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/gavel.svg.192dpi.png")),
|
||||
Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/gavel.svg.192dpi.png")),
|
||||
Act = () =>
|
||||
{
|
||||
_ghostKickManager.DoDisconnect(actorComponent.PlayerSession.Channel, "Smitten.");
|
||||
@@ -533,7 +551,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = nyanifyName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Clothing/Head/Hats/catears.rsi"), "icon"),
|
||||
Icon = new SpriteSpecifier.Rsi(new("/Textures/Clothing/Head/Hats/catears.rsi"), "icon"),
|
||||
Act = () =>
|
||||
{
|
||||
var ears = Spawn("ClothingHeadHatCatEars", Transform(args.Target).Coordinates);
|
||||
@@ -551,7 +569,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = killSignName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Misc/killsign.rsi"), "icon"),
|
||||
Icon = new SpriteSpecifier.Rsi(new("/Textures/Objects/Misc/killsign.rsi"), "icon"),
|
||||
Act = () =>
|
||||
{
|
||||
EnsureComp<KillSignComponent>(args.Target);
|
||||
@@ -567,7 +585,7 @@ public sealed partial class AdminVerbSystem
|
||||
Text = cluwneName,
|
||||
Category = VerbCategory.Smite,
|
||||
|
||||
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Clothing/Mask/cluwne.rsi"), "icon"),
|
||||
Icon = new SpriteSpecifier.Rsi(new("/Textures/Clothing/Mask/cluwne.rsi"), "icon"),
|
||||
|
||||
Act = () =>
|
||||
{
|
||||
@@ -583,7 +601,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = maidenName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Clothing/Uniforms/Jumpskirt/janimaid.rsi"), "icon"),
|
||||
Icon = new SpriteSpecifier.Rsi(new("/Textures/Clothing/Uniforms/Jumpskirt/janimaid.rsi"), "icon"),
|
||||
Act = () =>
|
||||
{
|
||||
_outfit.SetOutfit(args.Target, "JanitorMaidGear", (_, clothing) =>
|
||||
@@ -604,7 +622,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = angerPointingArrowsName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Interface/Misc/pointing.rsi"), "pointing"),
|
||||
Icon = new SpriteSpecifier.Rsi(new("/Textures/Interface/Misc/pointing.rsi"), "pointing"),
|
||||
Act = () =>
|
||||
{
|
||||
EnsureComp<PointingArrowAngeringComponent>(args.Target);
|
||||
@@ -619,7 +637,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = dustName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Materials/materials.rsi"), "ash"),
|
||||
Icon = new SpriteSpecifier.Rsi(new("/Textures/Objects/Materials/materials.rsi"), "ash"),
|
||||
Act = () =>
|
||||
{
|
||||
QueueDel(args.Target);
|
||||
@@ -636,7 +654,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = youtubeVideoSimulationName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/Misc/buffering_smite_icon.png")),
|
||||
Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/Misc/buffering_smite_icon.png")),
|
||||
Act = () =>
|
||||
{
|
||||
EnsureComp<BufferingComponent>(args.Target);
|
||||
@@ -651,7 +669,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = instrumentationName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Fun/Instruments/h_synthesizer.rsi"), "icon"),
|
||||
Icon = new SpriteSpecifier.Rsi(new("/Textures/Objects/Fun/Instruments/h_synthesizer.rsi"), "supersynth"),
|
||||
Act = () =>
|
||||
{
|
||||
_polymorphSystem.PolymorphEntity(args.Target, "AdminInstrumentSmite");
|
||||
@@ -689,22 +707,37 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = reptilianName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Fun/Plushies/lizard.rsi"), "icon"),
|
||||
Icon = new SpriteSpecifier.Rsi(new("/Textures/Objects/Fun/Plushies/lizard.rsi"), "icon"),
|
||||
Act = () =>
|
||||
{
|
||||
_polymorphSystem.PolymorphEntity(args.Target, "AdminLizardSmite");
|
||||
_polymorphSystem.PolymorphEntity(args.Target, LizardSmite);
|
||||
},
|
||||
Impact = LogImpact.Extreme,
|
||||
Message = string.Join(": ", reptilianName, Loc.GetString("admin-smite-reptilian-species-swap-description"))
|
||||
};
|
||||
args.Verbs.Add(reptilian);
|
||||
|
||||
var vulpName = Loc.GetString("admin-smite-vulpkanin-species-swap-name").ToLowerInvariant();
|
||||
Verb vulp = new()
|
||||
{
|
||||
Text = vulpName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Fun/Balls/tennisball.rsi"), "icon"),
|
||||
Act = () =>
|
||||
{
|
||||
_polymorphSystem.PolymorphEntity(args.Target, VulpkaninSmite);
|
||||
},
|
||||
Impact = LogImpact.Extreme,
|
||||
Message = string.Join(": ", vulpName, Loc.GetString("admin-smite-vulpkanin-species-swap-description"))
|
||||
};
|
||||
args.Verbs.Add(vulp);
|
||||
|
||||
var lockerName = Loc.GetString("admin-smite-locker-stuff-name").ToLowerInvariant();
|
||||
Verb locker = new()
|
||||
{
|
||||
Text = lockerName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Structures/Storage/closet.rsi"), "generic"),
|
||||
Icon = new SpriteSpecifier.Rsi(new("/Textures/Structures/Storage/closet.rsi"), "generic"),
|
||||
Act = () =>
|
||||
{
|
||||
var xform = Transform(args.Target);
|
||||
@@ -727,7 +760,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = headstandName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/refresh.svg.192dpi.png")),
|
||||
Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/refresh.svg.192dpi.png")),
|
||||
Act = () =>
|
||||
{
|
||||
EnsureComp<HeadstandComponent>(args.Target);
|
||||
@@ -742,7 +775,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = zoomInName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/zoom.png")),
|
||||
Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/AdminActions/zoom.png")),
|
||||
Act = () =>
|
||||
{
|
||||
var eye = EnsureComp<ContentEyeComponent>(args.Target);
|
||||
@@ -758,7 +791,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = flipEyeName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/flip.png")),
|
||||
Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/AdminActions/flip.png")),
|
||||
Act = () =>
|
||||
{
|
||||
var eye = EnsureComp<ContentEyeComponent>(args.Target);
|
||||
@@ -774,7 +807,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = runWalkSwapName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/run-walk-swap.png")),
|
||||
Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/AdminActions/run-walk-swap.png")),
|
||||
Act = () =>
|
||||
{
|
||||
var movementSpeed = EnsureComp<MovementSpeedModifierComponent>(args.Target);
|
||||
@@ -795,7 +828,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = backwardsAccentName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/help-backwards.png")),
|
||||
Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/AdminActions/help-backwards.png")),
|
||||
Act = () =>
|
||||
{
|
||||
EnsureComp<BackwardsAccentComponent>(args.Target);
|
||||
@@ -810,7 +843,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = disarmProneName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/Actions/disarm.png")),
|
||||
Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/Actions/disarm.png")),
|
||||
Act = () =>
|
||||
{
|
||||
EnsureComp<DisarmProneComponent>(args.Target);
|
||||
@@ -825,7 +858,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
Text = superSpeedName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/AdminActions/super_speed.png")),
|
||||
Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/AdminActions/super_speed.png")),
|
||||
Act = () =>
|
||||
{
|
||||
var movementSpeed = EnsureComp<MovementSpeedModifierComponent>(args.Target);
|
||||
@@ -942,5 +975,36 @@ public sealed partial class AdminVerbSystem
|
||||
Message = string.Join(": ", crawlerName, Loc.GetString("admin-smite-crawler-description"))
|
||||
};
|
||||
args.Verbs.Add(crawler);
|
||||
|
||||
var siliconName = Loc.GetString("admin-smite-silicon-laws-bound-name").ToLowerInvariant();
|
||||
Verb silicon = new()
|
||||
{
|
||||
Text = siliconName,
|
||||
Category = VerbCategory.Smite,
|
||||
Icon = new SpriteSpecifier.Rsi(new("Interface/Actions/actions_borg.rsi"), "state-laws"),
|
||||
Act = () =>
|
||||
{
|
||||
var userInterfaceComp = EnsureComp<UserInterfaceComponent>(args.Target);
|
||||
_uiSystem.SetUi((args.Target, userInterfaceComp), SiliconLawsUiKey.Key, new InterfaceData(SiliconLawBoundUserInterface));
|
||||
|
||||
if (!HasComp<SiliconLawBoundComponent>(args.Target))
|
||||
{
|
||||
EnsureComp<SiliconLawBoundComponent>(args.Target);
|
||||
_actions.AddAction(args.Target, _actionViewLawsProtoId);
|
||||
}
|
||||
|
||||
EnsureComp<SiliconLawProviderComponent>(args.Target);
|
||||
_siliconLawSystem.SetLaws(_siliconLawSystem.GetLawset(_crewsimovLawset).Laws, args.Target);
|
||||
|
||||
if (_mindSystem.TryGetMind(args.Target, out var mindId, out _))
|
||||
_role.MindAddRole(mindId, _siliconMindRole);
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString("admin-smite-silicon-laws-bound-self"), args.Target,
|
||||
args.Target, PopupType.LargeCaution);
|
||||
},
|
||||
Impact = LogImpact.Extreme,
|
||||
Message = string.Join(": ", siliconName, Loc.GetString("admin-smite-silicon-laws-bound-description"))
|
||||
};
|
||||
args.Verbs.Add(silicon);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user