Skip to content
This repository was archived by the owner on Dec 23, 2025. It is now read-only.

Commit 11b3740

Browse files
authored
Merge branch 'space-wizards:master' into master
2 parents e44e593 + 823c834 commit 11b3740

49 files changed

Lines changed: 560 additions & 335 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Content.Client/Bed/BedSystem.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
using Content.Shared.Bed;
2+
3+
namespace Content.Client.Bed;
4+
5+
public sealed class BedSystem : SharedBedSystem
6+
{
7+
8+
}

Content.Client/Materials/MaterialStorageSystem.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ public sealed class MaterialStorageSystem : SharedMaterialStorageSystem
77
{
88
[Dependency] private readonly AppearanceSystem _appearance = default!;
99
[Dependency] private readonly TransformSystem _transform = default!;
10+
[Dependency] private readonly SpriteSystem _sprite = default!;
1011

1112
public override void Initialize()
1213
{
@@ -20,23 +21,23 @@ private void OnAppearanceChange(EntityUid uid, MaterialStorageComponent componen
2021
if (args.Sprite == null)
2122
return;
2223

23-
if (!args.Sprite.LayerMapTryGet(MaterialStorageVisualLayers.Inserting, out var layer))
24+
if (!_sprite.LayerMapTryGet((uid, args.Sprite), MaterialStorageVisualLayers.Inserting, out var layer, false))
2425
return;
2526

2627
if (!_appearance.TryGetData<bool>(uid, MaterialStorageVisuals.Inserting, out var inserting, args.Component))
2728
return;
2829

2930
if (inserting && TryComp<InsertingMaterialStorageComponent>(uid, out var insertingComp))
3031
{
31-
args.Sprite.LayerSetAnimationTime(layer, 0f);
32+
_sprite.LayerSetAnimationTime((uid, args.Sprite), layer, 0f);
3233

33-
args.Sprite.LayerSetVisible(layer, true);
34+
_sprite.LayerSetVisible((uid, args.Sprite), layer, true);
3435
if (insertingComp.MaterialColor != null)
35-
args.Sprite.LayerSetColor(layer, insertingComp.MaterialColor.Value);
36+
_sprite.LayerSetColor((uid, args.Sprite), layer, insertingComp.MaterialColor.Value);
3637
}
3738
else
3839
{
39-
args.Sprite.LayerSetVisible(layer, false);
40+
_sprite.LayerSetVisible((uid, args.Sprite), layer, false);
4041
}
4142
}
4243

Content.Client/PowerCell/PowerChargerVisualizerSystem.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ namespace Content.Client.PowerCell;
55

66
public sealed class PowerChargerVisualizerSystem : VisualizerSystem<PowerChargerVisualsComponent>
77
{
8+
[Dependency] private readonly SpriteSystem _sprite = default!;
9+
810
protected override void OnAppearanceChange(EntityUid uid, PowerChargerVisualsComponent comp, ref AppearanceChangeEvent args)
911
{
1012
if (args.Sprite == null)
@@ -14,27 +16,26 @@ protected override void OnAppearanceChange(EntityUid uid, PowerChargerVisualsCom
1416
if (AppearanceSystem.TryGetData<bool>(uid, CellVisual.Occupied, out var occupied, args.Component) && occupied)
1517
{
1618
// TODO: don't throw if it doesn't have a full state
17-
args.Sprite.LayerSetState(PowerChargerVisualLayers.Base, comp.OccupiedState);
19+
_sprite.LayerSetRsiState((uid, args.Sprite), PowerChargerVisualLayers.Base, comp.OccupiedState);
1820
}
1921
else
2022
{
21-
args.Sprite.LayerSetState(PowerChargerVisualLayers.Base, comp.EmptyState);
23+
_sprite.LayerSetRsiState((uid, args.Sprite), PowerChargerVisualLayers.Base, comp.EmptyState);
2224
}
2325

2426
// Update lighting
2527
if (AppearanceSystem.TryGetData<CellChargerStatus>(uid, CellVisual.Light, out var status, args.Component)
26-
&& comp.LightStates.TryGetValue(status, out var lightState))
28+
&& comp.LightStates.TryGetValue(status, out var lightState))
2729
{
28-
args.Sprite.LayerSetState(PowerChargerVisualLayers.Light, lightState);
29-
args.Sprite.LayerSetVisible(PowerChargerVisualLayers.Light, true);
30+
_sprite.LayerSetRsiState((uid, args.Sprite), PowerChargerVisualLayers.Light, lightState);
31+
_sprite.LayerSetVisible((uid, args.Sprite), PowerChargerVisualLayers.Light, true);
3032
}
3133
else
32-
//
33-
args.Sprite.LayerSetVisible(PowerChargerVisualLayers.Light, false);
34+
_sprite.LayerSetVisible((uid, args.Sprite), PowerChargerVisualLayers.Light, false);
3435
}
3536
}
3637

37-
enum PowerChargerVisualLayers : byte
38+
public enum PowerChargerVisualLayers : byte
3839
{
3940
Base,
4041
Light,

Content.Client/Shuttles/ThrusterSystem.cs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
namespace Content.Client.Shuttles;
55

66
/// <summary>
7-
/// Handles making a thruster visibly turn on/emit an exhaust plume according to its state.
7+
/// Handles making a thruster visibly turn on/emit an exhaust plume according to its state.
88
/// </summary>
99
public sealed class ThrusterSystem : VisualizerSystem<ThrusterComponent>
1010
{
11+
[Dependency] private readonly SpriteSystem _sprite = default!;
12+
1113
/// <summary>
1214
/// Updates whether or not the thruster is visibly active/thrusting.
1315
/// </summary>
@@ -17,7 +19,7 @@ protected override void OnAppearanceChange(EntityUid uid, ThrusterComponent comp
1719
|| !AppearanceSystem.TryGetData<bool>(uid, ThrusterVisualState.State, out var state, args.Component))
1820
return;
1921

20-
args.Sprite.LayerSetVisible(ThrusterVisualLayers.ThrustOn, state);
22+
_sprite.LayerSetVisible((uid, args.Sprite), ThrusterVisualLayers.ThrustOn, state);
2123
SetThrusting(
2224
uid,
2325
state && AppearanceSystem.TryGetData<bool>(uid, ThrusterVisualState.Thrusting, out var thrusting, args.Component) && thrusting,
@@ -28,16 +30,16 @@ protected override void OnAppearanceChange(EntityUid uid, ThrusterComponent comp
2830
/// <summary>
2931
/// Sets whether or not the exhaust plume of the thruster is visible or not.
3032
/// </summary>
31-
private static void SetThrusting(EntityUid _, bool value, SpriteComponent sprite)
33+
private void SetThrusting(EntityUid uid, bool value, SpriteComponent sprite)
3234
{
33-
if (sprite.LayerMapTryGet(ThrusterVisualLayers.Thrusting, out var thrustingLayer))
35+
if (_sprite.LayerMapTryGet((uid, sprite), ThrusterVisualLayers.Thrusting, out var thrustingLayer, false))
3436
{
35-
sprite.LayerSetVisible(thrustingLayer, value);
37+
_sprite.LayerSetVisible((uid, sprite), thrustingLayer, value);
3638
}
3739

38-
if (sprite.LayerMapTryGet(ThrusterVisualLayers.ThrustingUnshaded, out var unshadedLayer))
40+
if (_sprite.LayerMapTryGet((uid, sprite), ThrusterVisualLayers.ThrustingUnshaded, out var unshadedLayer, false))
3941
{
40-
sprite.LayerSetVisible(unshadedLayer, value);
42+
_sprite.LayerSetVisible((uid, sprite), unshadedLayer, value);
4143
}
4244
}
4345
}

Content.Client/SubFloor/SubFloorHideSystem.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ namespace Content.Client.SubFloor;
99
public sealed class SubFloorHideSystem : SharedSubFloorHideSystem
1010
{
1111
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
12+
[Dependency] private readonly SpriteSystem _sprite = default!;
1213
[Dependency] private readonly IUserInterfaceManager _ui = default!;
1314

1415
private bool _showAll;
@@ -75,7 +76,7 @@ private void OnAppearanceChanged(EntityUid uid, SubFloorHideComponent component,
7576
var hasVisibleLayer = false;
7677
foreach (var layerKey in component.VisibleLayers)
7778
{
78-
if (!args.Sprite.LayerMapTryGet(layerKey, out var layerIndex))
79+
if (!_sprite.LayerMapTryGet((uid, args.Sprite), layerKey, out var layerIndex, false))
7980
continue;
8081

8182
var layer = args.Sprite[layerIndex];
@@ -84,13 +85,13 @@ private void OnAppearanceChanged(EntityUid uid, SubFloorHideComponent component,
8485
hasVisibleLayer = true;
8586
}
8687

87-
args.Sprite.Visible = hasVisibleLayer || revealed;
88+
_sprite.SetVisible((uid, args.Sprite), hasVisibleLayer || revealed);
8889

8990
if (ShowAll)
9091
{
9192
// Allows sandbox mode to make wires visible over other stuff.
9293
component.OriginalDrawDepth ??= args.Sprite.DrawDepth;
93-
args.Sprite.DrawDepth = (int)Shared.DrawDepth.DrawDepth.Overdoors;
94+
_sprite.SetDrawDepth((uid, args.Sprite), (int)Shared.DrawDepth.DrawDepth.Overdoors);
9495
}
9596
else if (scannerRevealed)
9697
{
@@ -99,11 +100,11 @@ private void OnAppearanceChanged(EntityUid uid, SubFloorHideComponent component,
99100
return;
100101
component.OriginalDrawDepth = args.Sprite.DrawDepth;
101102
var drawDepthDifference = Shared.DrawDepth.DrawDepth.ThickPipe - Shared.DrawDepth.DrawDepth.Puddles;
102-
args.Sprite.DrawDepth -= drawDepthDifference - 1;
103+
_sprite.SetDrawDepth((uid, args.Sprite), args.Sprite.DrawDepth - (drawDepthDifference - 1));
103104
}
104105
else if (component.OriginalDrawDepth.HasValue)
105106
{
106-
args.Sprite.DrawDepth = component.OriginalDrawDepth.Value;
107+
_sprite.SetDrawDepth((uid, args.Sprite), component.OriginalDrawDepth.Value);
107108
component.OriginalDrawDepth = null;
108109
}
109110
}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
using Content.Shared.Administration;
2+
using Content.Shared.Hands.Components;
3+
using Content.Shared.Hands.EntitySystems;
4+
using Content.Shared.Inventory;
5+
using Robust.Shared.Console;
6+
7+
namespace Content.Server.Administration.Commands;
8+
9+
[AdminCommand(AdminFlags.Debug)]
10+
public sealed class StripAllCommand : LocalizedEntityCommands
11+
{
12+
[Dependency] private readonly SharedHandsSystem _handsSystem = default!;
13+
[Dependency] private readonly InventorySystem _inventorySystem = default!;
14+
15+
public override string Command => "stripall";
16+
17+
public override void Execute(IConsoleShell shell, string argStr, string[] args)
18+
{
19+
if (args.Length != 1)
20+
{
21+
shell.WriteLine(Loc.GetString("shell-need-exactly-one-argument"));
22+
return;
23+
}
24+
25+
if (!NetEntity.TryParse(args[0], out var targetUidNet) || !EntityManager.TryGetEntity(targetUidNet, out var targetEntity))
26+
{
27+
shell.WriteLine(Loc.GetString("shell-entity-uid-must-be-number"));
28+
return;
29+
}
30+
31+
if (!EntityManager.TryGetComponent<InventoryComponent>(targetEntity, out var inventory))
32+
{
33+
shell.WriteLine(Loc.GetString("shell-entity-target-lacks-component", ("componentName", nameof(InventoryComponent))));
34+
return;
35+
}
36+
37+
var slots = _inventorySystem.GetSlotEnumerator((targetEntity.Value, inventory));
38+
while (slots.NextItem(out _, out var slot))
39+
{
40+
_inventorySystem.TryUnequip(targetEntity.Value, targetEntity.Value, slot.Name, true, true, inventory: inventory);
41+
}
42+
43+
if (EntityManager.TryGetComponent<HandsComponent>(targetEntity, out var hands))
44+
{
45+
foreach (var hand in _handsSystem.EnumerateHands(targetEntity.Value, hands))
46+
{
47+
_handsSystem.TryDrop(targetEntity.Value,
48+
hand,
49+
checkActionBlocker: false,
50+
doDropInteraction: false,
51+
handsComp: hands);
52+
}
53+
}
54+
}
55+
56+
public override CompletionResult GetCompletion(IConsoleShell shell, string[] args)
57+
{
58+
if (args.Length == 1)
59+
{
60+
return CompletionResult.FromHintOptions(
61+
CompletionHelper.Components<InventoryComponent>(args[0]),
62+
Loc.GetString("cmd-stripall-player-completion"));
63+
}
64+
65+
return CompletionResult.Empty;
66+
}
67+
}
68+

Content.Server/Administration/Systems/AdminVerbSystem.cs

Lines changed: 34 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
using Content.Server.Disposal.Tube;
55
using Content.Server.EUI;
66
using Content.Server.Ghost.Roles;
7-
using Content.Server.Mind;
87
using Content.Server.Mind.Commands;
8+
using Content.Server.Mind;
99
using Content.Server.Prayer;
10+
using Content.Server.Silicons.Laws;
1011
using Content.Server.Station.Systems;
1112
using Content.Shared.Administration;
1213
using Content.Shared.Chemistry.Components.SolutionManager;
@@ -15,26 +16,26 @@
1516
using Content.Shared.Database;
1617
using Content.Shared.Examine;
1718
using Content.Shared.GameTicking;
19+
using Content.Shared.Hands.Components;
1820
using Content.Shared.Inventory;
1921
using Content.Shared.Mind.Components;
22+
using Content.Shared.Movement.Components;
2023
using Content.Shared.Popups;
24+
using Content.Shared.Silicons.Laws.Components;
25+
using Content.Shared.Silicons.StationAi;
2126
using Content.Shared.Verbs;
2227
using Robust.Server.Console;
2328
using Robust.Server.GameObjects;
29+
using Robust.Server.Player;
2430
using Robust.Shared.Console;
2531
using Robust.Shared.Map.Components;
32+
using Robust.Shared.Physics.Components;
2633
using Robust.Shared.Player;
2734
using Robust.Shared.Prototypes;
2835
using Robust.Shared.Timing;
2936
using Robust.Shared.Toolshed;
3037
using Robust.Shared.Utility;
3138
using System.Linq;
32-
using Content.Server.Silicons.Laws;
33-
using Content.Shared.Movement.Components;
34-
using Content.Shared.Silicons.Laws.Components;
35-
using Robust.Server.Player;
36-
using Content.Shared.Silicons.StationAi;
37-
using Robust.Shared.Physics.Components;
3839
using static Content.Shared.Configurable.ConfigurationComponent;
3940

4041
namespace Content.Server.Administration.Systems
@@ -463,19 +464,34 @@ private void AddDebugVerbs(GetVerbsEvent<Verb> args)
463464
args.Verbs.Add(verb);
464465
}
465466

466-
// Set clothing verb
467-
if (_groupController.CanCommand(player, "setoutfit") &&
468-
EntityManager.HasComponent<InventoryComponent>(args.Target))
467+
if (TryComp<InventoryComponent>(args.Target, out var inventoryComponent))
469468
{
470-
Verb verb = new()
469+
// Strip all verb
470+
if (_groupController.CanCommand(player, "stripall"))
471471
{
472-
Text = Loc.GetString("set-outfit-verb-get-data-text"),
473-
Category = VerbCategory.Debug,
474-
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/outfit.svg.192dpi.png")),
475-
Act = () => _euiManager.OpenEui(new SetOutfitEui(GetNetEntity(args.Target)), player),
476-
Impact = LogImpact.Medium
477-
};
478-
args.Verbs.Add(verb);
472+
args.Verbs.Add(new Verb
473+
{
474+
Text = Loc.GetString("strip-all-verb-get-data-text"),
475+
Category = VerbCategory.Debug,
476+
Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/outfit.svg.192dpi.png")),
477+
Act = () => _console.RemoteExecuteCommand(player, $"stripall \"{args.Target}\""),
478+
Impact = LogImpact.Medium
479+
});
480+
}
481+
482+
// set outfit verb
483+
if (_groupController.CanCommand(player, "setoutfit"))
484+
{
485+
Verb verb = new()
486+
{
487+
Text = Loc.GetString("set-outfit-verb-get-data-text"),
488+
Category = VerbCategory.Debug,
489+
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/outfit.svg.192dpi.png")),
490+
Act = () => _euiManager.OpenEui(new SetOutfitEui(GetNetEntity(args.Target)), player),
491+
Impact = LogImpact.Medium
492+
};
493+
args.Verbs.Add(verb);
494+
}
479495
}
480496

481497
// In range unoccluded verb

0 commit comments

Comments
 (0)