Merge branch 'master' into evac-vote

This commit is contained in:
_Svist_ 2026-09-20 22:20:37 +04:00
commit c7c04d51e3
3914 changed files with 46396 additions and 30005 deletions

2
.github/labeler.yml vendored
View file

@ -1,4 +1,4 @@
"Changes: Sprites":
"Changes: Sprites":
- changed-files:
- any-glob-to-any-file: '**/*.rsi/*.png'

View file

@ -1,4 +1,4 @@
name: Build & Test Map Renderer
name: Build & Test Map Renderer
on:
push:

View file

@ -1,4 +1,4 @@
name: CRLF Check
name: CRLF Check
on:
pull_request:

View file

@ -1,4 +1,4 @@
name: "Labels: Review"
name: "Labels: Review"
on:
pull_request_target:

View file

@ -1,4 +1,4 @@
name: "Labels: PR"
name: "Labels: PR"
on:
- pull_request_target

View file

@ -1,4 +1,4 @@
name: "Labels: Untriaged"
name: "Labels: Untriaged"
on:
issues:

View file

@ -17,6 +17,8 @@ jobs:
- uses: actions/checkout@v7
with:
submodules: 'recursive'
fetch-depth: 0
filter: blob:none
- name: Setup .NET Core
uses: actions/setup-dotnet@v5
with:
@ -35,7 +37,7 @@ jobs:
- name: Update changelog
run: |
dotnet tool install --global SpaceWizards.ChangelogTool --version 1.0.7
dotnet tool install --global SpaceWizards.ChangelogTool --version 1.0.8
ss14-changelog update -d Resources/Changelog
env:
REPO: ${{ github.repository }}

2
.vscode/launch.json vendored
View file

@ -52,4 +52,4 @@
"preLaunchTask": "build"
}
]
}
}

View file

@ -1,4 +1,4 @@
#nullable enable
#nullable enable
using System;
using System.IO;
using System.Runtime.CompilerServices;

View file

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using BenchmarkDotNet.Attributes;

