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

Commit 07bb194

Browse files
committed
2 parents c851dac + ae3b3b6 commit 07bb194

154 files changed

Lines changed: 1387 additions & 748 deletions

File tree

Some content is hidden

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

Content.Client/Access/UI/GroupedAccessLevelChecklist.xaml.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ namespace Content.Client.Access.UI;
1515
[GenerateTypedNameReferences]
1616
public sealed partial class GroupedAccessLevelChecklist : BoxContainer
1717
{
18+
private static readonly ProtoId<AccessGroupPrototype> GeneralAccessGroup = "General";
19+
1820
[Dependency] private readonly IPrototypeManager _protoManager = default!;
1921

2022
private bool _isMonotone;
@@ -63,7 +65,7 @@ private void ArrangeAccessControls()
6365

6466
// Ensure that the 'general' access group is added to handle
6567
// misc. access levels that aren't associated with any group
66-
if (_protoManager.TryIndex<AccessGroupPrototype>("General", out var generalAccessProto))
68+
if (_protoManager.TryIndex(GeneralAccessGroup, out var generalAccessProto))
6769
_groupedAccessLevels.TryAdd(generalAccessProto, new());
6870

6971
// Assign known access levels with their associated groups

Content.Client/Bed/StasisBedSystem.cs

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
using Content.Shared.Body.Systems;
2+
3+
namespace Content.Client.Body.Systems;
4+
5+
/// <inheritdoc/>
6+
public sealed class MetabolizerSystem : SharedMetabolizerSystem;

Content.Client/Delivery/DeliveryVisualizerSystem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ protected override void OnAppearanceChange(EntityUid uid, DeliveryComponent comp
2424

2525
if (!_prototype.TryIndex<JobIconPrototype>(job, out var icon))
2626
{
27-
SpriteSystem.LayerSetTexture((uid, args.Sprite), DeliveryVisualLayers.JobStamp, SpriteSystem.Frame0(_prototype.Index("JobIconUnknown")));
27+
SpriteSystem.LayerSetTexture((uid, args.Sprite), DeliveryVisualLayers.JobStamp, SpriteSystem.Frame0(_prototype.Index(UnknownIcon).Icon));
2828
return;
2929
}
3030

Content.Client/Instruments/MidiParser/MidiParser.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ public static bool TryGetMidiTracks(
102102
// 0x03 is TrackName,
103103
// 0x04 is InstrumentName
104104

105+
// This string can potentially contain control characters, including 0x00 which can cause problems if it ends up in database entries via admin logs
106+
// we sanitize TrackName and InstrumentName after they have been send to the server
105107
var text = Encoding.ASCII.GetString(metaData, 0, (int)metaLength);
106108
switch (metaType)
107109
{

Content.Client/Options/UI/EscapeMenu.xaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@
66
Resizable="False">
77

88
<BoxContainer Orientation="Vertical" SeparationOverride="4" MinWidth="150">
9-
<changelog:ChangelogButton Access="Public" Name="ChangelogButton"/>
109
<ui:VoteCallMenuButton />
11-
<Button Access="Public" Name="OptionsButton" Text="{Loc 'ui-escape-options'}" />
10+
<PanelContainer StyleClasses="LowDivider" Margin="0 2.5 0 2.5" />
1211
<Button Access="Public" Name="RulesButton" Text="{Loc 'ui-escape-rules'}" />
1312
<Button Access="Public" Name="GuidebookButton" Text="{Loc 'ui-escape-guidebook'}" />
1413
<Button Access="Public" Name="WikiButton" Text="{Loc 'ui-escape-wiki'}" />
14+
<changelog:ChangelogButton Access="Public" Name="ChangelogButton" />
15+
<PanelContainer StyleClasses="LowDivider" Margin="0 2.5 0 2.5" />
16+
<Button Access="Public" Name="OptionsButton" Text="{Loc 'ui-escape-options'}" />
17+
<PanelContainer StyleClasses="LowDivider" Margin="0 2.5 0 2.5" />
1518
<Button Access="Public" Name="DisconnectButton" Text="{Loc 'ui-escape-disconnect'}" />
16-
<Button Access="Public" Name="QuitButton" Text="{Loc 'ui-escape-quit'}" />
19+
<Button Access="Public" Name="QuitButton" Text="{Loc 'ui-escape-quit'}" StyleClasses="ButtonColorRed" />
1720
</BoxContainer>
1821
</ui1:EscapeMenu>

Content.IntegrationTests/Tests/Atmos/AlarmThresholdTest.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ namespace Content.IntegrationTests.Tests.Atmos
77
[TestOf(typeof(AtmosAlarmThreshold))]
88
public sealed class AlarmThresholdTest
99
{
10+
private const string AlarmThresholdTestDummyId = "AlarmThresholdTestDummy";
11+
1012
[TestPrototypes]
11-
private const string Prototypes = @"
13+
private const string Prototypes = $@"
1214
- type: alarmThreshold
13-
id: AlarmThresholdTestDummy
15+
id: {AlarmThresholdTestDummyId}
1416
upperBound: !type:AlarmThresholdSetting
1517
threshold: 5
1618
lowerBound: !type:AlarmThresholdSetting
@@ -30,7 +32,7 @@ public async Task TestAlarmThreshold()
3032
var prototypeManager = server.ResolveDependency<IPrototypeManager>();
3133
AtmosAlarmThreshold threshold = default!;
3234

33-
var proto = prototypeManager.Index<AtmosAlarmThresholdPrototype>("AlarmThresholdTestDummy");
35+
var proto = prototypeManager.Index<AtmosAlarmThresholdPrototype>(AlarmThresholdTestDummyId);
3436
threshold = new(proto);
3537

3638
await server.WaitAssertion(() =>

Content.IntegrationTests/Tests/Commands/RejuvenateTest.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ namespace Content.IntegrationTests.Tests.Commands
1515
[TestOf(typeof(RejuvenateSystem))]
1616
public sealed class RejuvenateTest
1717
{
18+
private static readonly ProtoId<DamageGroupPrototype> TestDamageGroup = "Toxin";
19+
1820
[TestPrototypes]
1921
private const string Prototypes = @"
2022
- type: entity
@@ -62,7 +64,7 @@ await server.WaitAssertion(() =>
6264
});
6365

6466
// Kill the entity
65-
DamageSpecifier damage = new(prototypeManager.Index<DamageGroupPrototype>("Toxin"), FixedPoint2.New(10000000));
67+
DamageSpecifier damage = new(prototypeManager.Index(TestDamageGroup), FixedPoint2.New(10000000));
6668

6769
damSystem.TryChangeDamage(human, damage, true);
6870

Content.IntegrationTests/Tests/Commands/SuicideCommandTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ public sealed class SuicideCommandTests
5353
components:
5454
- type: MaterialReclaimer";
5555
private static readonly ProtoId<TagPrototype> CannotSuicideTag = "CannotSuicide";
56+
private static readonly ProtoId<DamageTypePrototype> DamageType = "Slash";
57+
5658
/// <summary>
5759
/// Run the suicide command in the console
5860
/// Should successfully kill the player and ghost them
@@ -144,7 +146,7 @@ await server.WaitPost(() =>
144146
mobThresholdsComp = entManager.GetComponent<MobThresholdsComponent>(player);
145147
damageableComp = entManager.GetComponent<DamageableComponent>(player);
146148

147-
if (protoMan.TryIndex<DamageTypePrototype>("Slash", out var slashProto))
149+
if (protoMan.TryIndex(DamageType, out var slashProto))
148150
damageableSystem.TryChangeDamage(player, new DamageSpecifier(slashProto, FixedPoint2.New(46.5)));
149151
});
150152

Content.IntegrationTests/Tests/Construction/Interaction/WindowRepair.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ namespace Content.IntegrationTests.Tests.Construction.Interaction;
88

99
public sealed class WindowRepair : InteractionTest
1010
{
11+
private static readonly ProtoId<DamageTypePrototype> BluntDamageType = "Blunt";
12+
1113
[Test]
1214
public async Task RepairReinforcedWindow()
1315
{
@@ -16,7 +18,7 @@ public async Task RepairReinforcedWindow()
1618
// Damage the entity.
1719
var sys = SEntMan.System<DamageableSystem>();
1820
var comp = Comp<DamageableComponent>();
19-
var damageType = Server.ResolveDependency<IPrototypeManager>().Index<DamageTypePrototype>("Blunt");
21+
var damageType = Server.ProtoMan.Index(BluntDamageType);
2022
var damage = new DamageSpecifier(damageType, FixedPoint2.New(10));
2123
Assert.That(comp.Damage.GetTotal(), Is.EqualTo(FixedPoint2.Zero));
2224
await Server.WaitPost(() => sys.TryChangeDamage(SEntMan.GetEntity(Target), damage, ignoreResistances: true));

0 commit comments

Comments
 (0)