View file

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using BenchmarkDotNet.Attributes;
@ -6,7 +6,6 @@ using Content.IntegrationTests;
using Content.IntegrationTests.Pair;
using Content.IntegrationTests.Tests.DeviceNetwork;
using Content.Server.DeviceNetwork.Systems;
using Content.Shared.DeviceNetwork;
using Robust.Shared;
using Robust.Shared.Analyzers;
using Robust.Shared.GameObjects;
@ -26,9 +25,6 @@ public class DeviceNetworkingBenchmark
private readonly List<EntityUid> _targetEntities = new();
private readonly List<EntityUid> _targetWirelessEntities = new();
private NetworkPayload _payload = default!;
[TestPrototypes]
private const string Prototypes = @"
- type: entity
@ -54,7 +50,7 @@ public class DeviceNetworkingBenchmark
//public static IEnumerable<int> EntityCountSource { get; set; }
//[ParamsSource(nameof(EntityCountSource))]
public int EntityCount = 500;
public int EntityCount = 1000;
[GlobalSetup]
public async Task SetupAsync()
@ -70,14 +66,6 @@ public class DeviceNetworkingBenchmark
_deviceNetworkSystem = entityManager.EntitySysManager.GetEntitySystem<DeviceNetworkSystem>();
_deviceNetTestSystem = entityManager.EntitySysManager.GetEntitySystem<DeviceNetworkTestSystem>();
var testValue = "test";
_payload = new NetworkPayload
{
["Test"] = testValue,
["testnumber"] = 1,
["testbool"] = true
};
_sourceEntity = entityManager.SpawnEntity("DummyNetworkDevicePrivate", MapCoordinates.Nullspace);
_sourceWirelessEntity = entityManager.SpawnEntity("DummyWirelessNetworkDevice", MapCoordinates.Nullspace);
@ -120,7 +108,13 @@ public class DeviceNetworkingBenchmark
_pair.Server.Post(() =>
{
_deviceNetworkSystem.QueuePacket(_sourceEntity, null, _payload, 100);
var payload = new TestPayload
{
TestString = "test",
TestNumber = 1,
TestBool = true,
};
_deviceNetworkSystem.SendPacket(_sourceEntity, null, ref payload, 100);
});
await server.WaitRunTicks(1);
@ -134,7 +128,53 @@ public class DeviceNetworkingBenchmark
_pair.Server.Post(() =>
{
_deviceNetworkSystem.QueuePacket(_sourceWirelessEntity, null, _payload, 100);
var payload = new TestPayload
{
TestString = "test",
TestNumber = 1,
TestBool = true,
};
_deviceNetworkSystem.SendPacket(_sourceWirelessEntity, null, ref payload, 100);
});
await server.WaitRunTicks(1);
await server.WaitIdleAsync();
}
[Benchmark(Description = "Device Net Broadcast No Connection Checks (Class payload)")]
public async Task DeviceNetworkBroadcastNoConnectionChecksClass()
{
var server = _pair.Server;
_pair.Server.Post(() =>
{
var payload = new TestPayloadClass
{
TestString = "test",
TestNumber = 1,
TestBool = true,
};
_deviceNetworkSystem.SendPacket(_sourceEntity, null, ref payload, 100);
});
await server.WaitRunTicks(1);
await server.WaitIdleAsync();
}
[Benchmark(Description = "Device Net Broadcast Wireless Connection Checks (Class payload)")]
public async Task DeviceNetworkBroadcastWirelessConnectionChecksClass()
{
var server = _pair.Server;
_pair.Server.Post(() =>
{
var payload = new TestPayloadClass
{
TestString = "test",
TestNumber = 1,
TestBool = true,
};
_deviceNetworkSystem.SendPacket(_sourceWirelessEntity, null, ref payload, 100);
});
await server.WaitRunTicks(1);

View file

@ -1,4 +1,4 @@
using System.IO;
using System.IO;
using System.Threading.Tasks;
using BenchmarkDotNet.Attributes;
using Content.IntegrationTests;

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Buffers.Binary;
using System.IO;
using BenchmarkDotNet.Attributes;

View file

@ -1,4 +1,4 @@
using System;
using System;
using BenchmarkDotNet.Running;
using BenchmarkDotNet.Configs;
using Robust.Benchmarks.Configs;

View file

@ -1,4 +1,4 @@
#nullable enable
#nullable enable
using System;
using System.IO;
using System.Linq;

View file

@ -1,4 +1,4 @@
#nullable enable
#nullable enable
using System.IO;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;

View file

@ -1,10 +1,10 @@
using System.IO;
using System.IO;
using System.Threading.Tasks;
using BenchmarkDotNet.Attributes;
using Content.IntegrationTests;
using Content.IntegrationTests.Pair;
using Content.Server.Station.Systems;
using Content.Shared.Roles;
using Content.Shared.Station.Systems;
using Robust.Shared;
using Robust.Shared.Analyzers;
using Robust.Shared.GameObjects;

View file

@ -1,4 +1,4 @@
using Content.Shared.Access.Systems;
using Content.Shared.Access.Systems;
namespace Content.Client.Access;

View file

@ -1,4 +1,4 @@
using Content.Client.Overlays;
using Content.Client.Overlays;
using Content.Shared.Access.Systems;
using Content.Shared.StatusIcon;
using Content.Shared.StatusIcon.Components;

View file

@ -38,7 +38,7 @@
<GridContainer Name="JobGroupGrid" Columns="3" />
<!-- Group buttons are generated in code -->
</BoxContainer>
<PanelContainer StyleClasses="LowDivider" VerticalExpand="True" />
<controls:Separator StyleClasses="LowDivider" VerticalExpand="True" Orientation="Vertical" MinHeight="2"/>
<PanelContainer StyleClasses="PanelInsetDark" HorizontalExpand="True">
<BoxContainer Margin="8">
<GridContainer Name="IconGrid" Columns="4" />

View file

@ -1,5 +1,5 @@
<BoxContainer xmlns="https://spacestation14.io"
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
Orientation="Horizontal"
Margin="10 10 10 10"
VerticalExpand="True"
@ -11,11 +11,7 @@
<!-- Populated with C# code -->
</BoxContainer>
<PanelContainer StyleClasses="LowDivider" VerticalExpand="True" Margin="0 0 0 0" SetWidth="2">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#FFFFFF" />
</PanelContainer.PanelOverride>
</PanelContainer>
<controls:Separator StyleClasses="LowDivider" VerticalExpand="True" SetWidth="2" Orientation="Vertical" MinHeight="2" ColorOverride="#FFFFFF"/>
<!-- Access levels -->
<ScrollContainer HorizontalExpand="True" VerticalExpand="True" Margin="10 0 0 0">

View file

@ -2,7 +2,7 @@ using System.Collections.Frozen;
using System.Linq;
using System.Numerics;
using Content.Client.Administration.Systems;
using Content.Client.Stylesheets;
using Content.Client.Stylesheets.Fonts;
using Content.Shared.Administration;
using Content.Shared.CCVar;
using Content.Shared.Ghost.Components;
@ -64,8 +64,9 @@ internal sealed class AdminNameOverlay : Overlay
_prototypeManager = prototypeManager;
ZIndex = 200;
// Setting these to a specific ttf would break the antag symbols
_font = resourceCache.NotoStack();
_fontBold = resourceCache.NotoStack(variation: "Bold");
var fontStack = new NotoFontFamilyStack(resourceCache);
_font = fontStack.GetFont(10);
_fontBold = fontStack.GetFont(10, FontKind.Bold);
config.OnValueChanged(CCVars.AdminOverlayAntagFormat, (show) => { _overlayFormat = UpdateOverlayFormat(show); }, true);
config.OnValueChanged(CCVars.AdminOverlaySymbolStyle, (show) => { _overlaySymbolStyle = UpdateOverlaySymbolStyle(show); }, true);

View file

@ -1,4 +1,4 @@
using Content.Client.Administration.Systems;
using Content.Client.Administration.Systems;
using Content.Shared.Commands;
using Robust.Shared.Console;

View file

@ -1,3 +1,4 @@
using Content.Client.UserInterface.Controls;
using System.Linq;
using Content.Client.Administration.Systems;
using Content.Client.Stylesheets;
@ -5,7 +6,6 @@ using Content.Shared.Administration;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Shared.Console;
using Robust.Shared.Prototypes;
using Robust.Shared.RichText;
using Robust.Shared.Utility;
@ -59,7 +59,7 @@ internal sealed partial class AdminQuickInfoSystem : EntitySystem
public void OpenPopupFor(NetEntity[] entities)
{
var vBox = new VBox() { SeparationOverride = 6 };;
var vBox = new VBox() { SeparationOverride = 6 };
var popup = new Popup
{
Children =
@ -79,7 +79,7 @@ internal sealed partial class AdminQuickInfoSystem : EntitySystem
{
if (!first)
{
vBox.AddChild(new PanelContainer
vBox.AddChild(new Separator
{
StyleClasses = { StyleClass.LowDivider },
HorizontalExpand = true,

View file

@ -1,4 +1,4 @@
using Content.Shared.Administration;
using Content.Shared.Administration;
namespace Content.Client.Administration.Managers
{

View file

@ -1,4 +1,4 @@
#nullable enable
#nullable enable
using Content.Shared.Administration;
using JetBrains.Annotations;
using Robust.Shared.Network;

View file

@ -1,4 +1,4 @@
using Content.Shared.Administration.Components;
using Content.Shared.Administration.Components;
using Robust.Client.GameObjects;
namespace Content.Client.Administration.Systems;

View file

@ -1,4 +1,4 @@
using System.Numerics;
using System.Numerics;
using Content.Shared.Administration.Components;
using Robust.Client.GameObjects;
using Robust.Client.Player;

View file

@ -1,4 +1,4 @@
using System.Linq;
using System.Linq;
using System.Numerics;
using Content.Client.Administration.UI.BanList.Bans;
using Content.Client.Administration.UI.BanList.RoleBans;

View file

@ -1,4 +1,4 @@
using Robust.Client.AutoGenerated;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;

View file

@ -1,4 +1,4 @@
using Robust.Client.AutoGenerated;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML;

View file

@ -1,4 +1,5 @@
using Content.Client.Administration.UI.CustomControls;
using Content.Client.Stylesheets;
using Content.Client.UserInterface.Controls;
using Content.Shared.Administration.BanList;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface;
@ -25,7 +26,7 @@ public sealed partial class BanListControl : Control
foreach (var ban in bans)
{
Bans.AddChild(new HSeparator());
Bans.AddChild(new Separator { StyleClasses = { StyleClass.LowDivider } });
var line = new BanListLine(ban);
line.IdsClicked += LineIdsClicked;

View file

@ -1,6 +1,6 @@
<ContainerButton
<ContainerButton
xmlns="https://spacestation14.io"
xmlns:cc="clr-namespace:Content.Client.Administration.UI.CustomControls">
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls">
<PanelContainer Name="BackgroundPanel" Access="Public">
<BoxContainer
Orientation="Horizontal"
@ -9,19 +9,19 @@
<Label Text="{Loc ban-list-header-ids}"
SizeFlagsStretchRatio="1"
HorizontalExpand="True"/>
<cc:VSeparator/>
<controls:Separator StyleClasses="LowDivider" Orientation="Vertical" MinHeight="5"/>
<Label Text="{Loc ban-list-header-reason}"
SizeFlagsStretchRatio="6"
HorizontalExpand="True"/>
<cc:VSeparator/>
<controls:Separator StyleClasses="LowDivider" Orientation="Vertical" MinHeight="5"/>
<Label Text="{Loc ban-list-header-time}"
SizeFlagsStretchRatio="2"
HorizontalExpand="True"/>
<cc:VSeparator/>
<controls:Separator StyleClasses="LowDivider" Orientation="Vertical" MinHeight="5"/>
<Label Text="{Loc ban-list-header-expires}"
SizeFlagsStretchRatio="4"
HorizontalExpand="True"/>
<cc:VSeparator/>
<controls:Separator StyleClasses="LowDivider" Orientation="Vertical" MinHeight="5"/>
<Label Text="{Loc ban-list-header-banning-admin}"
SizeFlagsStretchRatio="2"
HorizontalExpand="True"/>

View file

@ -1,4 +1,4 @@
using Robust.Client.AutoGenerated;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;

View file

@ -1,6 +1,6 @@
<BoxContainer
<BoxContainer
xmlns="https://spacestation14.io"
xmlns:cc="clr-namespace:Content.Client.Administration.UI.CustomControls"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
Orientation="Horizontal"
HorizontalExpand="True"
SeparationOverride="4">
@ -14,25 +14,25 @@
VerticalExpand="True"
MouseFilter="Pass"/>
</BoxContainer>
<cc:VSeparator/>
<controls:Separator StyleClasses="LowDivider" Orientation="Vertical" MinHeight="5"/>
<Label Name="Reason"
Access="Public"
SizeFlagsStretchRatio="6"
HorizontalExpand="True"
VerticalExpand="True"/>
<cc:VSeparator/>
<controls:Separator StyleClasses="LowDivider" Orientation="Vertical" MinHeight="5"/>
<Label Name="BanTime"
Access="Public"
SizeFlagsStretchRatio="2"
HorizontalExpand="True"
ClipText="True"/>
<cc:VSeparator/>
<controls:Separator StyleClasses="LowDivider" Orientation="Vertical" MinHeight="5"/>
<Label Name="Expires"
Access="Public"
SizeFlagsStretchRatio="4"
HorizontalExpand="True"
ClipText="True"/>
<cc:VSeparator/>
<controls:Separator StyleClasses="LowDivider" Orientation="Vertical" MinHeight="5"/>
<Label Name="BanningAdmin"
Access="Public"
SizeFlagsStretchRatio="2"

View file

@ -1,4 +1,4 @@
using Content.Shared.Administration.BanList;
using Content.Shared.Administration.BanList;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;

View file

@ -1,4 +1,4 @@
using Content.Shared.Administration.BanList;
using Content.Shared.Administration.BanList;
using Robust.Client.UserInterface.Controls;
namespace Content.Client.Administration.UI.BanList;

View file

@ -1,4 +1,5 @@
using Content.Client.Administration.UI.CustomControls;
using Content.Client.Stylesheets;
using Content.Client.UserInterface.Controls;
using Content.Shared.Administration.BanList;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface;
@ -25,7 +26,7 @@ public sealed partial class RoleBanListControl : Control
foreach (var ban in bans)
{
RoleBans.AddChild(new HSeparator());
RoleBans.AddChild(new Separator { StyleClasses = { StyleClass.LowDivider } });
var line = new RoleBanListLine(ban);
line.IdsClicked += LineIdsClicked;

View file

@ -1,6 +1,6 @@
<ContainerButton
<ContainerButton
xmlns="https://spacestation14.io"
xmlns:cc="clr-namespace:Content.Client.Administration.UI.CustomControls">
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls">
<PanelContainer Name="BackgroundPanel" Access="Public">
<BoxContainer
Orientation="Horizontal"
@ -9,23 +9,23 @@
<Label Text="{Loc ban-list-header-ids}"
SizeFlagsStretchRatio="1"
HorizontalExpand="True"/>
<cc:VSeparator/>
<controls:Separator StyleClasses="LowDivider" Orientation="Vertical" MinHeight="5"/>
<Label Text="{Loc ban-list-header-reason}"
SizeFlagsStretchRatio="4.5"
HorizontalExpand="True"/>
<cc:VSeparator Name="ReasonSeparator" Access="Public"/>
<controls:Separator StyleClasses="LowDivider" Name="ReasonSeparator" Access="Public" Orientation="Vertical" MinHeight="5"/>
<Label Text="{Loc ban-list-header-role}"
SizeFlagsStretchRatio="1.5"
HorizontalExpand="True"/>
<cc:VSeparator/>
<controls:Separator StyleClasses="LowDivider" Orientation="Vertical" MinHeight="5"/>
<Label Text="{Loc ban-list-header-time}"
SizeFlagsStretchRatio="2"
HorizontalExpand="True"/>
<cc:VSeparator/>
<controls:Separator StyleClasses="LowDivider" Orientation="Vertical" MinHeight="5"/>
<Label Text="{Loc ban-list-header-expires}"
SizeFlagsStretchRatio="4"
HorizontalExpand="True"/>
<cc:VSeparator/>
<controls:Separator StyleClasses="LowDivider" Orientation="Vertical" MinHeight="5"/>
<Label Text="{Loc ban-list-header-banning-admin}"
SizeFlagsStretchRatio="2"
HorizontalExpand="True"/>

View file

@ -1,4 +1,4 @@
using Robust.Client.AutoGenerated;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;

View file

@ -1,6 +1,6 @@
<BoxContainer
<BoxContainer
xmlns="https://spacestation14.io"
xmlns:cc="clr-namespace:Content.Client.Administration.UI.CustomControls"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
Orientation="Horizontal"
HorizontalExpand="True"
SeparationOverride="4">
@ -14,30 +14,30 @@
VerticalExpand="True"
MouseFilter="Pass"/>
</BoxContainer>
<cc:VSeparator/>
<controls:Separator StyleClasses="LowDivider" Orientation="Vertical" MinHeight="5"/>
<Label Name="Reason"
Access="Public"
SizeFlagsStretchRatio="4.5"
HorizontalExpand="True"
VerticalExpand="True"/>
<cc:VSeparator/>
<controls:Separator StyleClasses="LowDivider" Orientation="Vertical" MinHeight="5"/>
<Label Name="Role"
SizeFlagsStretchRatio="1.5"
HorizontalExpand="True"
VerticalExpand="True"/>
<cc:VSeparator/>
<controls:Separator StyleClasses="LowDivider" Orientation="Vertical" MinHeight="5"/>
<Label Name="BanTime"
Access="Public"
SizeFlagsStretchRatio="2"
HorizontalExpand="True"
ClipText="True"/>
<cc:VSeparator/>
<controls:Separator StyleClasses="LowDivider" Orientation="Vertical" MinHeight="5"/>
<Label Name="Expires"
Access="Public"
SizeFlagsStretchRatio="4"
HorizontalExpand="True"
ClipText="True"/>
<cc:VSeparator/>
<controls:Separator StyleClasses="LowDivider" Orientation="Vertical" MinHeight="5"/>
<Label Name="BanningAdmin"
Access="Public"
SizeFlagsStretchRatio="2"

View file

@ -1,4 +1,4 @@
using Content.Shared.Administration.BanList;
using Content.Shared.Administration.BanList;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;

View file

@ -1,6 +1,7 @@
<DefaultWindow
xmlns="https://spacestation14.io"
xmlns:cc="clr-namespace:Content.Client.Administration.UI.CustomControls"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
Title="{Loc ban-panel-title}" MinSize="410 500">
<BoxContainer Orientation="Vertical">
<TabContainer Name="Tabs" VerticalExpand="True">
@ -35,7 +36,7 @@
<Label Text="{Loc ban-panel-severity}" />
<OptionButton Name="SeverityOption" />
</BoxContainer>
<cc:HSeparator Margin="1"/>
<controls:Separator StyleClasses="LowDivider" Margin="1"/>
<TextEdit Name="ReasonTextEdit" MinHeight="100" VerticalExpand="True" HorizontalExpand="True" />
</BoxContainer>
<!-- Player List -->

View file

@ -2,7 +2,8 @@ using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Numerics;
using Content.Client.Administration.UI.CustomControls;
using Content.Client.Stylesheets;
using Content.Client.UserInterface.Controls;
using Content.Shared.Administration;
using Content.Shared.CCVar;
using Content.Shared.Database;
@ -218,7 +219,7 @@ public sealed partial class BanPanel : DefaultWindow
}
});
RolesContainer.AddChild(outerContainer);
RolesContainer.AddChild(new HSeparator());
RolesContainer.AddChild(new Separator { StyleClasses = { StyleClass.LowDivider } });
}
private Button CreateRoleGroupHeader(string groupName, BoxContainer header, Color color, GridContainer innerContainer)

View file

@ -1,4 +1,4 @@
using Content.Shared.Administration.Logs;
using Content.Shared.Administration.Logs;
using Content.Shared.Database;
using Robust.Client.UserInterface.Controls;

View file

@ -1,4 +1,5 @@
using Content.Shared.Administration.Logs;
using Content.Client.UserInterface.Controls;
using Content.Shared.Administration.Logs;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
@ -6,7 +7,7 @@ namespace Content.Client.Administration.UI.CustomControls;
public sealed class AdminLogLabel : RichTextLabel
{
public AdminLogLabel(ref SharedAdminLog log, HSeparator separator)
public AdminLogLabel(ref SharedAdminLog log, Separator separator)
{
Log = log;
Separator = separator;
@ -19,7 +20,7 @@ public sealed class AdminLogLabel : RichTextLabel
public new SharedAdminLog Log { get; }
public HSeparator Separator { get; }
public Separator Separator { get; }
private void VisibilityChanged(Control control)
{

View file

@ -1,4 +1,4 @@
using System;
using System;
using Robust.Client.UserInterface.Controls;
namespace Content.Client.Administration.UI.CustomControls;

View file

@ -1,4 +1,4 @@
using Content.Shared.Administration.Logs;
using Content.Shared.Administration.Logs;
using Content.Shared.Database;
using Robust.Client.UserInterface.Controls;

View file

@ -1,25 +0,0 @@
using Robust.Client.Graphics;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Shared.Maths;
namespace Content.Client.Administration.UI.CustomControls;
public sealed class HSeparator : Control
{
private static readonly Color SeparatorColor = Color.FromHex("#3D4059");
public HSeparator(Color color)
{
AddChild(new PanelContainer
{
PanelOverride = new StyleBoxFlat
{
BackgroundColor = color,
ContentMarginBottomOverride = 2, ContentMarginLeftOverride = 2
}
});
}
public HSeparator() : this(SeparatorColor) { }
}

View file

@ -1,4 +1,4 @@
using System;
using System;
using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.IoC;

View file

@ -1,26 +0,0 @@
using System.Numerics;
using Robust.Client.Graphics;
using Robust.Client.UserInterface.Controls;
using Robust.Shared.Maths;
namespace Content.Client.Administration.UI.CustomControls;
public sealed class VSeparator : PanelContainer
{
private static readonly Color SeparatorColor = Color.FromHex("#3D4059");
public VSeparator(Color color)
{
MinSize = new Vector2(2, 5);
AddChild(new PanelContainer
{
PanelOverride = new StyleBoxFlat
{
BackgroundColor = color
}
});
}
public VSeparator() : this(SeparatorColor) { }
}

View file

@ -1,4 +1,4 @@
using Content.Client.Eui;
using Content.Client.Eui;
using Content.Shared.Administration.AdminEventLog;
using Content.Shared.Eui;
using JetBrains.Annotations;

View file

@ -1,5 +1,5 @@
<Control xmlns="https://spacestation14.io"
xmlns:aui="clr-namespace:Content.Client.Administration.UI.CustomControls">
<Control xmlns="https://spacestation14.io"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls">
<PanelContainer StyleClasses="BackgroundDark">
<BoxContainer Orientation="Horizontal">
<BoxContainer Orientation="Vertical">
@ -24,7 +24,7 @@
<BoxContainer Name="TypesContainer" Access="Public" Orientation="Vertical"/>
</ScrollContainer>
</BoxContainer>
<aui:VSeparator/>
<controls:Separator StyleClasses="LowDivider" Orientation="Vertical" MinHeight="5"/>
<BoxContainer Orientation="Vertical" MinWidth="200">
<LineEdit Name="PlayerSearch" Access="Public" StyleClasses="actionSearchBox"
HorizontalExpand="true" PlaceHolder="{Loc admin-logs-search-players-placeholder}"/>
@ -40,7 +40,7 @@
<BoxContainer Name="PlayersContainer" Access="Public" Orientation="Vertical"/>
</ScrollContainer>
</BoxContainer>
<aui:VSeparator/>
<controls:Separator StyleClasses="LowDivider" Orientation="Vertical" MinHeight="5"/>
</BoxContainer>
</BoxContainer>
<BoxContainer Orientation="Vertical" HorizontalExpand="True">

View file

@ -1,6 +1,8 @@
using System.Linq;
using System.Linq;
using System.Runtime.InteropServices;
using Content.Client.Administration.UI.CustomControls;
using Content.Client.Stylesheets;
using Content.Client.UserInterface.Controls;
using Content.Shared.Administration.Logs;
using Content.Shared.Database;
using Robust.Client.AutoGenerated;
@ -486,7 +488,7 @@ public sealed partial class AdminLogsControl : Control
for (var i = 0; i < span.Length; i++)
{
ref var log = ref span[i];
var separator = new HSeparator();
var separator = new Separator { StyleClasses = { StyleClass.LowDivider } };
var label = new AdminLogLabel(ref log, separator);
label.Visible = ShouldShowLog(label);

View file

@ -1,4 +1,4 @@
using System.IO;
using System.IO;
using System.Linq;
using Content.Client.Administration.UI.CustomControls;
using Content.Client.Eui;

View file

@ -1,4 +1,4 @@
using Robust.Client.AutoGenerated;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML;

View file

@ -1,23 +1,23 @@
<BoxContainer xmlns="https://spacestation14.io"
xmlns:cc="clr-namespace:Content.Client.Administration.UI.CustomControls"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
Orientation="Vertical">
<BoxContainer Name ="MetadataContainer" Orientation="Horizontal">
<TextureRect Name="SeverityRect" Margin="2"/>
<Label Name="TimeLabel" Margin="4 0" />
<cc:HSeparator Margin="4 0" />
<controls:Separator StyleClasses="LowDivider" Margin="4 0" Orientation="Vertical" MinHeight="2"/>
<Label Name="ServerLabel" />
<cc:HSeparator Margin="4 0" />
<controls:Separator StyleClasses="LowDivider" Margin="4 0" Orientation="Vertical" MinHeight="2"/>
<Label Name="RoundLabel" />
<cc:HSeparator Margin="4 0" />
<controls:Separator StyleClasses="LowDivider" Margin="4 0" Orientation="Vertical" MinHeight="2"/>
<Label Name="AdminLabel" />
<cc:HSeparator Margin="4 0" />
<controls:Separator StyleClasses="LowDivider" Margin="4 0" Orientation="Vertical" MinHeight="2"/>
<Label Name="PlaytimeLabel" />
<cc:HSeparator Name="SecretSeparator" Visible="False" Margin="4 0" />
<controls:Separator StyleClasses="LowDivider" Name="SecretSeparator" Visible="False" Margin="4 0" Orientation="Vertical" MinHeight="2"/>
<Label Name="SecretLabel" Text="{Loc admin-notes-secret} " Visible="False" />
</BoxContainer>
<RichTextLabel Name="NoteLabel" />
<Label Name="ExpiresLabel" Text="{Loc admin-note-editor-expiry-label}" Visible="False" />
<Label Name="ExtraLabel" Visible="False" Modulate="#1AA7EC" />
<Label Name="EditedLabel" Visible="False" />
<cc:HSeparator Name="Separator" />
<controls:Separator StyleClasses="LowDivider" Name="Separator"/>
</BoxContainer>

View file

@ -1,4 +1,4 @@
using Content.Shared.Administration.Notes;
using Content.Shared.Administration.Notes;
using Content.Shared.Database;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;

View file

@ -362,4 +362,4 @@ public sealed partial class NoteEdit : FancyWindow
SubmitPressed = null;
}
}
}

View file

@ -1,4 +1,4 @@
using Robust.Client.AutoGenerated;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface;
namespace Content.Client.Administration.UI.Tabs.AdminTab

View file

@ -1,4 +1,4 @@
using Content.Client.Administration.Managers;
using Content.Client.Administration.Managers;
using Content.Client.UserInterface.Systems.DecalPlacer;
using Content.Shared.Administration;
using Robust.Client.AutoGenerated;

View file

@ -1,4 +1,4 @@
using Robust.Client.AutoGenerated;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface;
namespace Content.Client.Administration.UI.Tabs.AtmosTab

View file

@ -1,5 +1,4 @@
<Control xmlns="https://spacestation14.io"
xmlns:cc="clr-namespace:Content.Client.Administration.UI.CustomControls"
<Control xmlns="https://spacestation14.io"
xmlns:ot="clr-namespace:Content.Client.Administration.UI.Tabs.ObjectsTab"
xmlns:co="clr-namespace:Content.Client.UserInterface.Controls">
<BoxContainer Orientation="Vertical">
@ -10,10 +9,10 @@
SizeFlagsStretchRatio="1" />
<Button Name="RefreshListButton" Text="{Loc object-tab-refresh-button}" ToggleMode="False" />
</BoxContainer>
<cc:HSeparator />
<co:Separator StyleClasses="LowDivider" MinWidth="2" />
<BoxContainer Orientation="Vertical" HorizontalExpand="True" VerticalExpand="True">
<ot:ObjectsTabHeader Name="ListHeader" />
<cc:HSeparator />
<co:Separator StyleClasses="LowDivider" MinWidth="2" />
<co:SearchListContainer Name="SearchList" Access="Public" VerticalExpand="True" />
</BoxContainer>
</BoxContainer>

View file

@ -1,6 +1,6 @@
using Content.Client.Administration.Managers;
using Content.Client.Station;
using Content.Client.UserInterface.Controls;
using Content.Shared.Station.Systems;
using Robust.Client.AutoGenerated;
using Robust.Client.Console;
using Robust.Client.Graphics;
@ -79,7 +79,7 @@ public sealed partial class ObjectsTab : Control
// teleport to the station's largest grid, not to the station entity (which is in nullspace)
if (!_entityManager.TryGetEntity(nent, out var station))
break;
var largestGrid = _entityManager.EntitySysManager.GetEntitySystem<StationSystem>().GetLargestGrid(station.Value);
var largestGrid = _entityManager.System<StationSystem>().GetLargestGrid(station.Value);
if (largestGrid == null)
break;
_console.ExecuteCommand($"tpto {largestGrid.Value}");
@ -107,7 +107,7 @@ public sealed partial class ObjectsTab : Control
switch (selection)
{
case ObjectsTabSelection.Stations:
entities.AddRange(_entityManager.EntitySysManager.GetEntitySystem<StationSystem>().GetStationNames());
entities.AddRange(_entityManager.System<StationSystem>().GetStationNames());
break;
case ObjectsTabSelection.Grids:
{

View file

@ -1,5 +1,4 @@
<PanelContainer xmlns="https://spacestation14.io"
xmlns:customControls="clr-namespace:Content.Client.Administration.UI.CustomControls"
<PanelContainer xmlns="https://spacestation14.io"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
Name="BackgroundColorPanel">
<BoxContainer Orientation="Horizontal"
@ -9,18 +8,18 @@
SizeFlagsStretchRatio="5"
HorizontalExpand="True"
ClipText="True"/>
<customControls:VSeparator/>
<controls:Separator StyleClasses="LowDivider" Orientation="Vertical" MinHeight="5"/>
<Label Name="EIDLabel"
SizeFlagsStretchRatio="5"
HorizontalExpand="True"
ClipText="True"/>
<customControls:VSeparator/>
<controls:Separator StyleClasses="LowDivider" Orientation="Vertical" MinHeight="5"/>
<Button Name="TeleportButton"
Text="{Loc object-tab-entity-teleport}"
SizeFlagsStretchRatio="3"
HorizontalExpand="True"
ClipText="True"/>
<customControls:VSeparator/>
<controls:Separator StyleClasses="LowDivider" Orientation="Vertical" MinHeight="5"/>
<controls:ConfirmButton Name="DeleteButton"
Text="{Loc object-tab-entity-delete}"
SizeFlagsStretchRatio="3"

View file

@ -1,5 +1,5 @@
<Control xmlns="https://spacestation14.io"
xmlns:cc="clr-namespace:Content.Client.Administration.UI.CustomControls">
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls">
<PanelContainer Name="BackgroundColorPanel" Access="Public"/>
<BoxContainer Orientation="Horizontal"
HorizontalExpand="True"
@ -10,7 +10,7 @@
ClipText="True"
Text="{Loc object-tab-object-name}"
MouseFilter="Pass"/>
<cc:VSeparator/>
<controls:Separator StyleClasses="LowDivider" Orientation="Vertical" MinHeight="5"/>
<Label Name="EntityIDLabel"
SizeFlagsStretchRatio="5"
HorizontalExpand="True"

View file

@ -1,4 +1,4 @@
using Robust.Client.AutoGenerated;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML;

View file

@ -1,4 +1,4 @@
using Content.Corvax.Interfaces.Shared;
using Content.Corvax.Interfaces.Shared;
using Content.Shared.Administration.Events;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface;

View file

@ -1,6 +1,5 @@
<Control xmlns="https://spacestation14.io"
<Control xmlns="https://spacestation14.io"
xmlns:pt="clr-namespace:Content.Client.Administration.UI.Tabs.PlayerTab"
xmlns:cc="clr-namespace:Content.Client.Administration.UI.CustomControls"
xmlns:co="clr-namespace:Content.Client.UserInterface.Controls">
<BoxContainer Orientation="Vertical">
<BoxContainer Orientation="Horizontal">
@ -13,7 +12,7 @@
</BoxContainer>
<Control MinSize="0 5"/>
<pt:PlayerTabHeader Name="ListHeader"/>
<cc:HSeparator/>
<co:Separator StyleClasses="LowDivider" MinWidth="2" />
<co:SearchListContainer Name="SearchList" Access="Public" VerticalExpand="True"/>
</BoxContainer>
</Control>

View file

@ -1,5 +1,5 @@
<PanelContainer xmlns="https://spacestation14.io"
xmlns:customControls="clr-namespace:Content.Client.Administration.UI.CustomControls"
<PanelContainer xmlns="https://spacestation14.io"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
Name="BackgroundColorPanel">
<BoxContainer Orientation="Horizontal"
HorizontalExpand="True"
@ -8,22 +8,22 @@
SizeFlagsStretchRatio="3"
HorizontalExpand="True"
ClipText="True"/>
<customControls:VSeparator/>
<controls:Separator StyleClasses="LowDivider" Orientation="Vertical" MinHeight="5"/>
<Label Name="CharacterLabel"
SizeFlagsStretchRatio="3"
HorizontalExpand="True"
ClipText="True"/>
<customControls:VSeparator/>
<controls:Separator StyleClasses="LowDivider" Orientation="Vertical" MinHeight="5"/>
<Label Name="JobLabel"
SizeFlagsStretchRatio="2"
HorizontalExpand="True"
ClipText="True"/>
<customControls:VSeparator/>
<controls:Separator StyleClasses="LowDivider" Orientation="Vertical" MinHeight="5"/>
<Label Name="RoleTypeLabel"
SizeFlagsStretchRatio="2"
HorizontalExpand="True"
ClipText="True"/>
<customControls:VSeparator/>
<controls:Separator StyleClasses="LowDivider" Orientation="Vertical" MinHeight="5"/>
<Label Name="OverallPlaytimeLabel"
SizeFlagsStretchRatio="1"
HorizontalExpand="True"

View file

@ -1,4 +1,4 @@
using Content.Shared.Administration;
using Content.Shared.Administration;
using Content.Shared.Mind;
using Content.Shared.Roles;
using Robust.Client.AutoGenerated;

View file

@ -1,5 +1,5 @@
<Control xmlns="https://spacestation14.io"
xmlns:cc="clr-namespace:Content.Client.Administration.UI.CustomControls">
<Control xmlns="https://spacestation14.io"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls">
<PanelContainer Name="BackgroundColorPanel" Access="Public"/>
<BoxContainer Orientation="Horizontal"
HorizontalExpand="True"
@ -10,28 +10,28 @@
ClipText="True"
Text="{Loc player-tab-username}"
MouseFilter="Pass"/>
<cc:VSeparator/>
<controls:Separator StyleClasses="LowDivider" Orientation="Vertical" MinHeight="5"/>
<Label Name="CharacterLabel"
SizeFlagsStretchRatio="3"
HorizontalExpand="True"
ClipText="True"
Text="{Loc player-tab-character}"
MouseFilter="Pass"/>
<cc:VSeparator/>
<controls:Separator StyleClasses="LowDivider" Orientation="Vertical" MinHeight="5"/>
<Label Name="JobLabel"
SizeFlagsStretchRatio="2"
HorizontalExpand="True"
ClipText="True"
Text="{Loc player-tab-job}"
MouseFilter="Pass"/>
<cc:VSeparator/>
<controls:Separator StyleClasses="LowDivider" Orientation="Vertical" MinHeight="5"/>
<Label Name="RoleTypeLabel"
SizeFlagsStretchRatio="2"
HorizontalExpand="True"
ClipText="True"
Text="{Loc player-tab-roletype}"
MouseFilter="Pass"/>
<cc:VSeparator/>
<controls:Separator StyleClasses="LowDivider" Orientation="Vertical" MinHeight="5"/>
<Label Name="PlaytimeLabel"
SizeFlagsStretchRatio="1"
HorizontalExpand="True"

View file

@ -1,4 +1,4 @@
using Robust.Client.AutoGenerated;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;

View file

@ -1,4 +1,4 @@
using Robust.Client.AutoGenerated;
using Robust.Client.AutoGenerated;
using Robust.Client.Console;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.XAML;

View file

@ -1,4 +1,4 @@
using System.Globalization;
using System.Globalization;
using Content.Shared.CCVar;
using Robust.Client.AutoGenerated;
using Robust.Client.Console;

View file

@ -1,4 +1,4 @@
namespace Content.Client.Animations;
namespace Content.Client.Animations;
/// <summary>
/// Applied to client-side clone entities to animate them approaching the player that

View file

@ -1,4 +1,4 @@
using System.Numerics;
using System.Numerics;
using Robust.Client.Animations;
using Robust.Client.GameObjects;
using Robust.Shared.Animations;

View file

@ -1,4 +1,4 @@
using Content.Shared.Anomaly.Effects;
using Content.Shared.Anomaly.Effects;
namespace Content.Client.Anomaly.Effects;

View file

@ -49,7 +49,7 @@
<!-- Footer -->
<BoxContainer Orientation="Vertical">
<PanelContainer StyleClasses="LowDivider" />
<controls:Separator StyleClasses="LowDivider"/>
<BoxContainer Orientation="Horizontal" Margin="10 2 5 0" VerticalAlignment="Bottom">
<Label Text="{Loc 'anomaly-generator-flavor-left'}" StyleClasses="WindowFooterText" />
<Label Text="{Loc 'anomaly-generator-flavor-right'}" StyleClasses="WindowFooterText"

View file

@ -1,4 +1,4 @@
using Content.Client.Message;
using Content.Client.Message;
using Content.Shared.Anomaly;
using Robust.Client.AutoGenerated;
using Robust.Client.GameObjects;

View file

@ -1,4 +1,4 @@
using Content.Client.Message;
using Content.Client.Message;
using Content.Client.UserInterface.Controls;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.XAML;

View file

@ -0,0 +1,32 @@
using Content.Shared.Antag;
using Content.Shared.Antag.Components;
using Content.Shared.Roles;
using Robust.Shared.Audio;
using Robust.Shared.Player;
using Robust.Shared.Prototypes;
namespace Content.Client.Antag;
/// <inheritdoc/>
public sealed partial class ClientAntagSelectionSystem : AntagSelectionSystem
{
public override void SendBriefing(ICommonSession? session, string briefing, Color? briefingColor, SoundSpecifier? briefingSound)
{
}
public override IEnumerable<ProtoId<AntagPrototype>> GetValidAntagPreferences(ICommonSession session, List<ProtoId<AntagPrototype>>? filter = null)
{
yield break;
}
public override bool IsAntagBanned(ICommonSession session, AntagSpecifierPrototype definition)
{
return false;
}
protected override Entity<AntagSelectionComponent>? ForceGetGameRuleEnt<T>(string id)
{
return null;
}
}

View file

@ -1,5 +1,6 @@
<DefaultWindow
xmlns="https://spacestation14.io"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
Title="{Loc 'spacevillain-menu-title'}"
MinWidth="540"
MinHeight="225">
@ -33,8 +34,8 @@
</BoxContainer>
</BoxContainer>
<!-- Divider -->
<PanelContainer
StyleClasses="LowDivider"/>
<controls:Separator
StyleClasses="LowDivider" Orientation="Vertical" MinHeight="2"/>
<!-- Villain -->
<BoxContainer
Orientation="Vertical"

View file

@ -1,4 +1,4 @@
using Content.Shared.Arcade;
using Content.Shared.Arcade;
using Robust.Client.GameObjects;
using Robust.Client.UserInterface;

View file

@ -1,4 +1,4 @@
using Robust.Client.GameObjects;
using Robust.Client.GameObjects;
using Robust.Client.UserInterface;
using Robust.Shared.GameObjects;
using Robust.Shared.ViewVariables;

View file

@ -1,4 +1,4 @@
using Content.Shared.Armor;
using Content.Shared.Armor;
namespace Content.Client.Armor;

View file

@ -1,4 +1,4 @@
using Content.Shared.Atmos.Components;
using Content.Shared.Atmos.Components;
using Content.Shared.Atmos.EntitySystems;
namespace Content.Client.Atmos.Components;

View file

@ -1,4 +1,5 @@
using Content.Client.Stylesheets;
using Content.Client.Stylesheets.Palette;
using Content.Shared.Atmos;
using Content.Shared.Atmos.Components;
using Content.Shared.Atmos.EntitySystems;
@ -135,7 +136,7 @@ public sealed partial class AtmosAlarmEntryContainer : BoxContainer
{
Text = Loc.GetString("atmos-alerts-window-other-gases-value-nil"),
FontOverride = normalFont,
FontColorOverride = StyleNano.DisabledFore,
FontColorOverride = Palettes.Neutral.Base,
HorizontalAlignment = HAlignment.Center,
VerticalAlignment = VAlignment.Center,
HorizontalExpand = true,
@ -175,13 +176,13 @@ public sealed partial class AtmosAlarmEntryContainer : BoxContainer
public void SetAsFocus()
{
FocusButton.AddStyleClass(StyleNano.StyleClassButtonColorGreen);
FocusButton.AddStyleClass(StyleClass.Positive);
ArrowTexture.TexturePath = "/Textures/Interface/Nano/inverted_triangle.svg.png";
}
public void RemoveAsFocus()
{
FocusButton.RemoveStyleClass(StyleNano.StyleClassButtonColorGreen);
FocusButton.RemoveStyleClass(StyleClass.Positive);
ArrowTexture.TexturePath = "/Textures/Interface/Nano/triangle_right.png";
FocusContainer.Visible = false;
}
@ -191,13 +192,13 @@ public sealed partial class AtmosAlarmEntryContainer : BoxContainer
switch (alarmType)
{
case AtmosAlarmType.Normal:
return StyleNano.GoodGreenFore;
return Palettes.Status.Good;
case AtmosAlarmType.Warning:
return StyleNano.ConcerningOrangeFore;
return Palettes.Status.Warning;
case AtmosAlarmType.Danger:
return StyleNano.DangerousRedFore;
return Palettes.Status.Critical;
}
return StyleNano.DisabledFore;
return Palettes.Neutral.Base;
}
}

View file

@ -94,7 +94,7 @@
<!-- Footer -->
<BoxContainer Orientation="Vertical">
<PanelContainer StyleClasses="LowDivider" />
<controls:Separator StyleClasses="LowDivider"/>
<BoxContainer Orientation="Horizontal" Margin="10 2 5 0" VerticalAlignment="Bottom">
<Label Text="{Loc 'atmos-alerts-window-flavor-left'}" StyleClasses="WindowFooterText" />
<Label Text="{Loc 'atmos-alerts-window-flavor-right'}" StyleClasses="WindowFooterText"

View file

@ -1,6 +1,6 @@
using Content.Client.Message;
using Content.Client.Pinpointer.UI;
using Content.Client.Stylesheets;
using Content.Client.Stylesheets.Palette;
using Content.Client.UserInterface.Controls;
using Content.Shared.Atmos.Components;
using Content.Shared.Atmos.Monitor;
@ -49,8 +49,8 @@ public sealed partial class AtmosAlertsComputerWindow : FancyWindow
private Color _monitorBlipColor = Color.Cyan;
private Color _untrackedEntColor = Color.DimGray;
private Color _regionBaseColor = new Color(154, 154, 154);
private Color _inactiveColor = StyleNano.DisabledFore;
private Color _statusTextColor = StyleNano.GoodGreenFore;
private Color _inactiveColor = Palettes.Neutral.Base;
private Color _statusTextColor = Palettes.Status.Good;
private Color _goodColor = Color.LimeGreen;
private Color _warningColor = new Color(255, 182, 72);
private Color _dangerColor = new Color(255, 67, 67);

View file

@ -1,7 +1,6 @@
<controls:FancyWindow xmlns="https://spacestation14.io"
xmlns:ui="clr-namespace:Content.Client.Atmos.Consoles"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
Title="{Loc 'atmos-monitoring-window-title'}"
Resizable="False"
SetSize="1120 750"
@ -86,7 +85,7 @@
<!-- Footer -->
<BoxContainer Orientation="Vertical">
<PanelContainer StyleClasses="LowDivider" />
<controls:Separator StyleClasses="LowDivider"/>
<BoxContainer Orientation="Horizontal" Margin="10 2 5 0" VerticalAlignment="Bottom">
<Label Text="{Loc 'atmos-monitoring-window-flavor-left'}" StyleClasses="WindowFooterText" />
<Label Text="{Loc 'atmos-monitoring-window-flavor-right'}" StyleClasses="WindowFooterText"

View file

@ -1,5 +1,5 @@
using Content.Client.Stylesheets;
using Content.Shared.Atmos;
using Content.Client.Stylesheets.Palette;
using Content.Shared.Atmos.Components;
using Content.Shared.Atmos.EntitySystems;
using Content.Shared.FixedPoint;
@ -96,15 +96,15 @@ public sealed partial class AtmosMonitoringEntryContainer : BoxContainer
Loc.GetString("atmos-alerts-window-temperature-value", ("valueInC", tempC), ("valueInK", tempK)) :
Loc.GetString("atmos-alerts-window-invalid-value");
TemperatureLabel.FontColorOverride = isNotVacuum ? Color.DarkGray : StyleNano.DisabledFore;
TemperatureLabel.FontColorOverride = isNotVacuum ? Color.DarkGray : Palettes.Neutral.Base;
// Update pressure
PressureLabel.Text = Loc.GetString("atmos-alerts-window-pressure-value", ("value", (FixedPoint2)updatedData.PressureData));
PressureLabel.FontColorOverride = isNotVacuum ? Color.DarkGray : StyleNano.DisabledFore;
PressureLabel.FontColorOverride = isNotVacuum ? Color.DarkGray : Palettes.Neutral.Base;
// Update total mol
TotalMolLabel.Text = Loc.GetString("atmos-alerts-window-total-mol-value", ("value", (FixedPoint2)updatedData.TotalMolData));
TotalMolLabel.FontColorOverride = isNotVacuum ? Color.DarkGray : StyleNano.DisabledFore;
TotalMolLabel.FontColorOverride = isNotVacuum ? Color.DarkGray : Palettes.Neutral.Base;
// Update other present gases
GasGridContainer.RemoveAllChildren();
@ -116,7 +116,7 @@ public sealed partial class AtmosMonitoringEntryContainer : BoxContainer
{
Text = Loc.GetString("atmos-alerts-window-other-gases-value-nil"),
FontOverride = normalFont,
FontColorOverride = StyleNano.DisabledFore,
FontColorOverride = Palettes.Neutral.Base,
HorizontalAlignment = HAlignment.Center,
VerticalAlignment = VAlignment.Center,
HorizontalExpand = true,
@ -155,14 +155,14 @@ public sealed partial class AtmosMonitoringEntryContainer : BoxContainer
public void SetAsFocus()
{
FocusButton.AddStyleClass(StyleNano.StyleClassButtonColorGreen);
FocusButton.AddStyleClass(StyleClass.Positive);
ArrowTexture.TexturePath = "/Textures/Interface/Nano/inverted_triangle.svg.png";
FocusContainer.Visible = true;
}
public void RemoveAsFocus()
{
FocusButton.RemoveStyleClass(StyleNano.StyleClassButtonColorGreen);
FocusButton.RemoveStyleClass(StyleClass.Positive);
ArrowTexture.TexturePath = "/Textures/Interface/Nano/triangle_right.png";
FocusContainer.Visible = false;
}

View file

@ -1,4 +1,4 @@
using Content.Client.Atmos.Components;
using Content.Client.Atmos.Components;
using Content.Shared.Atmos.Components;
using Content.Shared.Atmos.EntitySystems;
using Robust.Shared.GameStates;

View file

@ -1,4 +1,4 @@
using Content.Client.Atmos.Components;
using Content.Client.Atmos.Components;
using Content.Shared.Atmos.Components;
using Content.Shared.Atmos.EntitySystems;
using Content.Shared.Rounding;

View file

@ -33,14 +33,14 @@ public sealed class AirAlarmBoundUserInterface : BoundUserInterface
SendMessage(new AirAlarmResyncAllDevicesMessage());
}
private void OnDeviceDataChanged(string address, IAtmosDeviceData data)
private void OnDeviceDataChanged(string address, IAtmosDeviceData dataPayload)
{
SendMessage(new AirAlarmUpdateDeviceDataMessage(address, data));
SendMessage(new AirAlarmUpdateDeviceDataMessage(address, dataPayload));
}
private void OnDeviceDataCopied(IAtmosDeviceData data)
private void OnDeviceDataCopied(IAtmosDeviceData dataPayload)
{
SendMessage(new AirAlarmCopyDeviceDataMessage(data));
SendMessage(new AirAlarmCopyDeviceDataMessage(dataPayload));
}
private void OnAirAlarmModeChanged(AirAlarmMode mode)

View file

@ -17,7 +17,7 @@ namespace Content.Client.Atmos.Monitor.UI;
public sealed partial class AirAlarmWindow : FancyWindow
{
public event Action<string, IAtmosDeviceData>? AtmosDeviceDataChanged;
public event Action<IAtmosDeviceData>? AtmosDeviceDataCopied;
public event Action<IAtmosDeviceData>? AtmosDeviceDataCopied;
public event Action<string, AtmosMonitorThresholdType, AtmosAlarmThreshold, Gas?>? AtmosAlarmThresholdChanged;
public event Action<AirAlarmMode>? AirAlarmModeChanged;
public event Action<bool>? AutoModeChanged;
@ -158,7 +158,7 @@ public sealed partial class AirAlarmWindow : FancyWindow
}
break;
case AtmosSensorData sensor:
case AtmosMonitorData sensor:
if (!_sensors.TryGetValue(addr, out var sensorControl))
{
var control = new SensorInfo(sensor, addr);

View file

@ -1,4 +1,4 @@
using Content.Shared.Atmos.Monitor.Components;
using Content.Shared.Atmos.Monitor;
using Content.Shared.Atmos.Piping.Unary.Components;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
@ -9,7 +9,7 @@ namespace Content.Client.Atmos.Monitor.UI.Widgets;
[GenerateTypedNameReferences]
public sealed partial class PumpControl : BoxContainer
{
private GasVentPumpData _data;
private GasVentPumpData _dataPayload;
private string _address;
public event Action<string, IAtmosDeviceData>? PumpDataChanged;
@ -23,37 +23,37 @@ public sealed partial class PumpControl : BoxContainer
private FloatSpinBox _internalBound => CInternalBound;
private Button _copySettings => CCopySettings;
public PumpControl(GasVentPumpData data, string address)
public PumpControl(GasVentPumpData dataPayload, string address)
{
RobustXamlLoader.Load(this);
Name = address;
_data = data;
_dataPayload = dataPayload;
_address = address;
_addressLabel.Title = Loc.GetString("air-alarm-ui-atmos-net-device-label", ("address", $"{address}"));
_enabled.Pressed = data.Enabled;
_enabled.Pressed = dataPayload.Enabled;
_enabled.OnToggled += _ =>
{
_data.Enabled = _enabled.Pressed;
PumpDataChanged?.Invoke(_address, _data);
_dataPayload.Enabled = _enabled.Pressed;
PumpDataChanged?.Invoke(_address, _dataPayload);
};
_internalBound.Value = _data.InternalPressureBound;
_internalBound.Value = _dataPayload.InternalPressureBound;
_internalBound.OnValueChanged += _ =>
{
_data.InternalPressureBound = _internalBound.Value;
PumpDataChanged?.Invoke(_address, _data);
_dataPayload.InternalPressureBound = _internalBound.Value;
PumpDataChanged?.Invoke(_address, _dataPayload);
};
_internalBound.IsValid += value => value >= 0;
_externalBound.Value = _data.ExternalPressureBound;
_externalBound.Value = _dataPayload.ExternalPressureBound;
_externalBound.OnValueChanged += _ =>
{
_data.ExternalPressureBound = _externalBound.Value;
PumpDataChanged?.Invoke(_address, _data);
_dataPayload.ExternalPressureBound = _externalBound.Value;
PumpDataChanged?.Invoke(_address, _dataPayload);
};
_externalBound.IsValid += value => value >= 0;
@ -62,12 +62,12 @@ public sealed partial class PumpControl : BoxContainer
_pumpDirection.AddItem(Loc.GetString($"air-alarm-ui-pump-direction-{value.ToString().ToLower()}"), (int) value);
}
_pumpDirection.SelectId((int) _data.PumpDirection);
_pumpDirection.SelectId((int) _dataPayload.PumpDirection);
_pumpDirection.OnItemSelected += args =>
{
_pumpDirection.SelectId(args.Id);
_data.PumpDirection = (VentPumpDirection) args.Id;
PumpDataChanged?.Invoke(_address, _data);
_dataPayload.PumpDirection = (VentPumpDirection) args.Id;
PumpDataChanged?.Invoke(_address, _dataPayload);
};
foreach (var value in Enum.GetValues<VentPressureBound>())
@ -75,35 +75,35 @@ public sealed partial class PumpControl : BoxContainer
_pressureCheck.AddItem(Loc.GetString($"air-alarm-ui-pressure-bound-{value.ToString().ToLower()}"), (int) value);
}
_pressureCheck.SelectId((int) _data.PressureChecks);
_pressureCheck.SelectId((int) _dataPayload.PressureChecks);
_pressureCheck.OnItemSelected += args =>
{
_pressureCheck.SelectId(args.Id);
_data.PressureChecks = (VentPressureBound) args.Id;
PumpDataChanged?.Invoke(_address, _data);
_dataPayload.PressureChecks = (VentPressureBound) args.Id;
PumpDataChanged?.Invoke(_address, _dataPayload);
};
_copySettings.OnPressed += _ =>
{
PumpDataCopied?.Invoke(_data);
PumpDataCopied?.Invoke(_dataPayload);
};
}
public void ChangeData(GasVentPumpData data)
public void ChangeData(GasVentPumpData dataPayload)
{
_data.Enabled = data.Enabled;
_enabled.Pressed = _data.Enabled;
_dataPayload.Enabled = dataPayload.Enabled;
_enabled.Pressed = _dataPayload.Enabled;
_data.PumpDirection = data.PumpDirection;
_pumpDirection.SelectId((int) _data.PumpDirection);
_dataPayload.PumpDirection = dataPayload.PumpDirection;
_pumpDirection.SelectId((int) _dataPayload.PumpDirection);
_data.PressureChecks = data.PressureChecks;
_pressureCheck.SelectId((int) _data.PressureChecks);
_dataPayload.PressureChecks = dataPayload.PressureChecks;
_pressureCheck.SelectId((int) _dataPayload.PressureChecks);
_data.ExternalPressureBound = data.ExternalPressureBound;
_externalBound.Value = _data.ExternalPressureBound;
_dataPayload.ExternalPressureBound = dataPayload.ExternalPressureBound;
_externalBound.Value = _dataPayload.ExternalPressureBound;
_data.InternalPressureBound = data.InternalPressureBound;
_internalBound.Value = _data.InternalPressureBound;
_dataPayload.InternalPressureBound = dataPayload.InternalPressureBound;
_internalBound.Value = _dataPayload.InternalPressureBound;
}
}

View file

@ -1,6 +1,6 @@
using Content.Shared.Atmos;
using Content.Shared.Atmos.EntitySystems;
using Content.Shared.Atmos.Monitor.Components;
using Content.Shared.Atmos.Monitor;
using Content.Shared.Atmos.Piping.Unary.Components;
using Content.Shared.Atmos.Prototypes;
using Robust.Client.AutoGenerated;
@ -16,7 +16,7 @@ public sealed partial class ScrubberControl : BoxContainer
[Dependency] private IPrototypeManager _prototypeManager = default!;
[Dependency] private IEntityManager _entMan = default!;
private GasVentScrubberData _data;
private GasVentScrubberData _dataPayload;
private string _address;
public event Action<string, IAtmosDeviceData>? ScrubberDataChanged;
@ -34,7 +34,7 @@ public sealed partial class ScrubberControl : BoxContainer
private GridContainer _gases => CGasContainer;
private Dictionary<Gas, Button> _gasControls = new();
public ScrubberControl(GasVentScrubberData data, string address)
public ScrubberControl(GasVentScrubberData dataPayload, string address)
{
IoCManager.InjectDependencies(this);
@ -44,30 +44,30 @@ public sealed partial class ScrubberControl : BoxContainer
Name = address;
_data = data;
_dataPayload = dataPayload;
_address = address;
_addressLabel.Title = Loc.GetString("air-alarm-ui-atmos-net-device-label", ("address", $"{address}"));
_enabled.Pressed = data.Enabled;
_enabled.Pressed = dataPayload.Enabled;
_enabled.OnToggled += _ =>
{
_data.Enabled = _enabled.Pressed;
ScrubberDataChanged?.Invoke(_address, _data);
_dataPayload.Enabled = _enabled.Pressed;
ScrubberDataChanged?.Invoke(_address, _dataPayload);
};
_wideNet.Pressed = data.WideNet;
_wideNet.Pressed = dataPayload.WideNet;
_wideNet.OnToggled += _ =>
{
_data.WideNet = _wideNet.Pressed;
ScrubberDataChanged?.Invoke(_address, _data);
_dataPayload.WideNet = _wideNet.Pressed;
ScrubberDataChanged?.Invoke(_address, _dataPayload);
};
_volumeRate.Value = _data.VolumeRate;
_volumeRate.Value = _dataPayload.VolumeRate;
_volumeRate.OnValueChanged += _ =>
{
_data.VolumeRate = _volumeRate.Value;
ScrubberDataChanged?.Invoke(_address, _data);
_dataPayload.VolumeRate = _volumeRate.Value;
ScrubberDataChanged?.Invoke(_address, _dataPayload);
};
_volumeRate.IsValid += value => value >= 0;
@ -76,31 +76,31 @@ public sealed partial class ScrubberControl : BoxContainer
_pumpDirection.AddItem(Loc.GetString($"air-alarm-ui-pump-direction-{value.ToString().ToLower()}"), (int) value);
}
_pumpDirection.SelectId((int) _data.PumpDirection);
_pumpDirection.SelectId((int) _dataPayload.PumpDirection);
_pumpDirection.OnItemSelected += args =>
{
_pumpDirection.SelectId(args.Id);
_data.PumpDirection = (ScrubberPumpDirection) args.Id;
ScrubberDataChanged?.Invoke(_address, _data);
_dataPayload.PumpDirection = (ScrubberPumpDirection) args.Id;
ScrubberDataChanged?.Invoke(_address, _dataPayload);
};
_pumpDirection.Disabled = data.AirAlarmPanicWireCut;
_pumpDirection.Disabled = dataPayload.AirAlarmPanicWireCut;
_copySettings.OnPressed += _ =>
{
ScrubberDataCopied?.Invoke(_data);
ScrubberDataCopied?.Invoke(_dataPayload);
};
var allGases = Enum.GetValues<Gas>();
_selectAll.OnPressed += _ =>
{
_data.FilterGases = new HashSet<Gas>(allGases);
ScrubberDataChanged?.Invoke(_address, _data);
_dataPayload.FilterGases = new HashSet<Gas>(allGases);
ScrubberDataChanged?.Invoke(_address, _dataPayload);
};
_deselectAll.OnPressed += _ =>
{
_data.FilterGases = [];
ScrubberDataChanged?.Invoke(_address, _data);
_dataPayload.FilterGases = [];
ScrubberDataChanged?.Invoke(_address, _dataPayload);
};
foreach (var value in allGases)
@ -114,16 +114,16 @@ public sealed partial class ScrubberControl : BoxContainer
Text = Loc.GetString(gasName),
ToggleMode = true,
HorizontalExpand = true,
Pressed = _data.FilterGases.Contains(value)
Pressed = _dataPayload.FilterGases.Contains(value)
};
gasButton.OnToggled += args =>
{
if (args.Pressed)
_data.FilterGases.Add(value);
_dataPayload.FilterGases.Add(value);
else
_data.FilterGases.Remove(value);
_dataPayload.FilterGases.Remove(value);
ScrubberDataChanged?.Invoke(_address, _data);
ScrubberDataChanged?.Invoke(_address, _dataPayload);
};
_gasControls.Add(value, gasButton);
_gases.AddChild(gasButton);
@ -131,25 +131,25 @@ public sealed partial class ScrubberControl : BoxContainer
}
public void ChangeData(GasVentScrubberData data)
public void ChangeData(GasVentScrubberData dataPayload)
{
_data.Enabled = data.Enabled;
_enabled.Pressed = _data.Enabled;
_dataPayload.Enabled = dataPayload.Enabled;
_enabled.Pressed = _dataPayload.Enabled;
_data.PumpDirection = data.PumpDirection;
_pumpDirection.Select((int) _data.PumpDirection);
_pumpDirection.Disabled = data.AirAlarmPanicWireCut;
_dataPayload.PumpDirection = dataPayload.PumpDirection;
_pumpDirection.Select((int) _dataPayload.PumpDirection);
_pumpDirection.Disabled = dataPayload.AirAlarmPanicWireCut;
_data.VolumeRate = data.VolumeRate;
_volumeRate.Value = _data.VolumeRate;
_dataPayload.VolumeRate = dataPayload.VolumeRate;
_volumeRate.Value = _dataPayload.VolumeRate;
_data.WideNet = data.WideNet;
_wideNet.Pressed = _data.WideNet;
_data.FilterGases = data.FilterGases;
_dataPayload.WideNet = dataPayload.WideNet;
_wideNet.Pressed = _dataPayload.WideNet;
_dataPayload.FilterGases = dataPayload.FilterGases;
foreach (var value in Enum.GetValues<Gas>())
{
_gasControls[value].Pressed = data.FilterGases.Contains(value);
_gasControls[value].Pressed = dataPayload.FilterGases.Contains(value);
}
}
}

View file

@ -18,7 +18,7 @@ public sealed partial class SensorInfo : BoxContainer
[Dependency] private IEntityManager _entMan = default!;
public Action<string, AtmosMonitorThresholdType, AtmosAlarmThreshold, Gas?>? OnThresholdUpdate;
public event Action<AtmosSensorData>? SensorDataCopied;
public event Action<AtmosMonitorData>? SensorDataCopied;
private string _address;
private ThresholdControl _pressureThreshold;
@ -27,7 +27,7 @@ public sealed partial class SensorInfo : BoxContainer
private Dictionary<Gas, RichTextLabel> _gasLabels = new();
private Button _copySettings => CCopySettings;
public SensorInfo(AtmosSensorData data, string address)
public SensorInfo(AtmosMonitorData dataPayload, string address)
{
IoCManager.InjectDependencies(this);
var atmosphereSystem = _entMan.System<SharedAtmosphereSystem>();
@ -36,37 +36,37 @@ public sealed partial class SensorInfo : BoxContainer
_address = address;
SensorAddress.Title = Loc.GetString("air-alarm-ui-window-listing-title", ("address", _address), ("state", data.AlarmState));
SensorAddress.Title = Loc.GetString("air-alarm-ui-window-listing-title", ("address", _address), ("state", dataPayload.AlarmState));
AlarmStateLabel.SetMarkup(Loc.GetString("air-alarm-ui-window-alarm-state-indicator",
("color", AirAlarmWindow.ColorForAlarm(data.AlarmState)),
("state", data.AlarmState)));
("color", AirAlarmWindow.ColorForAlarm(dataPayload.AlarmState)),
("state", dataPayload.AlarmState)));
PressureLabel.SetMarkup(Loc.GetString("air-alarm-ui-window-pressure-indicator",
("color", AirAlarmWindow.ColorForThreshold(data.Pressure, data.PressureThreshold)),
("pressure", $"{data.Pressure:0.##}")));
("color", AirAlarmWindow.ColorForThreshold(dataPayload.Pressure, dataPayload.PressureThreshold)),
("pressure", $"{dataPayload.Pressure:0.##}")));
TemperatureLabel.SetMarkup(Loc.GetString("air-alarm-ui-window-temperature-indicator",
("color", AirAlarmWindow.ColorForThreshold(data.Temperature, data.TemperatureThreshold)),
("tempC", $"{TemperatureHelpers.KelvinToCelsius(data.Temperature):0.#}"),
("temperature", $"{data.Temperature:0.##}")));
("color", AirAlarmWindow.ColorForThreshold(dataPayload.Temperature, dataPayload.TemperatureThreshold)),
("tempC", $"{TemperatureHelpers.KelvinToCelsius(dataPayload.Temperature):0.#}"),
("temperature", $"{dataPayload.Temperature:0.##}")));
foreach (var (gas, amount) in data.Gases)
foreach (var (gas, amount) in dataPayload.Gases)
{
var label = new RichTextLabel();
var fractionGas = amount / data.TotalMoles;
var fractionGas = amount / dataPayload.TotalMoles;
ProtoId<GasPrototype> gasProtoId = atmosphereSystem.GetGas(gas);
var gasName = _prototypeManager.Index(gasProtoId).Name;
label.SetMarkup(Loc.GetString("air-alarm-ui-gases-indicator",
("gas", Loc.GetString(gasName)),
("color", AirAlarmWindow.ColorForThreshold(fractionGas, data.GasThresholds[gas])),
("color", AirAlarmWindow.ColorForThreshold(fractionGas, dataPayload.GasThresholds[gas])),
("amount", $"{amount:0.####}"),
("percentage", $"{(100 * fractionGas):0.##}")));
GasContainer.AddChild(label);
_gasLabels.Add(gas, label);
var threshold = data.GasThresholds[gas];
var threshold = dataPayload.GasThresholds[gas];
var gasThresholdControl = new ThresholdControl(Loc.GetString($"air-alarm-ui-thresholds-gas-title"), threshold, AtmosMonitorThresholdType.Gas, gas, 100);
gasThresholdControl.Margin = new Thickness(20, 2, 2, 2);
gasThresholdControl.ThresholdDataChanged += (type, alarmThreshold, arg3) =>
@ -78,10 +78,10 @@ public sealed partial class SensorInfo : BoxContainer
GasContainer.AddChild(gasThresholdControl);
}
_pressureThreshold = new ThresholdControl(Loc.GetString("air-alarm-ui-thresholds-pressure-title"), data.PressureThreshold, AtmosMonitorThresholdType.Pressure);
_pressureThreshold = new ThresholdControl(Loc.GetString("air-alarm-ui-thresholds-pressure-title"), dataPayload.PressureThreshold, AtmosMonitorThresholdType.Pressure);
PressureThresholdContainer.AddChild(_pressureThreshold);
_temperatureThreshold = new ThresholdControl(Loc.GetString("air-alarm-ui-thresholds-temperature-title"),
data.TemperatureThreshold,
dataPayload.TemperatureThreshold,
AtmosMonitorThresholdType.Temperature);
TemperatureThresholdContainer.AddChild(_temperatureThreshold);
@ -97,58 +97,58 @@ public sealed partial class SensorInfo : BoxContainer
_copySettings.OnPressed += _ =>
{
SensorDataCopied?.Invoke(data);
SensorDataCopied?.Invoke(dataPayload);
};
}
public void ChangeData(AtmosSensorData data)
public void ChangeData(AtmosMonitorData dataPayload)
{
IoCManager.InjectDependencies(this);
var atmosphereSystem = _entMan.System<SharedAtmosphereSystem>();
SensorAddress.Title = Loc.GetString("air-alarm-ui-window-listing-title", ("address", _address), ("state", data.AlarmState));
SensorAddress.Title = Loc.GetString("air-alarm-ui-window-listing-title", ("address", _address), ("state", dataPayload.AlarmState));
AlarmStateLabel.SetMarkup(Loc.GetString("air-alarm-ui-window-alarm-state-indicator",
("color", AirAlarmWindow.ColorForAlarm(data.AlarmState)),
("state", data.AlarmState)));
("color", AirAlarmWindow.ColorForAlarm(dataPayload.AlarmState)),
("state", dataPayload.AlarmState)));
PressureLabel.SetMarkup(Loc.GetString("air-alarm-ui-window-pressure-indicator",
("color", AirAlarmWindow.ColorForThreshold(data.Pressure, data.PressureThreshold)),
("pressure", $"{data.Pressure:0.##}")));
("color", AirAlarmWindow.ColorForThreshold(dataPayload.Pressure, dataPayload.PressureThreshold)),
("pressure", $"{dataPayload.Pressure:0.##}")));
TemperatureLabel.SetMarkup(Loc.GetString("air-alarm-ui-window-temperature-indicator",
("color", AirAlarmWindow.ColorForThreshold(data.Temperature, data.TemperatureThreshold)),
("tempC", $"{TemperatureHelpers.KelvinToCelsius(data.Temperature):0.#}"),
("temperature", $"{data.Temperature:0.##}")));
("color", AirAlarmWindow.ColorForThreshold(dataPayload.Temperature, dataPayload.TemperatureThreshold)),
("tempC", $"{TemperatureHelpers.KelvinToCelsius(dataPayload.Temperature):0.#}"),
("temperature", $"{dataPayload.Temperature:0.##}")));
foreach (var (gas, amount) in data.Gases)
foreach (var (gas, amount) in dataPayload.Gases)
{
if (!_gasLabels.TryGetValue(gas, out var label))
{
continue;
}
var fractionGas = amount / data.TotalMoles;
var fractionGas = amount / dataPayload.TotalMoles;
ProtoId<GasPrototype> gasProtoId = atmosphereSystem.GetGas(gas);
var gasName = _prototypeManager.Index(gasProtoId).Name;
label.SetMarkup(Loc.GetString("air-alarm-ui-gases-indicator",
("gas", Loc.GetString(gasName)),
("color", AirAlarmWindow.ColorForThreshold(fractionGas, data.GasThresholds[gas])),
("color", AirAlarmWindow.ColorForThreshold(fractionGas, dataPayload.GasThresholds[gas])),
("amount", $"{amount:0.####}"),
("percentage", $"{(100 * fractionGas):0.##}")));
}
_pressureThreshold.UpdateThresholdData(data.PressureThreshold, data.Pressure);
_temperatureThreshold.UpdateThresholdData(data.TemperatureThreshold, data.Temperature);
_pressureThreshold.UpdateThresholdData(dataPayload.PressureThreshold, dataPayload.Pressure);
_temperatureThreshold.UpdateThresholdData(dataPayload.TemperatureThreshold, dataPayload.Temperature);
foreach (var (gas, control) in _gasThresholds)
{
if (!data.GasThresholds.TryGetValue(gas, out var threshold))
if (!dataPayload.GasThresholds.TryGetValue(gas, out var threshold))
{
continue;
}
control.UpdateThresholdData(threshold, data.Gases[gas] / data.TotalMoles);
control.UpdateThresholdData(threshold, dataPayload.Gases[gas] / dataPayload.TotalMoles);
}
}

View file

@ -1,4 +1,4 @@
using Content.Shared.Atmos.Rotting;
using Content.Shared.Atmos.Rotting;
namespace Content.Client.Atmos.Rotting;

Some files were not shown because too many files have changed in this diff Show more