diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 14f591ec87..defe08ef23 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -28,6 +28,7 @@
/Content.*/Stunnable/ @Princess-Cheeseballs
/Content.*/Nutrition/ @Princess-Cheeseballs
+/Content.*/EntityEffects @Princess-Cheeseballs @sowelipililimute
# SKREEEE
/Content.*.Database/ @PJB3005 @DrSmugleaf
diff --git a/BuildChecker/git_helper.py b/BuildChecker/git_helper.py
index 66d2463669..bd6603bd34 100644
--- a/BuildChecker/git_helper.py
+++ b/BuildChecker/git_helper.py
@@ -13,7 +13,7 @@ from typing import List
SOLUTION_PATH = Path("..") / "SpaceStation14.sln"
# If this doesn't match the saved version we overwrite them all.
-CURRENT_HOOKS_VERSION = "3"
+CURRENT_HOOKS_VERSION = "4"
QUIET = len(sys.argv) == 2 and sys.argv[1] == "--quiet"
diff --git a/BuildChecker/hooks/post-checkout b/BuildChecker/hooks/post-checkout
index ee4309de1d..1b91112ff0 100755
--- a/BuildChecker/hooks/post-checkout
+++ b/BuildChecker/hooks/post-checkout
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
gitroot=$(git rev-parse --show-toplevel)
diff --git a/BuildChecker/hooks/post-merge b/BuildChecker/hooks/post-merge
index 5cf3d91120..864a9cff50 100755
--- a/BuildChecker/hooks/post-merge
+++ b/BuildChecker/hooks/post-merge
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Just call post-checkout since it does the same thing.
gitroot=$(git rev-parse --git-path hooks)
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index b2aeb6197a..f8f22fb3f8 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -8,7 +8,7 @@ This isn’t an exhaustive list of things that you can’t do. Rather, take it i
This code of conduct applies specifically to the Github repositories and its spaces managed by the Space Station 14 project or Space Wizards Federation. Some spaces, such as the Space Station 14 Discord or the official Wizard's Den game servers, have their own rules but are in spirit equal to what may be found in here.
-If you believe someone is violating the code of conduct, we ask that you report it by contacting a Maintainer, Project Manager or Wizard staff member through [Discord](https://discord.ss14.io/), [the forums](https://forum.spacestation14.com/), or emailing [telecommunications@spacestation14.com](mailto:telecommunications@spacestation14.com).
+If you believe someone is violating the code of conduct, we ask that you report it by contacting a Maintainer, Project Manager or Wizard staff member through [Discord](https://discord.ss14.io/), [the forums](https://forum.spacestation14.com/), or emailing [support@spacestation14.com](mailto:support@spacestation14.com).
- **Be friendly and patient.**
- **Be welcoming.** We strive to be a community that welcomes and supports people of all backgrounds and identities. This includes, but is not limited to members of any race, ethnicity, culture, national origin, colour, immigration status, social and economic class, educational level, sex, sexual orientation, gender identity and expression, age, size, family status, political belief, religion, and mental and physical ability.
diff --git a/Content.Benchmarks/DestructibleBenchmark.cs b/Content.Benchmarks/DestructibleBenchmark.cs
new file mode 100644
index 0000000000..1b54bacca0
--- /dev/null
+++ b/Content.Benchmarks/DestructibleBenchmark.cs
@@ -0,0 +1,160 @@
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using BenchmarkDotNet.Attributes;
+using Content.IntegrationTests;
+using Content.IntegrationTests.Pair;
+using Content.Server.Destructible;
+using Content.Shared.Damage;
+using Content.Shared.Damage.Components;
+using Content.Shared.Damage.Prototypes;
+using Content.Shared.Damage.Systems;
+using Content.Shared.FixedPoint;
+using Content.Shared.Maps;
+using Robust.Shared;
+using Robust.Shared.Analyzers;
+using Robust.Shared.GameObjects;
+using Robust.Shared.Map;
+using Robust.Shared.Maths;
+using Robust.Shared.Prototypes;
+using Robust.Shared.Random;
+
+namespace Content.Benchmarks;
+
+[Virtual]
+[GcServer(true)]
+[MemoryDiagnoser]
+public class DestructibleBenchmark
+{
+ ///
+ /// Number of destructible entities per prototype to spawn with a .
+ ///
+ [Params(1, 10, 100, 1000, 5000)]
+ public int EntityCount;
+
+ ///
+ /// Amount of blunt damage we do to each entity.
+ ///
+ [Params(10000)]
+ public FixedPoint2 DamageAmount;
+
+ [Params("Blunt")]
+ public ProtoId DamageType;
+
+ private static readonly EntProtoId WindowProtoId = "Window";
+ private static readonly EntProtoId WallProtoId = "WallReinforced";
+ private static readonly EntProtoId HumanProtoId = "MobHuman";
+
+ private static readonly ProtoId TileRef = "Plating";
+
+ private readonly EntProtoId[] _prototypes = [WindowProtoId, WallProtoId, HumanProtoId];
+
+ private readonly List> _damageables = new();
+ private readonly List> _destructbiles = new();
+
+ private DamageSpecifier _damage;
+
+ private TestPair _pair = default!;
+ private IEntityManager _entMan = default!;
+ private IPrototypeManager _protoMan = default!;
+ private IRobustRandom _random = default!;
+ private ITileDefinitionManager _tileDefMan = default!;
+ private DamageableSystem _damageable = default!;
+ private DestructibleSystem _destructible = default!;
+ private SharedMapSystem _map = default!;
+
+ [GlobalSetup]
+ public async Task SetupAsync()
+ {
+ ProgramShared.PathOffset = "../../../../";
+ PoolManager.Startup();
+ _pair = await PoolManager.GetServerClient();
+ var server = _pair.Server;
+
+ var mapdata = await _pair.CreateTestMap();
+
+ _entMan = server.ResolveDependency();
+ _protoMan = server.ResolveDependency();
+ _random = server.ResolveDependency();
+ _tileDefMan = server.ResolveDependency();
+ _damageable = _entMan.System();
+ _destructible = _entMan.System();
+ _map = _entMan.System();
+
+ if (!_protoMan.Resolve(DamageType, out var type))
+ return;
+
+ _damage = new DamageSpecifier(type, DamageAmount);
+
+ _random.SetSeed(69420); // Randomness needs to be deterministic for benchmarking.
+
+ var plating = _tileDefMan[TileRef].TileId;
+
+ // We make a rectangular grid of destructible entities, and then damage them all simultaneously to stress test the system.
+ // Needed for managing the performance of destructive effects and damage application.
+ await server.WaitPost(() =>
+ {
+ // Set up a thin line of tiles to place our objects on. They should be anchored for a "realistic" scenario...
+ for (var x = 0; x < EntityCount; x++)
+ {
+ for (var y = 0; y < _prototypes.Length; y++)
+ {
+ _map.SetTile(mapdata.Grid, mapdata.Grid, new Vector2i(x, y), new Tile(plating));
+ }
+ }
+
+ for (var x = 0; x < EntityCount; x++)
+ {
+ var y = 0;
+ foreach (var protoId in _prototypes)
+ {
+ var coords = new EntityCoordinates(mapdata.Grid, x + 0.5f, y + 0.5f);
+ _entMan.SpawnEntity(protoId, coords);
+ y++;
+ }
+ }
+
+ var query = _entMan.EntityQueryEnumerator();
+
+ while (query.MoveNext(out var uid, out var damageable, out var destructible))
+ {
+ _damageables.Add((uid, damageable));
+ _destructbiles.Add((uid, damageable, destructible));
+ }
+ });
+ }
+
+ [Benchmark]
+ public async Task PerformDealDamage()
+ {
+ await _pair.Server.WaitPost(() =>
+ {
+ _damageable.ApplyDamageToAllEntities(_damageables, _damage);
+ });
+ }
+
+ [Benchmark]
+ public async Task PerformTestTriggers()
+ {
+ await _pair.Server.WaitPost(() =>
+ {
+ _destructible.TestAllTriggers(_destructbiles);
+ });
+ }
+
+ [Benchmark]
+ public async Task PerformTestBehaviors()
+ {
+ await _pair.Server.WaitPost(() =>
+ {
+ _destructible.TestAllBehaviors(_destructbiles);
+ });
+ }
+
+
+ [GlobalCleanup]
+ public async Task CleanupAsync()
+ {
+ await _pair.DisposeAsync();
+ PoolManager.Shutdown();
+ }
+}
diff --git a/Content.Benchmarks/GasReactionBenchmark.cs b/Content.Benchmarks/GasReactionBenchmark.cs
new file mode 100644
index 0000000000..9ed30373d1
--- /dev/null
+++ b/Content.Benchmarks/GasReactionBenchmark.cs
@@ -0,0 +1,253 @@
+using System.Threading.Tasks;
+using BenchmarkDotNet.Attributes;
+using Content.IntegrationTests;
+using Content.IntegrationTests.Pair;
+using Content.Server.Atmos;
+using Content.Server.Atmos.EntitySystems;
+using Content.Server.Atmos.Reactions;
+using Content.Shared.Atmos;
+using Robust.Shared;
+using Robust.Shared.Analyzers;
+using Robust.Shared.GameObjects;
+using Robust.Shared.Maths;
+
+namespace Content.Benchmarks;
+
+///
+/// Benchmarks the performance of different gas reactions.
+/// Tests each reaction type with realistic gas mixtures to measure computational cost.
+///
+[Virtual]
+[GcServer(true)]
+[MemoryDiagnoser]
+public class GasReactionBenchmark
+{
+ private const int Iterations = 1000;
+ private TestPair _pair = default!;
+ private AtmosphereSystem _atmosphereSystem = default!;
+
+ // Grid and tile for reactions that need a holder
+ private EntityUid _testGrid = default!;
+ private TileAtmosphere _testTile = default!;
+ // Reaction instances
+ private PlasmaFireReaction _plasmaFireReaction = default!;
+ private TritiumFireReaction _tritiumFireReaction = default!;
+ private FrezonProductionReaction _frezonProductionReaction = default!;
+ private FrezonCoolantReaction _frezonCoolantReaction = default!;
+ private AmmoniaOxygenReaction _ammoniaOxygenReaction = default!;
+ private N2ODecompositionReaction _n2oDecompositionReaction = default!;
+ private WaterVaporReaction _waterVaporReaction = default!;
+ // Gas mixtures for each reaction type
+ private GasMixture _plasmaFireMixture = default!;
+ private GasMixture _tritiumFireMixture = default!;
+ private GasMixture _frezonProductionMixture = default!;
+ private GasMixture _frezonCoolantMixture = default!;
+ private GasMixture _ammoniaOxygenMixture = default!;
+ private GasMixture _n2oDecompositionMixture = default!;
+ private GasMixture _waterVaporMixture = default!;
+
+ [GlobalSetup]
+ public async Task SetupAsync()
+ {
+ ProgramShared.PathOffset = "../../../../";
+ PoolManager.Startup();
+ _pair = await PoolManager.GetServerClient();
+ var server = _pair.Server;
+
+ // Create test map and grid
+ var mapData = await _pair.CreateTestMap();
+ _testGrid = mapData.Grid;
+
+ await server.WaitPost(() =>
+ {
+ var entMan = server.ResolveDependency();
+ _atmosphereSystem = entMan.System();
+
+ _plasmaFireReaction = new PlasmaFireReaction();
+ _tritiumFireReaction = new TritiumFireReaction();
+ _frezonProductionReaction = new FrezonProductionReaction();
+ _frezonCoolantReaction = new FrezonCoolantReaction();
+ _ammoniaOxygenReaction = new AmmoniaOxygenReaction();
+ _n2oDecompositionReaction = new N2ODecompositionReaction();
+ _waterVaporReaction = new WaterVaporReaction();
+
+ SetupGasMixtures();
+ SetupTile();
+ });
+ }
+
+ private void SetupGasMixtures()
+ {
+ // Plasma Fire: Plasma + Oxygen at high temperature
+ // Temperature must be > PlasmaMinimumBurnTemperature for reaction to occur
+ _plasmaFireMixture = new GasMixture(Atmospherics.CellVolume)
+ {
+ Temperature = Atmospherics.PlasmaMinimumBurnTemperature + 100f // ~673K
+ };
+ _plasmaFireMixture.AdjustMoles(Gas.Plasma, 20f);
+ _plasmaFireMixture.AdjustMoles(Gas.Oxygen, 100f);
+
+ // Tritium Fire: Tritium + Oxygen at high temperature
+ // Temperature must be > FireMinimumTemperatureToExist for reaction to occur
+ _tritiumFireMixture = new GasMixture(Atmospherics.CellVolume)
+ {
+ Temperature = Atmospherics.FireMinimumTemperatureToExist + 100f // ~473K
+ };
+ _tritiumFireMixture.AdjustMoles(Gas.Tritium, 20f);
+ _tritiumFireMixture.AdjustMoles(Gas.Oxygen, 100f);
+
+ // Frezon Production: Oxygen + Tritium + Nitrogen catalyst
+ // Optimal temperature for efficiency (80% of max efficiency temp)
+ _frezonProductionMixture = new GasMixture(Atmospherics.CellVolume)
+ {
+ Temperature = Atmospherics.FrezonProductionMaxEfficiencyTemperature * 0.8f // ~48K
+ };
+ _frezonProductionMixture.AdjustMoles(Gas.Oxygen, 50f);
+ _frezonProductionMixture.AdjustMoles(Gas.Tritium, 50f);
+ _frezonProductionMixture.AdjustMoles(Gas.Nitrogen, 10f);
+
+ // Frezon Coolant: Frezon + Nitrogen
+ // Temperature must be > FrezonCoolLowerTemperature (23.15K) for reaction to occur
+ _frezonCoolantMixture = new GasMixture(Atmospherics.CellVolume)
+ {
+ Temperature = Atmospherics.T20C + 50f // ~343K
+ };
+ _frezonCoolantMixture.AdjustMoles(Gas.Frezon, 30f);
+ _frezonCoolantMixture.AdjustMoles(Gas.Nitrogen, 100f);
+
+ // Ammonia + Oxygen reaction (concentration-dependent, no temp requirement)
+ _ammoniaOxygenMixture = new GasMixture(Atmospherics.CellVolume)
+ {
+ Temperature = Atmospherics.T20C + 100f // ~393K
+ };
+ _ammoniaOxygenMixture.AdjustMoles(Gas.Ammonia, 40f);
+ _ammoniaOxygenMixture.AdjustMoles(Gas.Oxygen, 40f);
+
+ // N2O Decomposition (no temperature requirement, just needs N2O moles)
+ _n2oDecompositionMixture = new GasMixture(Atmospherics.CellVolume)
+ {
+ Temperature = Atmospherics.T20C + 100f // ~393K
+ };
+ _n2oDecompositionMixture.AdjustMoles(Gas.NitrousOxide, 100f);
+
+ // Water Vapor - needs water vapor to condense
+ _waterVaporMixture = new GasMixture(Atmospherics.CellVolume)
+ {
+ Temperature = Atmospherics.T20C
+ };
+ _waterVaporMixture.AdjustMoles(Gas.WaterVapor, 50f);
+ }
+
+ private void SetupTile()
+ {
+ // Create a tile atmosphere to use as holder for all reactions
+ var testIndices = new Vector2i(0, 0);
+ _testTile = new TileAtmosphere(_testGrid, testIndices, new GasMixture(Atmospherics.CellVolume)
+ {
+ Temperature = Atmospherics.T20C
+ });
+ }
+
+ private static GasMixture CloneMixture(GasMixture original)
+ {
+ return new GasMixture(original);
+ }
+
+ [Benchmark]
+ public async Task PlasmaFireReaction()
+ {
+ await _pair.Server.WaitPost(() =>
+ {
+ for (var i = 0; i < Iterations; i++)
+ {
+ var mixture = CloneMixture(_plasmaFireMixture);
+ _plasmaFireReaction.React(mixture, _testTile, _atmosphereSystem, 1f);
+ }
+ });
+ }
+
+ [Benchmark]
+ public async Task TritiumFireReaction()
+ {
+ await _pair.Server.WaitPost(() =>
+ {
+ for (var i = 0; i < Iterations; i++)
+ {
+ var mixture = CloneMixture(_tritiumFireMixture);
+ _tritiumFireReaction.React(mixture, _testTile, _atmosphereSystem, 1f);
+ }
+ });
+ }
+
+ [Benchmark]
+ public async Task FrezonProductionReaction()
+ {
+ await _pair.Server.WaitPost(() =>
+ {
+ for (var i = 0; i < Iterations; i++)
+ {
+ var mixture = CloneMixture(_frezonProductionMixture);
+ _frezonProductionReaction.React(mixture, _testTile, _atmosphereSystem, 1f);
+ }
+ });
+ }
+
+ [Benchmark]
+ public async Task FrezonCoolantReaction()
+ {
+ await _pair.Server.WaitPost(() =>
+ {
+ for (var i = 0; i < Iterations; i++)
+ {
+ var mixture = CloneMixture(_frezonCoolantMixture);
+ _frezonCoolantReaction.React(mixture, _testTile, _atmosphereSystem, 1f);
+ }
+ });
+ }
+
+ [Benchmark]
+ public async Task AmmoniaOxygenReaction()
+ {
+ await _pair.Server.WaitPost(() =>
+ {
+ for (var i = 0; i < Iterations; i++)
+ {
+ var mixture = CloneMixture(_ammoniaOxygenMixture);
+ _ammoniaOxygenReaction.React(mixture, _testTile, _atmosphereSystem, 1f);
+ }
+ });
+ }
+
+ [Benchmark]
+ public async Task N2ODecompositionReaction()
+ {
+ await _pair.Server.WaitPost(() =>
+ {
+ for (var i = 0; i < Iterations; i++)
+ {
+ var mixture = CloneMixture(_n2oDecompositionMixture);
+ _n2oDecompositionReaction.React(mixture, _testTile, _atmosphereSystem, 1f);
+ }
+ });
+ }
+
+ [Benchmark]
+ public async Task WaterVaporReaction()
+ {
+ await _pair.Server.WaitPost(() =>
+ {
+ for (var i = 0; i < Iterations; i++)
+ {
+ var mixture = CloneMixture(_waterVaporMixture);
+ _waterVaporReaction.React(mixture, _testTile, _atmosphereSystem, 1f);
+ }
+ });
+ }
+
+ [GlobalCleanup]
+ public async Task CleanupAsync()
+ {
+ await _pair.DisposeAsync();
+ PoolManager.Shutdown();
+ }
+}
diff --git a/Content.Client/Access/UI/AgentIDCardWindow.xaml.cs b/Content.Client/Access/UI/AgentIDCardWindow.xaml.cs
index 209c58c950..2b8ebf53b7 100644
--- a/Content.Client/Access/UI/AgentIDCardWindow.xaml.cs
+++ b/Content.Client/Access/UI/AgentIDCardWindow.xaml.cs
@@ -49,12 +49,12 @@ namespace Content.Client.Access.UI
icons.Sort((x, y) => string.Compare(x.LocalizedJobName, y.LocalizedJobName, StringComparison.CurrentCulture));
foreach (var jobIcon in icons)
{
- String styleBase = StyleBase.ButtonOpenBoth;
+ String styleBase = StyleClass.ButtonOpenBoth;
var modulo = i % JobIconColumnCount;
if (modulo == 0)
- styleBase = StyleBase.ButtonOpenRight;
+ styleBase = StyleClass.ButtonOpenRight;
else if (modulo == JobIconColumnCount - 1)
- styleBase = StyleBase.ButtonOpenLeft;
+ styleBase = StyleClass.ButtonOpenLeft;
// Generate buttons
var jobIconButton = new Button
diff --git a/Content.Client/Access/UI/GroupedAccessLevelChecklist.xaml.cs b/Content.Client/Access/UI/GroupedAccessLevelChecklist.xaml.cs
index 7af78d9e5f..2a85530c48 100644
--- a/Content.Client/Access/UI/GroupedAccessLevelChecklist.xaml.cs
+++ b/Content.Client/Access/UI/GroupedAccessLevelChecklist.xaml.cs
@@ -119,11 +119,11 @@ public sealed partial class GroupedAccessLevelChecklist : BoxContainer
if (_groupedAccessLevels.Count > 1)
{
if (AccessGroupList.ChildCount == 0)
- accessGroupButton.AddStyleClass(StyleBase.ButtonOpenLeft);
+ accessGroupButton.AddStyleClass(StyleClass.ButtonOpenLeft);
else if (_groupedAccessLevels.Count > 1 && AccessGroupList.ChildCount == (_groupedAccessLevels.Count - 1))
- accessGroupButton.AddStyleClass(StyleBase.ButtonOpenRight);
+ accessGroupButton.AddStyleClass(StyleClass.ButtonOpenRight);
else
- accessGroupButton.AddStyleClass(StyleBase.ButtonOpenBoth);
+ accessGroupButton.AddStyleClass(StyleClass.ButtonOpenBoth);
}
accessGroupButton.Pressed = _accessGroupTabIndex == orderedAccessGroups.IndexOf(accessGroup);
diff --git a/Content.Client/Actions/UI/ActionAlertTooltip.cs b/Content.Client/Actions/UI/ActionAlertTooltip.cs
index 664a67b406..065c16d61b 100644
--- a/Content.Client/Actions/UI/ActionAlertTooltip.cs
+++ b/Content.Client/Actions/UI/ActionAlertTooltip.cs
@@ -23,9 +23,10 @@ namespace Content.Client.Actions.UI
public ActionAlertTooltip(FormattedMessage name, FormattedMessage? desc, string? requires = null)
{
+ Stylesheet = IoCManager.Resolve().SheetSystem;
_gameTiming = IoCManager.Resolve();
- SetOnlyStyleClass(StyleNano.StyleClassTooltipPanel);
+ SetOnlyStyleClass(StyleClass.TooltipPanel);
BoxContainer vbox;
AddChild(vbox = new BoxContainer
@@ -36,7 +37,7 @@ namespace Content.Client.Actions.UI
var nameLabel = new RichTextLabel
{
MaxWidth = TooltipTextMaxWidth,
- StyleClasses = {StyleNano.StyleClassTooltipActionTitle}
+ StyleClasses = { StyleClass.TooltipTitle }
};
nameLabel.SetMessage(name);
vbox.AddChild(nameLabel);
@@ -46,7 +47,7 @@ namespace Content.Client.Actions.UI
var description = new RichTextLabel
{
MaxWidth = TooltipTextMaxWidth,
- StyleClasses = {StyleNano.StyleClassTooltipActionDescription}
+ StyleClasses = { StyleClass.TooltipDesc }
};
description.SetMessage(desc);
vbox.AddChild(description);
@@ -55,7 +56,7 @@ namespace Content.Client.Actions.UI
vbox.AddChild(_cooldownLabel = new RichTextLabel
{
MaxWidth = TooltipTextMaxWidth,
- StyleClasses = {StyleNano.StyleClassTooltipActionCooldown},
+ StyleClasses = { StyleClass.TooltipDesc },
Visible = false
});
@@ -64,7 +65,7 @@ namespace Content.Client.Actions.UI
var requiresLabel = new RichTextLabel
{
MaxWidth = TooltipTextMaxWidth,
- StyleClasses = {StyleNano.StyleClassTooltipActionRequirements}
+ StyleClasses = { StyleClass.TooltipDesc }
};
if (!FormattedMessage.TryFromMarkup("[color=#635c5c]" + requires + "[/color]", out var markup))
diff --git a/Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupWindow.xaml b/Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupWindow.xaml
index cc5207bb3a..bfe6b31c28 100644
--- a/Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupWindow.xaml
+++ b/Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupWindow.xaml
@@ -7,7 +7,7 @@
-
+
diff --git a/Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupWindow.xaml.cs b/Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupWindow.xaml.cs
index 148cbf4e18..7870dae7b2 100644
--- a/Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupWindow.xaml.cs
+++ b/Content.Client/Administration/UI/AdminRemarks/AdminMessagePopupWindow.xaml.cs
@@ -12,17 +12,19 @@ namespace Content.Client.Administration.UI.AdminRemarks;
[GenerateTypedNameReferences]
public sealed partial class AdminMessagePopupWindow : Control
{
+ [Dependency] private readonly IStylesheetManager _styleMan = default!;
+
private float _timer = float.MaxValue;
public event Action? OnDismissPressed;
-
public event Action? OnAcceptPressed;
public AdminMessagePopupWindow()
{
RobustXamlLoader.Load(this);
+ IoCManager.InjectDependencies(this);
- Stylesheet = IoCManager.Resolve().SheetSpace;
+ Stylesheet = _styleMan.SheetSystem;
AcceptButton.OnPressed += OnAcceptButtonPressed;
DismissButton.OnPressed += OnDismissButtonPressed;
@@ -49,7 +51,8 @@ public sealed partial class AdminMessagePopupWindow : Control
MessageContainer.AddChild(new AdminMessagePopupMessage(message));
}
- Description.SetMessage(FormattedMessage.FromMarkupOrThrow(Loc.GetString("admin-notes-message-desc", ("count", state.Messages.Length))));
+ Description.SetMessage(
+ FormattedMessage.FromMarkup(Loc.GetString("admin-notes-message-desc", ("count", state.Messages.Length))));
}
private void OnDismissButtonPressed(BaseButton.ButtonEventArgs obj)
diff --git a/Content.Client/Administration/UI/BanPanel/BanPanel.xaml.cs b/Content.Client/Administration/UI/BanPanel/BanPanel.xaml.cs
index 7566942506..cb2839f5d0 100644
--- a/Content.Client/Administration/UI/BanPanel/BanPanel.xaml.cs
+++ b/Content.Client/Administration/UI/BanPanel/BanPanel.xaml.cs
@@ -294,19 +294,19 @@ public sealed partial class BanPanel : DefaultWindow
}
///
- /// Adds a check button specifically for one "role" in a "group"
+ /// Adds a toggle button specifically for one "role" in a "group"
/// E.g. it would add the Chief Medical Officer "role" into the "Medical" group.
///
private void AddRoleCheckbox(string group, string role, GridContainer roleGroupInnerContainer, Button roleGroupCheckbox)
{
var roleCheckboxContainer = new BoxContainer();
- var roleCheckButton = new Button
+ var roleToggleButton = new Button
{
Name = role,
Text = role,
ToggleMode = true,
};
- roleCheckButton.OnToggled += args =>
+ roleToggleButton.OnToggled += args =>
{
// Checks the role group checkbox if all the children are pressed
if (args.Pressed && _roleCheckboxes[group].All(e => e.Item1.Pressed))
@@ -343,12 +343,12 @@ public sealed partial class BanPanel : DefaultWindow
roleCheckboxContainer.AddChild(jobIconTexture);
}
- roleCheckboxContainer.AddChild(roleCheckButton);
+ roleCheckboxContainer.AddChild(roleToggleButton);
roleGroupInnerContainer.AddChild(roleCheckboxContainer);
_roleCheckboxes.TryAdd(group, []);
- _roleCheckboxes[group].Add((roleCheckButton, rolePrototype));
+ _roleCheckboxes[group].Add((roleToggleButton, rolePrototype));
}
public void UpdateBanFlag(bool newFlag)
diff --git a/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml b/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml
index 2c27fdd2ce..fdaa838201 100644
--- a/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml
+++ b/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml
@@ -18,7 +18,7 @@
-
+
diff --git a/Content.Client/Administration/UI/CustomControls/PlayerListEntry.xaml.cs b/Content.Client/Administration/UI/CustomControls/PlayerListEntry.xaml.cs
index cd6a56ea71..cf2e776ea8 100644
--- a/Content.Client/Administration/UI/CustomControls/PlayerListEntry.xaml.cs
+++ b/Content.Client/Administration/UI/CustomControls/PlayerListEntry.xaml.cs
@@ -11,6 +11,9 @@ namespace Content.Client.Administration.UI.CustomControls;
[GenerateTypedNameReferences]
public sealed partial class PlayerListEntry : BoxContainer
{
+ private readonly ResPath _pinnedResPath = new("/Textures/Interface/Bwoink/pinned.png");
+ private readonly ResPath _unPinnedResPath = new("/Textures/Interface/Bwoink/un_pinned.png");
+
public PlayerListEntry()
{
RobustXamlLoader.Load(this);
@@ -44,15 +47,6 @@ public sealed partial class PlayerListEntry : BoxContainer
private void UpdatePinButtonTexture(bool isPinned)
{
- if (isPinned)
- {
- PlayerEntryPinButton?.RemoveStyleClass(StyleNano.StyleClassPinButtonUnpinned);
- PlayerEntryPinButton?.AddStyleClass(StyleNano.StyleClassPinButtonPinned);
- }
- else
- {
- PlayerEntryPinButton?.RemoveStyleClass(StyleNano.StyleClassPinButtonPinned);
- PlayerEntryPinButton?.AddStyleClass(StyleNano.StyleClassPinButtonUnpinned);
- }
+ PlayerEntryPinButton.TexturePath = isPinned ? _pinnedResPath.CanonPath : _unPinnedResPath.CanonPath;
}
}
diff --git a/Content.Client/Administration/UI/Notes/AdminNotesControl.xaml b/Content.Client/Administration/UI/Notes/AdminNotesControl.xaml
index 326e4bf3a3..09d36af1b0 100644
--- a/Content.Client/Administration/UI/Notes/AdminNotesControl.xaml
+++ b/Content.Client/Administration/UI/Notes/AdminNotesControl.xaml
@@ -5,7 +5,7 @@
-
+
diff --git a/Content.Client/Administration/UI/Notes/AdminNotesLine.xaml.cs b/Content.Client/Administration/UI/Notes/AdminNotesLine.xaml.cs
index 24e5cfdfab..97ddc15000 100644
--- a/Content.Client/Administration/UI/Notes/AdminNotesLine.xaml.cs
+++ b/Content.Client/Administration/UI/Notes/AdminNotesLine.xaml.cs
@@ -14,9 +14,6 @@ namespace Content.Client.Administration.UI.Notes;
[GenerateTypedNameReferences]
public sealed partial class AdminNotesLine : BoxContainer
{
- [Dependency] private readonly ILogManager _logManager = default!;
-
- private readonly ISawmill _sawmill = default!;
private readonly SpriteSystem _sprites;
private const string AdminNotesTextureBase = "/Textures/Interface/AdminNotes/";
@@ -36,8 +33,6 @@ public sealed partial class AdminNotesLine : BoxContainer
public AdminNotesLine(SpriteSystem sprites, SharedAdminNote note)
{
RobustXamlLoader.Load(this);
-
- _sawmill = _logManager.GetSawmill("admin.notes");
_sprites = sprites;
Note = note;
@@ -66,7 +61,7 @@ public sealed partial class AdminNotesLine : BoxContainer
if (iconPath is null)
{
SeverityRect.Visible = false;
- _sawmill.Warning($"Could not find an icon for note ID {Note.Id}");
+ Logger.WarningS("admin.notes", $"Could not find an icon for note ID {Note.Id}");
}
else
{
diff --git a/Content.Client/Administration/UI/Notes/NoteEdit.xaml b/Content.Client/Administration/UI/Notes/NoteEdit.xaml
index 72b2c55ce8..793d84113d 100644
--- a/Content.Client/Administration/UI/Notes/NoteEdit.xaml
+++ b/Content.Client/Administration/UI/Notes/NoteEdit.xaml
@@ -3,7 +3,7 @@
Title="Loading..."
MinSize="400 200">
-
+
-
+
diff --git a/Content.Client/Administration/UI/Notes/NoteEdit.xaml.cs b/Content.Client/Administration/UI/Notes/NoteEdit.xaml.cs
index c8e3afeb22..0c27d9d646 100644
--- a/Content.Client/Administration/UI/Notes/NoteEdit.xaml.cs
+++ b/Content.Client/Administration/UI/Notes/NoteEdit.xaml.cs
@@ -133,7 +133,7 @@ public sealed partial class NoteEdit : FancyWindow
private bool IsSecret { get; set; }
private NoteType NoteType { get; set; }
- private NoteSeverity? NoteSeverity
+ public NoteSeverity? NoteSeverity
{
get => _noteSeverity;
set
diff --git a/Content.Client/Administration/UI/PermissionsEui.cs b/Content.Client/Administration/UI/PermissionsEui.cs
index fe1237d4c9..96b53babb5 100644
--- a/Content.Client/Administration/UI/PermissionsEui.cs
+++ b/Content.Client/Administration/UI/PermissionsEui.cs
@@ -27,7 +27,7 @@ namespace Content.Client.Administration.UI
[Dependency] private readonly IClientAdminManager _adminManager = default!;
private readonly Menu _menu;
- private readonly List _subWindows = new();
+ private readonly List _subWindows = new();
private Dictionary _ranks =
new();
@@ -216,7 +216,7 @@ namespace Content.Client.Administration.UI
var titleControl = new Label { Text = admin.Title ?? Loc.GetString("permissions-eui-edit-admin-title-control-text").ToLowerInvariant() };
if (admin.Title == null) // none
{
- titleControl.StyleClasses.Add(StyleBase.StyleClassItalic);
+ titleControl.StyleClasses.Add(StyleClass.Italic);
}
al.AddChild(titleControl);
@@ -240,7 +240,7 @@ namespace Content.Client.Administration.UI
var rankControl = new Label { Text = rank };
if (italic)
{
- rankControl.StyleClasses.Add(StyleBase.StyleClassItalic);
+ rankControl.StyleClasses.Add(StyleClass.Italic);
}
al.AddChild(rankControl);
@@ -340,10 +340,9 @@ namespace Content.Client.Administration.UI
tab.AddChild(adminVBox);
tab.AddChild(rankVBox);
- Contents.AddChild(tab);
+ ContentsContainer.AddChild(tab);
+ ContentsContainer.MinSize = new(600, 400);
}
-
- protected override Vector2 ContentsMinimumSize => new Vector2(600, 400);
}
private sealed class EditAdminWindow : DefaultWindow
@@ -419,21 +418,21 @@ namespace Content.Client.Administration.UI
var inherit = new Button
{
Text = "I",
- StyleClasses = { StyleBase.ButtonOpenRight },
+ StyleClasses = { StyleClass.ButtonOpenRight },
Disabled = disable,
Group = group,
};
var sub = new Button
{
Text = "-",
- StyleClasses = { StyleBase.ButtonOpenBoth },
+ StyleClasses = { StyleClass.ButtonOpenBoth },
Disabled = disable,
Group = group
};
var plus = new Button
{
Text = "+",
- StyleClasses = { StyleBase.ButtonOpenLeft },
+ StyleClasses = { StyleClass.ButtonOpenLeft },
Disabled = disable,
Group = group
};
@@ -479,7 +478,7 @@ namespace Content.Client.Administration.UI
bottomButtons.AddChild(SaveButton);
- Contents.AddChild(new BoxContainer
+ ContentsContainer.AddChild(new BoxContainer
{
Orientation = LayoutOrientation.Vertical,
Children =
@@ -605,7 +604,7 @@ namespace Content.Client.Administration.UI
bottomButtons.AddChild(SaveButton);
- Contents.AddChild(new BoxContainer
+ ContentsContainer.AddChild(new BoxContainer
{
Orientation = LayoutOrientation.Vertical,
Children =
diff --git a/Content.Client/Administration/UI/Tabs/AdminTab/AdminTab.xaml b/Content.Client/Administration/UI/Tabs/AdminTab/AdminTab.xaml
index 0d4668d5bf..783d4c6106 100644
--- a/Content.Client/Administration/UI/Tabs/AdminTab/AdminTab.xaml
+++ b/Content.Client/Administration/UI/Tabs/AdminTab/AdminTab.xaml
@@ -7,10 +7,8 @@
MinSize="50 50">
-
-
diff --git a/Content.Client/Administration/UI/Tabs/AdminTab/PlayerActionsWindow.xaml b/Content.Client/Administration/UI/Tabs/AdminTab/PlayerActionsWindow.xaml
deleted file mode 100644
index 10718c25a5..0000000000
--- a/Content.Client/Administration/UI/Tabs/AdminTab/PlayerActionsWindow.xaml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Content.Client/Administration/UI/Tabs/AdminTab/PlayerActionsWindow.xaml.cs b/Content.Client/Administration/UI/Tabs/AdminTab/PlayerActionsWindow.xaml.cs
deleted file mode 100644
index 2216b6dfb0..0000000000
--- a/Content.Client/Administration/UI/Tabs/AdminTab/PlayerActionsWindow.xaml.cs
+++ /dev/null
@@ -1,64 +0,0 @@
-using Content.Shared.Administration;
-using JetBrains.Annotations;
-using Robust.Client.AutoGenerated;
-using Robust.Client.Console;
-using Robust.Client.UserInterface.Controls;
-using Robust.Client.UserInterface.CustomControls;
-using Robust.Client.UserInterface.XAML;
-using Robust.Shared.Utility;
-
-namespace Content.Client.Administration.UI.Tabs.AdminTab
-{
- [GenerateTypedNameReferences]
- [UsedImplicitly]
- public sealed partial class PlayerActionsWindow : DefaultWindow
- {
- private PlayerInfo? _selectedPlayer;
-
- public PlayerActionsWindow()
- {
- RobustXamlLoader.Load(this);
-
- SubmitKickButton.OnPressed += SubmitKickButtonOnPressed;
- SubmitAHelpButton.OnPressed += SubmitAhelpButtonOnPressed;
- SubmitRespawnButton.OnPressed += SubmitRespawnButtonOnPressed;
- PlayerList.OnSelectionChanged += OnListOnOnSelectionChanged;
- }
-
- private void OnListOnOnSelectionChanged(PlayerInfo? obj)
- {
- _selectedPlayer = obj;
- var disableButtons = _selectedPlayer == null;
- SubmitKickButton.Disabled = disableButtons;
- SubmitAHelpButton.Disabled = disableButtons;
- SubmitRespawnButton.Disabled = disableButtons;
- }
-
- private void SubmitKickButtonOnPressed(BaseButton.ButtonEventArgs obj)
- {
- if (_selectedPlayer == null)
- return;
-
- IoCManager.Resolve().ExecuteCommand(
- $"kick \"{_selectedPlayer.Username}\" \"{CommandParsing.Escape(ReasonLine.Text)}\"");
- }
-
- private void SubmitAhelpButtonOnPressed(BaseButton.ButtonEventArgs obj)
- {
- if (_selectedPlayer == null)
- return;
-
- IoCManager.Resolve().ExecuteCommand(
- $"openahelp \"{_selectedPlayer.SessionId}\"");
- }
-
- private void SubmitRespawnButtonOnPressed(BaseButton.ButtonEventArgs obj)
- {
- if (_selectedPlayer == null)
- return;
-
- IoCManager.Resolve().ExecuteCommand(
- $"respawn \"{_selectedPlayer.Username}\"");
- }
- }
-}
diff --git a/Content.Client/Administration/UI/Tabs/AdminTab/TeleportWindow.xaml b/Content.Client/Administration/UI/Tabs/AdminTab/TeleportWindow.xaml
deleted file mode 100644
index cceb21f14d..0000000000
--- a/Content.Client/Administration/UI/Tabs/AdminTab/TeleportWindow.xaml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
diff --git a/Content.Client/Administration/UI/Tabs/AdminTab/TeleportWindow.xaml.cs b/Content.Client/Administration/UI/Tabs/AdminTab/TeleportWindow.xaml.cs
deleted file mode 100644
index 1978b5c3c0..0000000000
--- a/Content.Client/Administration/UI/Tabs/AdminTab/TeleportWindow.xaml.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-using Content.Shared.Administration;
-using JetBrains.Annotations;
-using Robust.Client.AutoGenerated;
-using Robust.Client.Console;
-using Robust.Client.UserInterface.Controls;
-using Robust.Client.UserInterface.CustomControls;
-using Robust.Shared.IoC;
-
-namespace Content.Client.Administration.UI.Tabs.AdminTab
-{
- [GenerateTypedNameReferences]
- [UsedImplicitly]
- public sealed partial class TeleportWindow : DefaultWindow
- {
- private PlayerInfo? _selectedPlayer;
-
- protected override void EnteredTree()
- {
- SubmitButton.OnPressed += SubmitButtonOnOnPressed;
- PlayerList.OnSelectionChanged += OnListOnOnSelectionChanged;
- }
-
- private void OnListOnOnSelectionChanged(PlayerInfo? obj)
- {
- _selectedPlayer = obj;
- SubmitButton.Disabled = _selectedPlayer == null;
- }
-
- private void SubmitButtonOnOnPressed(BaseButton.ButtonEventArgs obj)
- {
- if (_selectedPlayer == null)
- return;
- // Execute command
- IoCManager.Resolve().ExecuteCommand(
- $"tpto \"{_selectedPlayer.Username}\"");
- }
- }
-}
diff --git a/Content.Client/Anomaly/Ui/AnomalyGeneratorWindow.xaml b/Content.Client/Anomaly/Ui/AnomalyGeneratorWindow.xaml
index 9784b34557..88df194ecb 100644
--- a/Content.Client/Anomaly/Ui/AnomalyGeneratorWindow.xaml
+++ b/Content.Client/Anomaly/Ui/AnomalyGeneratorWindow.xaml
@@ -14,7 +14,7 @@
VerticalExpand="True"
Margin="0 0 0 0"
VerticalAlignment="Center">
-
+
-
-
+
+
OnPlayerAction?.Invoke(SharedSpaceVillainArcadeComponent.PlayerAction.NewGame);
grid.AddChild(newGame);
- Contents.AddChild(grid);
+ ContentsContainer.AddChild(grid);
}
private void UpdateMetadata(SharedSpaceVillainArcadeComponent.SpaceVillainArcadeMetaDataUpdateMessage message)
diff --git a/Content.Client/AssemblyInfo.cs b/Content.Client/AssemblyInfo.cs
index 54b2cd50ac..513ab37ab2 100644
--- a/Content.Client/AssemblyInfo.cs
+++ b/Content.Client/AssemblyInfo.cs
@@ -1,3 +1,4 @@
using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("Content.Tests")]
+[assembly: InternalsVisibleTo("Content.IntegrationTests")]
diff --git a/Content.Client/Atmos/EntitySystems/DeltaPressureSystem.cs b/Content.Client/Atmos/EntitySystems/DeltaPressureSystem.cs
new file mode 100644
index 0000000000..3d9893ac62
--- /dev/null
+++ b/Content.Client/Atmos/EntitySystems/DeltaPressureSystem.cs
@@ -0,0 +1,5 @@
+using Content.Shared.Atmos.EntitySystems;
+
+namespace Content.Client.Atmos.EntitySystems;
+
+public sealed class DeltaPressureSystem : SharedDeltaPressureSystem;
diff --git a/Content.Client/Atmos/Monitor/UI/AirAlarmWindow.xaml.cs b/Content.Client/Atmos/Monitor/UI/AirAlarmWindow.xaml.cs
index 64680b5321..60e06e98ce 100644
--- a/Content.Client/Atmos/Monitor/UI/AirAlarmWindow.xaml.cs
+++ b/Content.Client/Atmos/Monitor/UI/AirAlarmWindow.xaml.cs
@@ -1,6 +1,6 @@
using Content.Client.Atmos.Monitor.UI.Widgets;
using Content.Client.Message;
-using Content.Client.Stylesheets;
+using Content.Client.Stylesheets.Palette;
using Content.Client.UserInterface.Controls;
using Content.Shared.Atmos;
using Content.Shared.Atmos.Monitor;
@@ -17,7 +17,7 @@ namespace Content.Client.Atmos.Monitor.UI;
public sealed partial class AirAlarmWindow : FancyWindow
{
public event Action? AtmosDeviceDataChanged;
- public event Action? AtmosDeviceDataCopied;
+ public event Action? AtmosDeviceDataCopied;
public event Action? AtmosAlarmThresholdChanged;
public event Action? AirAlarmModeChanged;
public event Action? AutoModeChanged;
@@ -131,7 +131,7 @@ public sealed partial class AirAlarmWindow : FancyWindow
case GasVentPumpData pump:
if (!_pumps.TryGetValue(addr, out var pumpControl))
{
- var control= new PumpControl(pump, addr);
+ var control = new PumpControl(pump, addr);
control.PumpDataChanged += AtmosDeviceDataChanged;
control.PumpDataCopied += AtmosDeviceDataCopied;
_pumps.Add(addr, control);
@@ -186,11 +186,9 @@ public sealed partial class AirAlarmWindow : FancyWindow
{
return curAlarm switch
{
- AtmosAlarmType.Danger => StyleNano.DangerousRedFore,
- AtmosAlarmType.Warning => StyleNano.ConcerningOrangeFore,
- _ => StyleNano.GoodGreenFore,
+ AtmosAlarmType.Danger => Palettes.Status.Critical,
+ AtmosAlarmType.Warning => Palettes.Status.Warning,
+ _ => Palettes.Status.Good,
};
}
-
-
}
diff --git a/Content.Client/Atmos/Monitor/UI/Widgets/ThresholdBoundControl.xaml.cs b/Content.Client/Atmos/Monitor/UI/Widgets/ThresholdBoundControl.xaml.cs
index 38c631e630..f4b31fd95b 100644
--- a/Content.Client/Atmos/Monitor/UI/Widgets/ThresholdBoundControl.xaml.cs
+++ b/Content.Client/Atmos/Monitor/UI/Widgets/ThresholdBoundControl.xaml.cs
@@ -1,3 +1,4 @@
+using Content.Client.Stylesheets;
using Content.Shared.Atmos.Monitor;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
@@ -42,11 +43,11 @@ public sealed partial class ThresholdBoundControl : BoxContainer
if (enabled)
{
- CBoundLabel.RemoveStyleClass("Disabled");
+ CBoundLabel.RemoveStyleClass(StyleClass.LabelWeak);
}
else
{
- CBoundLabel.SetOnlyStyleClass("Disabled");
+ CBoundLabel.SetOnlyStyleClass(StyleClass.LabelWeak);
}
}
diff --git a/Content.Client/Atmos/UI/GasCanisterWindow.xaml b/Content.Client/Atmos/UI/GasCanisterWindow.xaml
index f76e32a31d..3c7647385a 100644
--- a/Content.Client/Atmos/UI/GasCanisterWindow.xaml
+++ b/Content.Client/Atmos/UI/GasCanisterWindow.xaml
@@ -4,7 +4,7 @@
MinSize="480 400" Title="Canister">
-
+
@@ -16,7 +16,7 @@
-
+
@@ -29,7 +29,7 @@
-
+
diff --git a/Content.Client/Bed/Cryostorage/CryostorageEntryControl.xaml b/Content.Client/Bed/Cryostorage/CryostorageEntryControl.xaml
index 5acb142a60..3378dc7797 100644
--- a/Content.Client/Bed/Cryostorage/CryostorageEntryControl.xaml
+++ b/Content.Client/Bed/Cryostorage/CryostorageEntryControl.xaml
@@ -7,10 +7,7 @@
Orientation="Vertical"
HorizontalExpand="True"
Margin="0 0 0 5">
-
-
-
-
+
diff --git a/Content.Client/Bed/Cryostorage/CryostorageMenu.xaml b/Content.Client/Bed/Cryostorage/CryostorageMenu.xaml
index 5360cdb38e..b0f8d5cb0a 100644
--- a/Content.Client/Bed/Cryostorage/CryostorageMenu.xaml
+++ b/Content.Client/Bed/Cryostorage/CryostorageMenu.xaml
@@ -14,10 +14,8 @@
-
-
-
+ Margin="15"
+ StyleClasses="PanelDark">
diff --git a/Content.Client/Bql/ToolshedVisualizeWindow.xaml b/Content.Client/Bql/ToolshedVisualizeWindow.xaml
index 9affbf2181..b20d05b4f3 100644
--- a/Content.Client/Bql/ToolshedVisualizeWindow.xaml
+++ b/Content.Client/Bql/ToolshedVisualizeWindow.xaml
@@ -1,7 +1,7 @@
-
+
diff --git a/Content.Client/Bql/ToolshedVisualizeWindow.xaml.cs b/Content.Client/Bql/ToolshedVisualizeWindow.xaml.cs
index 55ee029a91..35a7524a6f 100644
--- a/Content.Client/Bql/ToolshedVisualizeWindow.xaml.cs
+++ b/Content.Client/Bql/ToolshedVisualizeWindow.xaml.cs
@@ -21,8 +21,6 @@ internal sealed partial class ToolshedVisualizeWindow : DefaultWindow
RobustXamlLoader.Load(this);
}
- protected override Vector2 ContentsMinimumSize => new(500, 700);
-
public void Update((string name, NetEntity entity)[] entities)
{
StatusLabel.Text = _loc.GetString("ui-bql-results-status", ("count", entities.Length));
diff --git a/Content.Client/Cargo/UI/BountyEntry.xaml b/Content.Client/Cargo/UI/BountyEntry.xaml
index 7c61323bd5..99874cf1a5 100644
--- a/Content.Client/Cargo/UI/BountyEntry.xaml
+++ b/Content.Client/Cargo/UI/BountyEntry.xaml
@@ -3,7 +3,7 @@
Margin="10 10 10 0"
HorizontalExpand="True"
Visible="True">
-
+
diff --git a/Content.Client/Changeling/UI/ChangelingTransformBoundUserInterface.cs b/Content.Client/Changeling/UI/ChangelingTransformBoundUserInterface.cs
index 97c07dd8c9..64d809c0c5 100644
--- a/Content.Client/Changeling/UI/ChangelingTransformBoundUserInterface.cs
+++ b/Content.Client/Changeling/UI/ChangelingTransformBoundUserInterface.cs
@@ -1,4 +1,4 @@
-using Content.Client.Stylesheets;
+using Content.Client.Stylesheets.Palette;
using Content.Client.UserInterface.Controls;
using Content.Shared.Changeling.Components;
using Content.Shared.Changeling.Systems;
@@ -11,8 +11,8 @@ namespace Content.Client.Changeling.UI;
public sealed partial class ChangelingTransformBoundUserInterface(EntityUid owner, Enum uiKey) : BoundUserInterface(owner, uiKey)
{
private SimpleRadialMenu? _menu;
- private static readonly Color SelectedOptionBackground = StyleNano.ButtonColorGoodDefault.WithAlpha(128);
- private static readonly Color SelectedOptionHoverBackground = StyleNano.ButtonColorGoodHovered.WithAlpha(128);
+ private static readonly Color SelectedOptionBackground = Palettes.Green.Element.WithAlpha(128);
+ private static readonly Color SelectedOptionHoverBackground = Palettes.Green.HoveredElement.WithAlpha(128);
protected override void Open()
{
diff --git a/Content.Client/Changelog/ChangelogButton.cs b/Content.Client/Changelog/ChangelogButton.cs
index 6e8862492c..8611866b0d 100644
--- a/Content.Client/Changelog/ChangelogButton.cs
+++ b/Content.Client/Changelog/ChangelogButton.cs
@@ -36,12 +36,12 @@ namespace Content.Client.Changelog
if (_changelogManager.NewChangelogEntries)
{
Text = Loc.GetString("changelog-button-new-entries");
- StyleClasses.Add(StyleBase.ButtonCaution);
+ StyleClasses.Add(StyleClass.Negative);
}
else
{
Text = Loc.GetString("changelog-button");
- StyleClasses.Remove(StyleBase.ButtonCaution);
+ StyleClasses.Remove(StyleClass.Negative);
}
}
}
diff --git a/Content.Client/Changelog/ChangelogManager.cs b/Content.Client/Changelog/ChangelogManager.cs
index 657d0cb3ac..545d001aab 100644
--- a/Content.Client/Changelog/ChangelogManager.cs
+++ b/Content.Client/Changelog/ChangelogManager.cs
@@ -52,6 +52,7 @@ namespace Content.Client.Changelog
// Open changelog purely to compare to the last viewed date.
var changelogs = await LoadChangelog();
UpdateChangelogs(changelogs);
+ _configManager.OnValueChanged(CCVars.ServerId, OnServerIdCVarChanged);
}
private void UpdateChangelogs(List changelogs)
@@ -81,6 +82,11 @@ namespace Content.Client.Changelog
MaxId = changelog.Entries.Max(c => c.Id);
+ CheckLastSeenEntry();
+ }
+
+ private void CheckLastSeenEntry()
+ {
var path = new ResPath($"/changelog_last_seen_{_configManager.GetCVar(CCVars.ServerId)}");
if (_resource.UserData.TryReadAllText(path, out var lastReadIdText))
{
@@ -92,6 +98,11 @@ namespace Content.Client.Changelog
NewChangelogEntriesChanged?.Invoke();
}
+ private void OnServerIdCVarChanged(string newValue)
+ {
+ CheckLastSeenEntry();
+ }
+
public Task> LoadChangelog()
{
return Task.Run(() =>
diff --git a/Content.Client/Changelog/ChangelogTab.xaml.cs b/Content.Client/Changelog/ChangelogTab.xaml.cs
index 851ed20422..61ce509594 100644
--- a/Content.Client/Changelog/ChangelogTab.xaml.cs
+++ b/Content.Client/Changelog/ChangelogTab.xaml.cs
@@ -58,7 +58,7 @@ public sealed partial class ChangelogTab : Control
ChangelogBody.AddChild(new Label
{
Text = dayNice,
- StyleClasses = { StyleBase.StyleClassLabelHeading },
+ StyleClasses = { StyleClass.LabelHeading },
Margin = new Thickness(4, 6, 0, 0)
});
@@ -117,7 +117,7 @@ public sealed partial class ChangelogTab : Control
};
readDivider.AddChild(hBox);
- readDivider.AddChild(new PanelContainer { StyleClasses = { StyleBase.ClassLowDivider } });
+ readDivider.AddChild(new PanelContainer { StyleClasses = { StyleClass.LowDivider } });
ChangelogBody.AddChild(readDivider);
if (first)
diff --git a/Content.Client/Changelog/ChangelogWindow.xaml b/Content.Client/Changelog/ChangelogWindow.xaml
index 355452dbfa..8325de02b5 100644
--- a/Content.Client/Changelog/ChangelogWindow.xaml
+++ b/Content.Client/Changelog/ChangelogWindow.xaml
@@ -2,8 +2,9 @@
xmlns:ui="clr-namespace:Content.Client.Changelog"
Title="{Loc 'changelog-window-title'}"
MinSize="500 400"
- SetSize="500 400">
-
+ SetSize="500 400"
+ Stylesheet="Interface">
+
diff --git a/Content.Client/Changelog/ChangelogWindow.xaml.cs b/Content.Client/Changelog/ChangelogWindow.xaml.cs
index d8f560f151..801d0859c3 100644
--- a/Content.Client/Changelog/ChangelogWindow.xaml.cs
+++ b/Content.Client/Changelog/ChangelogWindow.xaml.cs
@@ -21,8 +21,7 @@ namespace Content.Client.Changelog
public ChangelogWindow()
{
RobustXamlLoader.Load(this);
- WindowTitle.AddStyleClass(StyleBase.StyleClassLabelHeading);
- Stylesheet = IoCManager.Resolve().SheetSpace;
+ WindowTitle.AddStyleClass(StyleClass.LabelHeading);
}
protected override void Opened()
diff --git a/Content.Client/Chat/Managers/ChatManager.cs b/Content.Client/Chat/Managers/ChatManager.cs
index 68707e021c..1b66bf8732 100644
--- a/Content.Client/Chat/Managers/ChatManager.cs
+++ b/Content.Client/Chat/Managers/ChatManager.cs
@@ -31,6 +31,11 @@ internal sealed class ChatManager : IChatManager
// See server-side manager. This just exists for shared code.
}
+ public void SendAdminAlertNoFormatOrEscape(string message)
+ {
+ // See server-side manager. This just exists for shared code.
+ }
+
public void SendMessage(string text, ChatSelectChannel channel)
{
var str = text.ToString();
diff --git a/Content.Client/Chemistry/UI/ChemMasterWindow.xaml b/Content.Client/Chemistry/UI/ChemMasterWindow.xaml
index aca316f6b3..5bc640ab44 100644
--- a/Content.Client/Chemistry/UI/ChemMasterWindow.xaml
+++ b/Content.Client/Chemistry/UI/ChemMasterWindow.xaml
@@ -33,8 +33,8 @@
+
-
@@ -82,7 +82,7 @@
-
+
@@ -112,9 +112,9 @@
-
+
-
+
@@ -122,7 +122,7 @@
-
+
diff --git a/Content.Client/Chemistry/UI/ChemMasterWindow.xaml.cs b/Content.Client/Chemistry/UI/ChemMasterWindow.xaml.cs
index 14b55066e9..d610f34b29 100644
--- a/Content.Client/Chemistry/UI/ChemMasterWindow.xaml.cs
+++ b/Content.Client/Chemistry/UI/ChemMasterWindow.xaml.cs
@@ -53,14 +53,14 @@ namespace Content.Client.Chemistry.UI
{
// For every button decide which stylebase to have
// Every row has 10 buttons
- String styleBase = StyleBase.ButtonOpenBoth;
+ String styleBase = StyleClass.ButtonOpenBoth;
uint modulo = i % 10;
if (i > 0 && modulo == 0)
- styleBase = StyleBase.ButtonOpenRight;
+ styleBase = StyleClass.ButtonOpenRight;
else if (i > 0 && modulo == 9)
- styleBase = StyleBase.ButtonOpenLeft;
+ styleBase = StyleClass.ButtonOpenLeft;
else if (i == 0)
- styleBase = StyleBase.ButtonOpenRight;
+ styleBase = StyleClass.ButtonOpenRight;
// Generate buttons
PillTypeButtons[i] = new Button
@@ -113,16 +113,16 @@ namespace Content.Client.Chemistry.UI
var buttonConfigs = new (string text, ChemMasterReagentAmount amount, string styleClass)[]
{
- ("1", ChemMasterReagentAmount.U1, StyleBase.ButtonOpenBoth),
- ("5", ChemMasterReagentAmount.U5, StyleBase.ButtonOpenBoth),
- ("10", ChemMasterReagentAmount.U10, StyleBase.ButtonOpenBoth),
- ("15", ChemMasterReagentAmount.U15, StyleBase.ButtonOpenBoth),
- ("20", ChemMasterReagentAmount.U20, StyleBase.ButtonOpenBoth),
- ("25", ChemMasterReagentAmount.U25, StyleBase.ButtonOpenBoth),
- ("30", ChemMasterReagentAmount.U30, StyleBase.ButtonOpenBoth),
- ("50", ChemMasterReagentAmount.U50, StyleBase.ButtonOpenBoth),
- ("100", ChemMasterReagentAmount.U100, StyleBase.ButtonOpenBoth),
- (Loc.GetString("chem-master-window-buffer-all-amount"), ChemMasterReagentAmount.All, StyleBase.ButtonOpenLeft),
+ ("1", ChemMasterReagentAmount.U1, StyleClass.ButtonOpenBoth),
+ ("5", ChemMasterReagentAmount.U5, StyleClass.ButtonOpenBoth),
+ ("10", ChemMasterReagentAmount.U10, StyleClass.ButtonOpenBoth),
+ ("15", ChemMasterReagentAmount.U15, StyleClass.ButtonOpenBoth),
+ ("20", ChemMasterReagentAmount.U20, StyleClass.ButtonOpenBoth),
+ ("25", ChemMasterReagentAmount.U25, StyleClass.ButtonOpenBoth),
+ ("30", ChemMasterReagentAmount.U30, StyleClass.ButtonOpenBoth),
+ ("50", ChemMasterReagentAmount.U50, StyleClass.ButtonOpenBoth),
+ ("100", ChemMasterReagentAmount.U100, StyleClass.ButtonOpenBoth),
+ (Loc.GetString("chem-master-window-buffer-all-amount"), ChemMasterReagentAmount.All, StyleClass.ButtonOpenLeft),
};
var buttons = new List();
@@ -252,7 +252,7 @@ namespace Content.Client.Chemistry.UI
var bufferVol = new Label
{
Text = $"{state.BufferCurrentVolume}u",
- StyleClasses = { StyleNano.StyleClassLabelSecondaryColor }
+ StyleClasses = { StyleClass.LabelWeak }
};
bufferHBox.AddChild(bufferVol);
@@ -321,7 +321,7 @@ namespace Content.Client.Chemistry.UI
new Label
{
Text = $"{info.CurrentVolume}/{info.MaxVolume}",
- StyleClasses = { StyleNano.StyleClassLabelSecondaryColor }
+ StyleClasses = { StyleClass.LabelWeak }
}
}
});
@@ -376,7 +376,7 @@ namespace Content.Client.Chemistry.UI
new Label
{
Text = $"{quantity}u",
- StyleClasses = { StyleNano.StyleClassLabelSecondaryColor }
+ StyleClasses = { StyleClass.LabelWeak }
},
// Padding
diff --git a/Content.Client/Chemistry/UI/HyposprayStatusControl.cs b/Content.Client/Chemistry/UI/HyposprayStatusControl.cs
index 37b6fb5ed8..a564bcefc6 100644
--- a/Content.Client/Chemistry/UI/HyposprayStatusControl.cs
+++ b/Content.Client/Chemistry/UI/HyposprayStatusControl.cs
@@ -23,7 +23,7 @@ public sealed class HyposprayStatusControl : Control
{
_parent = parent;
_solutionContainers = solutionContainers;
- _label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
+ _label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
AddChild(_label);
}
diff --git a/Content.Client/Chemistry/UI/InjectorStatusControl.cs b/Content.Client/Chemistry/UI/InjectorStatusControl.cs
index 0358876b76..24f988bd35 100644
--- a/Content.Client/Chemistry/UI/InjectorStatusControl.cs
+++ b/Content.Client/Chemistry/UI/InjectorStatusControl.cs
@@ -24,7 +24,7 @@ public sealed class InjectorStatusControl : Control
{
_parent = parent;
_solutionContainers = solutionContainers;
- _label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
+ _label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
AddChild(_label);
}
diff --git a/Content.Client/Chemistry/UI/ReagentDispenserWindow.xaml.cs b/Content.Client/Chemistry/UI/ReagentDispenserWindow.xaml.cs
index 2b64eed570..1b56a1b4ec 100644
--- a/Content.Client/Chemistry/UI/ReagentDispenserWindow.xaml.cs
+++ b/Content.Client/Chemistry/UI/ReagentDispenserWindow.xaml.cs
@@ -107,7 +107,7 @@ namespace Content.Client.Chemistry.UI
var quantityLabel = new Label
{
Text = Loc.GetString("reagent-dispenser-window-quantity-label-text", ("quantity", quantity)),
- StyleClasses = { StyleNano.StyleClassLabelSecondaryColor },
+ StyleClasses = { StyleClass.LabelWeak },
};
ContainerInfo.Children.Add(new BoxContainer
diff --git a/Content.Client/Chemistry/UI/SolutionStatusControl.cs b/Content.Client/Chemistry/UI/SolutionStatusControl.cs
index 1a33ffb0e1..8a551a262c 100644
--- a/Content.Client/Chemistry/UI/SolutionStatusControl.cs
+++ b/Content.Client/Chemistry/UI/SolutionStatusControl.cs
@@ -29,7 +29,7 @@ public sealed class SolutionStatusControl : PollingItemStatusControl();
_spriteSystem = _entManager.System();
@@ -288,7 +284,7 @@ namespace Content.Client.Construction.UI
if (!_constructionSystem!.TryGetRecipePrototype(recipe.ID, out var targetProtoId))
{
- _sawmill.Error("Cannot find the target prototype in the recipe cache with the id \"{0}\" of {1}.",
+ Logger.Error("Cannot find the target prototype in the recipe cache with the id \"{0}\" of {1}.",
recipe.ID,
nameof(ConstructionPrototype));
continue;
diff --git a/Content.Client/ContextMenu/UI/ContextMenuElement.xaml b/Content.Client/ContextMenu/UI/ContextMenuElement.xaml
index d0e39865b8..271b6b1bff 100644
--- a/Content.Client/ContextMenu/UI/ContextMenuElement.xaml
+++ b/Content.Client/ContextMenu/UI/ContextMenuElement.xaml
@@ -13,7 +13,8 @@
Name="IconLabel"
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
- StyleClasses="contextMenuIconLabel"
+ StyleClasses="LabelSubText"
+ Align="Right"
Visible="false"/>
(_crayon.Owner).MaxCharges;
- _label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
+ _label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
AddChild(_label);
}
diff --git a/Content.Client/Crayon/UI/CrayonWindow.xaml.cs b/Content.Client/Crayon/UI/CrayonWindow.xaml.cs
index f1ac5a79cb..166ba01832 100644
--- a/Content.Client/Crayon/UI/CrayonWindow.xaml.cs
+++ b/Content.Client/Crayon/UI/CrayonWindow.xaml.cs
@@ -137,7 +137,8 @@ namespace Content.Client.Crayon.UI
private void ButtonOnPressed(ButtonEventArgs obj)
{
- if (obj.Button.Name == null) return;
+ if (obj.Button.Name == null)
+ return;
_selected = obj.Button.Name;
_autoSelected = null;
diff --git a/Content.Client/Credits/CreditsWindow.xaml.cs b/Content.Client/Credits/CreditsWindow.xaml.cs
index 6035bcc2bd..c068eb5a8c 100644
--- a/Content.Client/Credits/CreditsWindow.xaml.cs
+++ b/Content.Client/Credits/CreditsWindow.xaml.cs
@@ -258,7 +258,7 @@ public sealed partial class CreditsWindow : DefaultWindow
foreach (var entry in CreditsManager.GetLicenses(_resourceManager).OrderBy(p => p.Name))
{
licensesContainer.AddChild(new Label
- { StyleClasses = { StyleBase.StyleClassLabelHeading }, Text = entry.Name });
+ { StyleClasses = { StyleClass.LabelHeading }, Text = entry.Name });
// We split these line by line because otherwise
// the LGPL causes Clyde to go out of bounds in the rendering code.
@@ -299,7 +299,7 @@ public sealed partial class CreditsWindow : DefaultWindow
first = false;
patronsContainer.AddChild(new Label
- { StyleClasses = { StyleBase.StyleClassLabelHeading }, Text = $"{tier.Key}" });
+ { StyleClasses = { StyleClass.LabelHeading }, Text = $"{tier.Key}" });
var msg = string.Join(", ", tier.OrderBy(p => p.Name).Select(p => p.Name));
@@ -347,7 +347,7 @@ public sealed partial class CreditsWindow : DefaultWindow
first = false;
ss14ContributorsContainer.AddChild(new Label
- { StyleClasses = { StyleBase.StyleClassLabelHeading }, Text = title });
+ { StyleClasses = { StyleClass.LabelHeading }, Text = title });
var label = new RichTextLabel();
var text = _resourceManager.ContentFileReadAllText($"/Credits/{path}");
diff --git a/Content.Client/CriminalRecords/CriminalRecordsConsoleWindow.xaml.cs b/Content.Client/CriminalRecords/CriminalRecordsConsoleWindow.xaml.cs
index 33b4fbc335..dcae68fa7e 100644
--- a/Content.Client/CriminalRecords/CriminalRecordsConsoleWindow.xaml.cs
+++ b/Content.Client/CriminalRecords/CriminalRecordsConsoleWindow.xaml.cs
@@ -276,7 +276,7 @@ public sealed partial class CriminalRecordsConsoleWindow : FancyWindow
private void SetStatus(SecurityStatus status)
{
- if (status == SecurityStatus.Wanted || status == SecurityStatus.Suspected)
+ if (status == SecurityStatus.Wanted || status == SecurityStatus.Suspected || status == SecurityStatus.Hostile)
{
GetReason(status);
return;
@@ -322,6 +322,8 @@ public sealed partial class CriminalRecordsConsoleWindow : FancyWindow
SecurityStatus.Detained => "hud_incarcerated",
SecurityStatus.Discharged => "hud_discharged",
SecurityStatus.Suspected => "hud_suspected",
+ SecurityStatus.Hostile => "hud_hostile",
+ SecurityStatus.Eliminated => "hud_eliminated",
_ => "SecurityIconNone"
};
}
diff --git a/Content.Client/Damage/DamageVisualsSystem.cs b/Content.Client/Damage/DamageVisualsSystem.cs
index 065bf628bc..ac3ff819aa 100644
--- a/Content.Client/Damage/DamageVisualsSystem.cs
+++ b/Content.Client/Damage/DamageVisualsSystem.cs
@@ -1,5 +1,6 @@
using System.Linq;
using Content.Shared.Damage;
+using Content.Shared.Damage.Components;
using Content.Shared.Damage.Prototypes;
using Content.Shared.FixedPoint;
using Robust.Client.GameObjects;
diff --git a/Content.Client/Decals/UI/DecalPlacerWindow.xaml.cs b/Content.Client/Decals/UI/DecalPlacerWindow.xaml.cs
index adeb451a07..873fb851b7 100644
--- a/Content.Client/Decals/UI/DecalPlacerWindow.xaml.cs
+++ b/Content.Client/Decals/UI/DecalPlacerWindow.xaml.cs
@@ -157,15 +157,12 @@ public sealed partial class DecalPlacerWindow : DefaultWindow
{
var panelContainer = new PanelContainer
{
- PanelOverride = new StyleBoxFlat
- {
- BackgroundColor = StyleNano.ButtonColorDefault
- },
Children =
{
button
}
};
+ panelContainer.SetOnlyStyleClass(StyleClass.PanelLight);
Grid.AddChild(panelContainer);
}
else
diff --git a/Content.Client/Disposal/Mailing/MailingUnitWindow.xaml b/Content.Client/Disposal/Mailing/MailingUnitWindow.xaml
index 0acd300895..ab910d2db4 100644
--- a/Content.Client/Disposal/Mailing/MailingUnitWindow.xaml
+++ b/Content.Client/Disposal/Mailing/MailingUnitWindow.xaml
@@ -47,7 +47,7 @@
Access="Public"
Text="{Loc 'ui-disposal-unit-button-eject'}"
StyleClasses="OpenBoth" />
-
diff --git a/Content.Client/Disposal/Unit/DisposalUnitWindow.xaml b/Content.Client/Disposal/Unit/DisposalUnitWindow.xaml
index 60ca7ba0db..312f80c176 100644
--- a/Content.Client/Disposal/Unit/DisposalUnitWindow.xaml
+++ b/Content.Client/Disposal/Unit/DisposalUnitWindow.xaml
@@ -34,7 +34,7 @@
Access="Public"
Text="{Loc 'ui-disposal-unit-button-eject'}"
StyleClasses="OpenBoth" />
-
diff --git a/Content.Client/Doors/DoorSystem.cs b/Content.Client/Doors/DoorSystem.cs
index ae9c7eda78..0f6537eead 100644
--- a/Content.Client/Doors/DoorSystem.cs
+++ b/Content.Client/Doors/DoorSystem.cs
@@ -68,7 +68,7 @@ public sealed class DoorSystem : SharedDoorSystem
{
new AnimationTrackSpriteFlick
{
- LayerKey = DoorVisualLayers.BaseUnlit,
+ LayerKey = DoorVisualLayers.BaseEmagging,
KeyFrames =
{
new AnimationTrackSpriteFlick.KeyFrame(comp.EmaggingSpriteState, 0f),
@@ -92,6 +92,10 @@ public sealed class DoorSystem : SharedDoorSystem
if (_animationSystem.HasRunningAnimation(entity, DoorComponent.AnimationKey))
_animationSystem.Stop(entity.Owner, DoorComponent.AnimationKey);
+ // We are checking beforehand since some doors may not have an emagging visual layer, and we don't want LayerSetVisible to throw an error.
+ if (_sprite.TryGetLayer(entity.Owner, DoorVisualLayers.BaseEmagging, out var _, false))
+ _sprite.LayerSetVisible(entity.Owner, DoorVisualLayers.BaseEmagging, state == DoorState.Emagging);
+
UpdateAppearanceForDoorState(entity, args.Sprite, state);
}
@@ -134,7 +138,9 @@ public sealed class DoorSystem : SharedDoorSystem
return;
case DoorState.Emagging:
- _animationSystem.Play(entity, (Animation)entity.Comp.EmaggingAnimation, DoorComponent.AnimationKey);
+ // We are checking beforehand since some doors may not have an emagging visual layer.
+ if (_sprite.TryGetLayer(entity.Owner, DoorVisualLayers.BaseEmagging, out var _, false))
+ _animationSystem.Play(entity, (Animation)entity.Comp.EmaggingAnimation, DoorComponent.AnimationKey);
return;
}
diff --git a/Content.Client/Drunk/DrunkOverlay.cs b/Content.Client/Drunk/DrunkOverlay.cs
index c806cdad66..692232776a 100644
--- a/Content.Client/Drunk/DrunkOverlay.cs
+++ b/Content.Client/Drunk/DrunkOverlay.cs
@@ -27,6 +27,15 @@ public sealed class DrunkOverlay : Overlay
private const float VisualThreshold = 10.0f;
private const float PowerDivisor = 250.0f;
+ ///
+ /// This is a magic number based on my person preference of how quickly the bloodloss effect should kick in.
+ /// It is entirely arbitrary, and you should change it if it sucks.
+ /// Honestly should be refactored to be based on amount of blood lost but that's out of scope for what I'm doing atm.
+ /// Also caps all booze visual effects to a max intensity of 100 seconds or 100 booze power.
+ ///
+ private const float MaxBoozePower = 100f;
+
+ private const float BoozePowerScale = 8f;
private float _visualScale = 0;
@@ -50,15 +59,9 @@ public sealed class DrunkOverlay : Overlay
var time = status.Item2;
- var power = SharedDrunkSystem.MagicNumber;
+ var power = time == null ? MaxBoozePower : (float) Math.Min((time - _timing.CurTime).Value.TotalSeconds, MaxBoozePower);
- if (time != null)
- {
- var curTime = _timing.CurTime;
- power = (float) (time - curTime).Value.TotalSeconds;
- }
-
- CurrentBoozePower += 8f * (power * 0.5f - CurrentBoozePower) * args.DeltaSeconds / (power+1);
+ CurrentBoozePower += BoozePowerScale * (power - CurrentBoozePower) * args.DeltaSeconds / (power+1);
}
protected override bool BeforeDraw(in OverlayDrawArgs args)
diff --git a/Content.Client/Entry/EntryPoint.cs b/Content.Client/Entry/EntryPoint.cs
index f35272b63a..ac08547859 100644
--- a/Content.Client/Entry/EntryPoint.cs
+++ b/Content.Client/Entry/EntryPoint.cs
@@ -151,12 +151,6 @@ namespace Content.Client.Entry
_configManager.SetCVar("interface.resolutionAutoScaleMinimum", 0.5f);
}
- public override void Shutdown()
- {
- base.Shutdown();
- _titleWindowManager.Shutdown();
- }
-
public override void PostInit()
{
base.PostInit();
diff --git a/Content.Client/Fax/UI/FaxWindow.xaml b/Content.Client/Fax/UI/FaxWindow.xaml
index 04b297ab92..4161c1e307 100644
--- a/Content.Client/Fax/UI/FaxWindow.xaml
+++ b/Content.Client/Fax/UI/FaxWindow.xaml
@@ -56,7 +56,7 @@
HorizontalAlignment="Center"
VerticalAlignment="Center"
Scale="0.9 0.9"
- StyleClasses="Refresh" />
+ StyleClasses="RefreshButton" />
diff --git a/Content.Client/GPS/UI/HandheldGpsStatusControl.cs b/Content.Client/GPS/UI/HandheldGpsStatusControl.cs
index 57645e386e..2feca1f176 100644
--- a/Content.Client/GPS/UI/HandheldGpsStatusControl.cs
+++ b/Content.Client/GPS/UI/HandheldGpsStatusControl.cs
@@ -21,7 +21,7 @@ public sealed class HandheldGpsStatusControl : Control
_parent = parent;
_entMan = IoCManager.Resolve();
_transform = _entMan.System();
- _label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
+ _label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
AddChild(_label);
UpdateGpsDetails();
}
diff --git a/Content.Client/GameTicking/Managers/TitleWindowManager.cs b/Content.Client/GameTicking/Managers/TitleWindowManager.cs
index 18ce16f634..bc33e78411 100644
--- a/Content.Client/GameTicking/Managers/TitleWindowManager.cs
+++ b/Content.Client/GameTicking/Managers/TitleWindowManager.cs
@@ -15,48 +15,29 @@ public sealed class TitleWindowManager
public void Initialize()
{
- _cfg.OnValueChanged(CVars.GameHostName, OnHostnameChange, true);
- _cfg.OnValueChanged(CCVars.GameHostnameInTitlebar, OnHostnameTitleChange, true);
+ _cfg.OnValueChanged(CVars.GameHostName, _ => OnHostnameChange(), true);
+ _cfg.OnValueChanged(CCVars.GameHostnameInTitlebar, _ => OnHostnameChange(), true);
- _client.RunLevelChanged += OnRunLevelChangedChange;
+ _client.RunLevelChanged += (_, _) => OnHostnameChange();
}
- public void Shutdown()
- {
- _cfg.UnsubValueChanged(CVars.GameHostName, OnHostnameChange);
- _cfg.UnsubValueChanged(CCVars.GameHostnameInTitlebar, OnHostnameTitleChange);
- }
-
- private void OnHostnameChange(string hostname)
+ private void OnHostnameChange()
{
var defaultWindowTitle = _gameController.GameTitle();
- // Since the game assumes the server name is MyServer and that GameHostnameInTitlebar CCVar is true by default
- // Lets just... not show anything. This also is used to revert back to just the game title on disconnect.
- if (_client.RunLevel == ClientRunLevel.Initialize)
+ // When the client starts connecting, it will be using either the default hostname, or whatever hostname
+ // is set in its config file (aka the last server they connected to) until it receives the latest cvars.
+ // If they are not connected then we will not show anything other than the usual window title.
+ if (_client.RunLevel != ClientRunLevel.InGame)
{
_clyde.SetWindowTitle(defaultWindowTitle);
return;
}
- if (_cfg.GetCVar(CCVars.GameHostnameInTitlebar))
- // If you really dislike the dash I guess change it here
- _clyde.SetWindowTitle(hostname + " - " + defaultWindowTitle);
- else
- _clyde.SetWindowTitle(defaultWindowTitle);
- }
-
- // Clients by default assume game.hostname_in_titlebar is true
- // but we need to clear it as soon as we join and actually receive the servers preference on this.
- // This will ensure we rerun OnHostnameChange and set the correct title bar name.
- private void OnHostnameTitleChange(bool colonthree)
- {
- OnHostnameChange(_cfg.GetCVar(CVars.GameHostName));
- }
-
- // This is just used we can rerun the hostname change function when we disconnect to revert back to just the games title.
- private void OnRunLevelChangedChange(object? sender, RunLevelChangedEventArgs runLevelChangedEventArgs)
- {
- OnHostnameChange(_cfg.GetCVar(CVars.GameHostName));
+ _clyde.SetWindowTitle(
+ _cfg.GetCVar(CCVars.GameHostnameInTitlebar)
+ ? _cfg.GetCVar(CVars.GameHostName) + " - " + defaultWindowTitle
+ : defaultWindowTitle);
}
+ // You thought I would remove the :3 from this code? You were wrong.
}
diff --git a/Content.Client/Gateway/UI/GatewayWindow.xaml.cs b/Content.Client/Gateway/UI/GatewayWindow.xaml.cs
index 9fb7c339d3..4e4076d98c 100644
--- a/Content.Client/Gateway/UI/GatewayWindow.xaml.cs
+++ b/Content.Client/Gateway/UI/GatewayWindow.xaml.cs
@@ -159,7 +159,7 @@ public sealed partial class GatewayWindow : FancyWindow,
if (Pressable())
{
- openButton.AddStyleClass(StyleBase.ButtonCaution);
+ openButton.AddStyleClass(StyleClass.Negative);
}
var buttonContainer = new BoxContainer()
diff --git a/Content.Client/Ghost/UI/ReturnToBodyMenu.cs b/Content.Client/Ghost/UI/ReturnToBodyMenu.cs
index 69f04993c9..384ffb6be6 100644
--- a/Content.Client/Ghost/UI/ReturnToBodyMenu.cs
+++ b/Content.Client/Ghost/UI/ReturnToBodyMenu.cs
@@ -15,7 +15,7 @@ public sealed class ReturnToBodyMenu : DefaultWindow
{
Title = Loc.GetString("ghost-return-to-body-title");
- Contents.AddChild(new BoxContainer
+ ContentsContainer.AddChild(new BoxContainer
{
Orientation = LayoutOrientation.Vertical,
Children =
diff --git a/Content.Client/Guidebook/Controls/GuideLawsetEmbed.xaml b/Content.Client/Guidebook/Controls/GuideLawsetEmbed.xaml
new file mode 100644
index 0000000000..0af8ee3ec0
--- /dev/null
+++ b/Content.Client/Guidebook/Controls/GuideLawsetEmbed.xaml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Content.Client/Guidebook/Controls/GuideLawsetEmbed.xaml.cs b/Content.Client/Guidebook/Controls/GuideLawsetEmbed.xaml.cs
new file mode 100644
index 0000000000..86f7dce9e3
--- /dev/null
+++ b/Content.Client/Guidebook/Controls/GuideLawsetEmbed.xaml.cs
@@ -0,0 +1,96 @@
+using System.Diagnostics.CodeAnalysis;
+using Content.Client.Guidebook.Richtext;
+using Content.Client.Message;
+using Content.Client.UserInterface.ControlExtensions;
+using JetBrains.Annotations;
+using Robust.Client.AutoGenerated;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using Robust.Client.UserInterface.XAML;
+using Robust.Shared.Prototypes;
+
+using Content.Shared.Silicons.Laws;
+using Robust.Shared.Utility;
+
+namespace Content.Client.Guidebook.Controls;
+
+///
+/// Control for embedding an AI Lawset in a guidebook
+///
+[UsedImplicitly, GenerateTypedNameReferences]
+public sealed partial class GuideLawsetEmbed : Control, IDocumentTag, ISearchableControl, IPrototypeRepresentationControl
+{
+ [Dependency] private readonly IPrototypeManager _prototype = default!;
+
+ private ISawmill _logging = default!;
+
+ public IPrototype? RepresentedPrototype { get; private set; }
+
+ public GuideLawsetEmbed()
+ {
+ RobustXamlLoader.Load(this);
+ IoCManager.InjectDependencies(this);
+ MouseFilter = MouseFilterMode.Stop;
+ }
+
+ public GuideLawsetEmbed(SiliconLawsetPrototype lawset) : this()
+ {
+ GenerateControl(lawset);
+ }
+
+ private void GenerateControl(SiliconLawsetPrototype lawset)
+ {
+ RepresentedPrototype = lawset;
+
+ var lawsetNameString = lawset.Name == null ? lawset.ID : Loc.GetString(lawset.Name);
+ LawsetName.SetMarkup($"[bold]{FormattedMessage.EscapeText(lawsetNameString)}[/bold]");
+
+ var i = 1;
+ foreach (var lawID in lawset.Laws)
+ {
+ var lawPrototype = _prototype.Index(lawID);
+ var locLawString = Loc.GetString(lawPrototype.LawString);
+
+ RichTextLabel lawN = new()
+ {
+ Margin = new(0, 5, 0, 1)
+ };
+ var locLawStatement = Loc.GetString("laws-number-wrapper", ("lawnumber", i), ("lawstring", locLawString));
+ lawN.SetMarkup(locLawStatement);
+ LawsetContainer.AddChild(lawN);
+
+ i++;
+ }
+ }
+
+ public bool TryParseTag(Dictionary args, [NotNullWhen(true)] out Control? control)
+ {
+ control = null;
+ if (!args.TryGetValue("Lawset", out var id))
+ {
+ _logging.Error("Lawset embed tag is missing lawset prototype argument");
+ return false;
+ }
+
+ if (!_prototype.TryIndex(id, out var lawset))
+ {
+ _logging.Error($"Specified SiliconLawsetPrototype \"{id}\" is not a valid Lawset prototype");
+ return false;
+ }
+
+ GenerateControl(lawset);
+
+ control = this;
+ return true;
+ }
+
+ public bool CheckMatchesSearch(string query)
+ {
+ return this.ChildrenContainText(query);
+ }
+
+ public void SetHiddenState(bool state, string query)
+ {
+ Visible = CheckMatchesSearch(query) ? state : !state;
+ }
+}
diff --git a/Content.Client/Guidebook/Controls/GuideLawsetListEmbed.xaml b/Content.Client/Guidebook/Controls/GuideLawsetListEmbed.xaml
new file mode 100644
index 0000000000..59434cff0b
--- /dev/null
+++ b/Content.Client/Guidebook/Controls/GuideLawsetListEmbed.xaml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/Content.Client/Guidebook/Controls/GuideLawsetListEmbed.xaml.cs b/Content.Client/Guidebook/Controls/GuideLawsetListEmbed.xaml.cs
new file mode 100644
index 0000000000..108f066c39
--- /dev/null
+++ b/Content.Client/Guidebook/Controls/GuideLawsetListEmbed.xaml.cs
@@ -0,0 +1,40 @@
+using System.Diagnostics.CodeAnalysis;
+using System.Linq;
+using Content.Client.Guidebook.Richtext;
+using JetBrains.Annotations;
+using Robust.Client.AutoGenerated;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.XAML;
+using Robust.Shared.Prototypes;
+
+using Content.Shared.Silicons.Laws;
+
+namespace Content.Client.Guidebook.Controls;
+
+///
+/// Control for iterating and embedding every SiliconLawsetPrototype into the guidebook.
+///
+[UsedImplicitly, GenerateTypedNameReferences]
+public sealed partial class GuideLawsetListEmbed : Control, IDocumentTag
+{
+ [Dependency] private readonly IPrototypeManager _prototype = default!;
+
+ public GuideLawsetListEmbed()
+ {
+ RobustXamlLoader.Load(this);
+ IoCManager.InjectDependencies(this);
+ MouseFilter = MouseFilterMode.Stop;
+ }
+
+ public bool TryParseTag(Dictionary args, [NotNullWhen(true)] out Control? control)
+ {
+ foreach (var lawset in _prototype.EnumeratePrototypes().OrderBy(x => x.ID))
+ {
+ GuideLawsetEmbed embed = new(lawset);
+ GroupContainer.AddChild(embed);
+ }
+
+ control = this;
+ return true;
+ }
+}
diff --git a/Content.Client/Guidebook/DocumentParsingManager.cs b/Content.Client/Guidebook/DocumentParsingManager.cs
index 37ec1ac2de..1727ae0de0 100644
--- a/Content.Client/Guidebook/DocumentParsingManager.cs
+++ b/Content.Client/Guidebook/DocumentParsingManager.cs
@@ -7,6 +7,7 @@ using Robust.Client.UserInterface;
using Robust.Shared.ContentPack;
using Robust.Shared.Prototypes;
using Robust.Shared.Reflection;
+using Robust.Shared.Sandboxing;
using Robust.Shared.Utility;
using static Pidgin.Parser;
@@ -20,7 +21,7 @@ public sealed partial class DocumentParsingManager
[Dependency] private readonly IPrototypeManager _prototype = default!;
[Dependency] private readonly IReflectionManager _reflectionManager = default!;
[Dependency] private readonly IResourceManager _resourceManager = default!;
- [Dependency] private readonly IDynamicTypeFactory _dynamicTypeFactory = default!;
+ [Dependency] private readonly ISandboxHelper _sandboxHelper = default!;
private readonly Dictionary> _tagControlParsers = new();
private Parser _controlParser = default!;
@@ -42,7 +43,7 @@ public sealed partial class DocumentParsingManager
foreach (var typ in _reflectionManager.GetAllChildren())
{
- _tagControlParsers.Add(typ.Name, CreateTagControlParser(typ.Name, typ, _dynamicTypeFactory));
+ _tagControlParsers.Add(typ.Name, CreateTagControlParser(typ.Name, typ, _sandboxHelper));
}
ControlParser = whitespaceAndCommentParser.Then(_controlParser.Many());
@@ -86,14 +87,14 @@ public sealed partial class DocumentParsingManager
return true;
}
- private Parser CreateTagControlParser(string tagId, Type tagType, IDynamicTypeFactory typeFactory)
+ private Parser CreateTagControlParser(string tagId, Type tagType, ISandboxHelper sandbox)
{
return Map(
(args, controls) =>
{
try
{
- var tag = (IDocumentTag) typeFactory.CreateInstance(tagType);
+ var tag = (IDocumentTag) sandbox.CreateInstance(tagType);
if (!tag.TryParseTag(args, out var control))
{
_sawmill.Error($"Failed to parse {tagId} args");
diff --git a/Content.Client/Guidebook/Richtext/Table.cs b/Content.Client/Guidebook/Richtext/Table.cs
index 82b884aa96..b6923c3698 100644
--- a/Content.Client/Guidebook/Richtext/Table.cs
+++ b/Content.Client/Guidebook/Richtext/Table.cs
@@ -8,11 +8,6 @@ namespace Content.Client.Guidebook.Richtext;
[UsedImplicitly]
public sealed class Table : TableContainer, IDocumentTag
{
- [Dependency] private readonly ILogManager _logManager = default!;
-
- private ISawmill Sawmill => _sawmill ??= _logManager.GetSawmill("table");
- private ISawmill? _sawmill;
-
public bool TryParseTag(Dictionary args, [NotNullWhen(true)] out Control? control)
{
HorizontalExpand = true;
@@ -20,7 +15,7 @@ public sealed class Table : TableContainer, IDocumentTag
if (!args.TryGetValue("Columns", out var columns) || !int.TryParse(columns, out var columnsCount))
{
- Sawmill.Error("Guidebook tag \"Table\" does not specify required property \"Columns.\"");
+ Logger.Error("Guidebook tag \"Table\" does not specify required property \"Columns.\"");
control = null;
return false;
}
diff --git a/Content.Client/Guidebook/Richtext/TextLinkTag.cs b/Content.Client/Guidebook/Richtext/TextLinkTag.cs
index 5c0098d5b5..a551b18473 100644
--- a/Content.Client/Guidebook/Richtext/TextLinkTag.cs
+++ b/Content.Client/Guidebook/Richtext/TextLinkTag.cs
@@ -1,4 +1,4 @@
-using System.Diagnostics.CodeAnalysis;
+using System.Diagnostics.CodeAnalysis;
using JetBrains.Annotations;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
@@ -12,11 +12,6 @@ namespace Content.Client.Guidebook.RichText;
[UsedImplicitly]
public sealed class TextLinkTag : IMarkupTagHandler
{
- [Dependency] private readonly ILogManager _logManager = default!;
-
- private ISawmill Sawmill => _sawmill ??= _logManager.GetSawmill(Name);
- private ISawmill? _sawmill;
-
public static Color LinkColor => Color.CornflowerBlue;
public string Name => "textlink";
@@ -58,7 +53,7 @@ public sealed class TextLinkTag : IMarkupTagHandler
if (control.TryGetParentHandler(out var handler))
handler.HandleClick(link);
else
- Sawmill.Warning("Warning! No valid ILinkClickHandler found.");
+ Logger.Warning("Warning! No valid ILinkClickHandler found.");
}
}
diff --git a/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml.cs b/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml.cs
index 47b03351cb..4d98f227f2 100644
--- a/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml.cs
+++ b/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml.cs
@@ -1,29 +1,23 @@
using System.Linq;
using System.Numerics;
-using Content.Client.Message;
using Content.Shared.Atmos;
using Content.Client.UserInterface.Controls;
using Content.Shared._Offbrand.Wounds; // Offbrand
-using Content.Shared.Alert;
-using Content.Shared.Damage;
+using Content.Shared.Damage.Components;
using Content.Shared.Damage.Prototypes;
using Content.Shared.FixedPoint;
using Content.Shared.Humanoid;
using Content.Shared.Humanoid.Prototypes;
using Content.Shared.IdentityManagement;
-using Content.Shared.Inventory;
using Content.Shared.MedicalScanner;
using Content.Shared.Mobs;
using Content.Shared.Mobs.Components;
-using Content.Shared.Mobs.Systems;
-using Content.Shared.Nutrition.Components;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.XAML;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Client.UserInterface.Controls;
using Robust.Client.ResourceManagement;
-using Robust.Client.UserInterface;
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
diff --git a/Content.Client/Implants/UI/ChameleonControllerMenu.xaml.cs b/Content.Client/Implants/UI/ChameleonControllerMenu.xaml.cs
index c12ddb9319..6f66990b4e 100644
--- a/Content.Client/Implants/UI/ChameleonControllerMenu.xaml.cs
+++ b/Content.Client/Implants/UI/ChameleonControllerMenu.xaml.cs
@@ -116,7 +116,7 @@ public sealed partial class ChameleonControllerMenu : FancyWindow
var button = new Button
{
HorizontalExpand = true,
- StyleClasses = {StyleBase.ButtonSquare},
+ StyleClasses = {StyleClass.ButtonSquare},
ToolTip = Loc.GetString(name),
Text = Loc.GetString(name),
Margin = new Thickness(0, 0, 15, 0),
diff --git a/Content.Client/Implants/UI/ImplanterStatusControl.cs b/Content.Client/Implants/UI/ImplanterStatusControl.cs
index 24445eeecf..43579ae6be 100644
--- a/Content.Client/Implants/UI/ImplanterStatusControl.cs
+++ b/Content.Client/Implants/UI/ImplanterStatusControl.cs
@@ -19,7 +19,7 @@ public sealed class ImplanterStatusControl : Control
{
IoCManager.InjectDependencies(this);
_parent = parent;
- _label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
+ _label = new RichTextLabel { StyleClasses = { StyleClass.ItemStatus } };
_label.MaxWidth = 350;
AddChild(new ClipControl { Children = { _label } });
diff --git a/Content.Client/Info/RulesAndInfoWindow.cs b/Content.Client/Info/RulesAndInfoWindow.cs
index b9131dcb3c..4f483cf26c 100644
--- a/Content.Client/Info/RulesAndInfoWindow.cs
+++ b/Content.Client/Info/RulesAndInfoWindow.cs
@@ -36,7 +36,7 @@ namespace Content.Client.Info
PopulateTutorial(tutorialList);
- Contents.AddChild(rootContainer);
+ ContentsContainer.AddChild(rootContainer);
SetSize = new Vector2(650, 650);
}
diff --git a/Content.Client/Info/RulesPopup.xaml b/Content.Client/Info/RulesPopup.xaml
index 80ed415550..c94f061865 100644
--- a/Content.Client/Info/RulesPopup.xaml
+++ b/Content.Client/Info/RulesPopup.xaml
@@ -16,7 +16,7 @@
Text="{Loc 'ui-rules-accept'}"
Disabled="True" />
diff --git a/Content.Client/Instruments/UI/ChannelsMenu.xaml b/Content.Client/Instruments/UI/ChannelsMenu.xaml
index 20e4a3e923..e98b03e6b3 100644
--- a/Content.Client/Instruments/UI/ChannelsMenu.xaml
+++ b/Content.Client/Instruments/UI/ChannelsMenu.xaml
@@ -7,7 +7,7 @@
-
diff --git a/Content.Client/Inventory/StrippableBoundUserInterface.cs b/Content.Client/Inventory/StrippableBoundUserInterface.cs
index 381406d2ac..f9a6cd46d6 100644
--- a/Content.Client/Inventory/StrippableBoundUserInterface.cs
+++ b/Content.Client/Inventory/StrippableBoundUserInterface.cs
@@ -154,7 +154,7 @@ namespace Content.Client.Inventory
var button = new Button()
{
Text = Loc.GetString("strippable-bound-user-interface-stripping-menu-ensnare-button"),
- StyleClasses = { StyleBase.ButtonOpenRight }
+ StyleClasses = { StyleClass.ButtonOpenRight }
};
button.OnPressed += (_) => SendPredictedMessage(new StrippingEnsnareButtonPressed());
@@ -190,7 +190,7 @@ namespace Content.Client.Inventory
if (EntMan.TryGetComponent(heldEntity, out var virt))
{
button.Blocked = true;
- if (EntMan.TryGetComponent(Owner, out var cuff) && _cuffable.GetAllCuffs(cuff).Contains(virt.BlockingEntity))
+ if (_cuffable.TryGetAllCuffs(Owner, out var cuffs) && cuffs.Contains(virt.BlockingEntity))
button.BlockedRect.MouseFilter = MouseFilterMode.Ignore;
}
diff --git a/Content.Client/Kitchen/UI/MicrowaveMenu.xaml b/Content.Client/Kitchen/UI/MicrowaveMenu.xaml
index cd81ea0a9b..cf0b5634c5 100644
--- a/Content.Client/Kitchen/UI/MicrowaveMenu.xaml
+++ b/Content.Client/Kitchen/UI/MicrowaveMenu.xaml
@@ -2,7 +2,6 @@
xmlns="https://spacestation14.io"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
- xmlns:style="clr-namespace:Content.Client.Stylesheets"
Title="{Loc 'microwave-menu-title'}"
MinWidth="512"
MinSize="512 256">
@@ -78,14 +77,14 @@
Name="StartButton"
Access="Public"
Text="{Loc 'microwave-menu-start-button'}"
- StyleClasses="ButtonColorGreen"
+ StyleClasses="positive"
TextAlign="Center" />
diff --git a/Content.Client/Labels/UI/HandLabelerBoundUserInterface.cs b/Content.Client/Labels/UI/HandLabelerBoundUserInterface.cs
index b9b58f2322..95d5cc7ab3 100644
--- a/Content.Client/Labels/UI/HandLabelerBoundUserInterface.cs
+++ b/Content.Client/Labels/UI/HandLabelerBoundUserInterface.cs
@@ -33,6 +33,7 @@ namespace Content.Client.Labels.UI
_window.OnLabelChanged += OnLabelChanged;
Reload();
+ _window.SetInitialLabelState(); // Must be after Reload() has set the label text
}
private void OnLabelChanged(string newLabel)
diff --git a/Content.Client/Labels/UI/HandLabelerWindow.xaml b/Content.Client/Labels/UI/HandLabelerWindow.xaml
index 0bf03410c1..7bbadb843d 100644
--- a/Content.Client/Labels/UI/HandLabelerWindow.xaml
+++ b/Content.Client/Labels/UI/HandLabelerWindow.xaml
@@ -1,8 +1,14 @@
-
+ Title="{Loc 'hand-labeler-ui-header'}"
+ SetWidth="400"
+ MinWidth="150">
+
+
+
+
+
diff --git a/Content.Client/Labels/UI/HandLabelerWindow.xaml.cs b/Content.Client/Labels/UI/HandLabelerWindow.xaml.cs
index 528e227f55..32c9d980a4 100644
--- a/Content.Client/Labels/UI/HandLabelerWindow.xaml.cs
+++ b/Content.Client/Labels/UI/HandLabelerWindow.xaml.cs
@@ -16,6 +16,7 @@ namespace Content.Client.Labels.UI
// TODO LineEdit Make this a bool on the LineEdit control
private string _label = string.Empty;
+ private string _initialLabel = string.Empty;
public HandLabelerWindow()
{
@@ -25,6 +26,7 @@ namespace Content.Client.Labels.UI
{
_label = e.Text;
OnLabelChanged?.Invoke(_label);
+ UpdateButtons();
};
LabelLineEdit.OnFocusEnter += _ => _focused = true;
@@ -33,12 +35,14 @@ namespace Content.Client.Labels.UI
_focused = false;
LabelLineEdit.Text = _label;
};
+ ResetLabelButton.OnPressed += _ => LabelLineEdit.SetText(_initialLabel, true);
+ ClearLabelButton.OnPressed += _ => LabelLineEdit.SetText("", true);
}
protected override void Opened()
{
base.Opened();
-
+
// Give the editor keyboard focus, since that's the only
// thing the user will want to be doing with this UI
LabelLineEdit.GrabKeyboardFocus();
@@ -51,7 +55,25 @@ namespace Content.Client.Labels.UI
_label = label;
if (!_focused)
+ {
LabelLineEdit.Text = label;
+ UpdateButtons();
+ }
+ }
+
+ public void SetInitialLabelState()
+ {
+ LabelLineEdit.Text = _label;
+ LabelLineEdit.CursorPosition = _label.Length;
+ LabelLineEdit.SelectionStart = 0;
+ _initialLabel = _label;
+ UpdateButtons();
+ }
+
+ public void UpdateButtons()
+ {
+ ResetLabelButton.Disabled = (LabelLineEdit.Text == _initialLabel);
+ ClearLabelButton.Disabled = (LabelLineEdit.Text == "");
}
public void SetMaxLabelLength(int maxLength)
diff --git a/Content.Client/LateJoin/LateJoinGui.cs b/Content.Client/LateJoin/LateJoinGui.cs
index ae62e64ff8..a4ee341eb5 100644
--- a/Content.Client/LateJoin/LateJoinGui.cs
+++ b/Content.Client/LateJoin/LateJoinGui.cs
@@ -61,7 +61,7 @@ namespace Content.Client.LateJoin
VerticalExpand = true,
};
- Contents.AddChild(_base);
+ ContentsContainer.AddChild(_base);
_jobRequirements.Updated += RebuildUI;
RebuildUI();
diff --git a/Content.Client/Launcher/LauncherConnecting.cs b/Content.Client/Launcher/LauncherConnecting.cs
index 3496c92aba..33d31cc52d 100644
--- a/Content.Client/Launcher/LauncherConnecting.cs
+++ b/Content.Client/Launcher/LauncherConnecting.cs
@@ -20,9 +20,7 @@ namespace Content.Client.Launcher
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly IConfigurationManager _cfg = default!;
[Dependency] private readonly IClipboardManager _clipboard = default!;
- [Dependency] private readonly ILogManager _logManager = default!;
- private ISawmill _sawmill = default!;
private LauncherConnectingGui? _control;
private Page _currentPage;
@@ -61,8 +59,6 @@ namespace Content.Client.Launcher
protected override void Startup()
{
- _sawmill = _logManager.GetSawmill("launcher-ui");
-
_control = new LauncherConnectingGui(this, _random, _prototypeManager, _cfg, _clipboard);
_userInterfaceManager.StateRoot.AddChild(_control);
@@ -119,12 +115,12 @@ namespace Content.Client.Launcher
}
else
{
- _sawmill.Info($"Redial not possible, no Ss14Address");
+ Logger.InfoS("launcher-ui", $"Redial not possible, no Ss14Address");
}
}
catch (Exception ex)
{
- _sawmill.Error($"Redial exception: {ex}");
+ Logger.ErrorS("launcher-ui", $"Redial exception: {ex}");
}
return false;
}
diff --git a/Content.Client/Launcher/LauncherConnectingGui.xaml b/Content.Client/Launcher/LauncherConnectingGui.xaml
index 34b32f84fe..a8e5a63704 100644
--- a/Content.Client/Launcher/LauncherConnectingGui.xaml
+++ b/Content.Client/Launcher/LauncherConnectingGui.xaml
@@ -5,7 +5,7 @@
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls">
-
+
-
+
diff --git a/Content.Client/Launcher/LauncherConnectingGui.xaml.cs b/Content.Client/Launcher/LauncherConnectingGui.xaml.cs
index cf89f98095..fe48642ed3 100644
--- a/Content.Client/Launcher/LauncherConnectingGui.xaml.cs
+++ b/Content.Client/Launcher/LauncherConnectingGui.xaml.cs
@@ -43,7 +43,7 @@ namespace Content.Client.Launcher
LayoutContainer.SetAnchorPreset(this, LayoutContainer.LayoutPreset.Wide);
- Stylesheet = IoCManager.Resolve().SheetSpace;
+ Stylesheet = IoCManager.Resolve().SheetSystem;
ChangeLoginTip();
RetryButton.OnPressed += ReconnectButtonPressed;
diff --git a/Content.Client/Lobby/UI/CharacterPickerButton.xaml b/Content.Client/Lobby/UI/CharacterPickerButton.xaml
index ecd706f5a7..723da433a1 100644
--- a/Content.Client/Lobby/UI/CharacterPickerButton.xaml
+++ b/Content.Client/Lobby/UI/CharacterPickerButton.xaml
@@ -18,7 +18,7 @@
+ StyleClasses="negative"/>
diff --git a/Content.Client/Lobby/UI/CharacterSetupGui.xaml b/Content.Client/Lobby/UI/CharacterSetupGui.xaml
index c463987a1f..09ed989fc6 100644
--- a/Content.Client/Lobby/UI/CharacterSetupGui.xaml
+++ b/Content.Client/Lobby/UI/CharacterSetupGui.xaml
@@ -28,19 +28,13 @@
Text="{Loc 'character-setup-gui-character-setup-close-button'}"
StyleClasses="ButtonBig"/>
-
-
-
-
+
-
-
-
-
+
diff --git a/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs b/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs
index 821722ec35..e9b1f41a41 100644
--- a/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs
+++ b/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs
@@ -6,8 +6,8 @@ using Content.Client.Lobby.UI.Loadouts;
using Content.Client.Lobby.UI.Roles;
using Content.Client.Message;
using Content.Client.Players.PlayTimeTracking;
-using Content.Client.Sprite;
using Content.Client.Stylesheets;
+using Content.Client.Sprite;
using Content.Client.UserInterface.Systems.Guidebook;
using Content.Shared.CCVar;
using Content.Shared.Clothing;
@@ -539,7 +539,7 @@ namespace Content.Client.Lobby.UI
{
Text = Loc.GetString(category.Name),
Margin = new Thickness(0, 10, 0, 0),
- StyleClasses = { StyleBase.StyleClassLabelHeading },
+ StyleClasses = { StyleClass.LabelHeading },
});
}
@@ -607,6 +607,7 @@ namespace Content.Client.Lobby.UI
_species.Clear();
_species.AddRange(_prototypeManager.EnumeratePrototypes().Where(o => o.RoundStart));
+ _species.Sort((a, b) => string.Compare(a.Name, b.Name, StringComparison.CurrentCultureIgnoreCase));
var speciesIds = _species.Select(o => o.ID).ToList();
for (var i = 0; i < _species.Count; i++)
@@ -1347,7 +1348,7 @@ namespace Content.Client.Lobby.UI
return;
const string style = "SpeciesInfoDefault";
- SpeciesInfoButton.StyleClasses.Add(style);
+ SpeciesInfoButton.StyleIdentifier = style;
}
private void UpdateMarkings()
diff --git a/Content.Client/Lobby/UI/HumanoidProfileEditorSheetlet.cs b/Content.Client/Lobby/UI/HumanoidProfileEditorSheetlet.cs
new file mode 100644
index 0000000000..016541dc23
--- /dev/null
+++ b/Content.Client/Lobby/UI/HumanoidProfileEditorSheetlet.cs
@@ -0,0 +1,28 @@
+using Content.Client.Resources;
+using Content.Client.Stylesheets;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.Lobby.UI;
+
+[CommonSheetlet]
+public sealed class HumanoidProfileEditorSheetlet : Sheetlet
+{
+ public override StyleRule[] GetRules(PalettedStylesheet sheet, object config)
+ {
+ return
+ [
+ E()
+ .Identifier("SpeciesInfoDefault")
+ .Prop(TextureButton.StylePropertyTexture,
+ ResCache.GetTexture("/Textures/Interface/VerbIcons/information.svg.192dpi.png")),
+ // copied from `StyleNano`, but this is unused
+ // E()
+ // .Identifier("SpeciesInfoWarning")
+ // .Prop(TextureButton.StylePropertyTexture,
+ // ResCache.GetTexture("/Textures/Interface/info.svg.192dpi.png"))
+ // .Prop(Control.StylePropertyModulateSelf, sheet.HighlightPalette[0]),
+ ];
+ }
+}
diff --git a/Content.Client/Lobby/UI/Loadouts/LoadoutGroupContainer.xaml b/Content.Client/Lobby/UI/Loadouts/LoadoutGroupContainer.xaml
index 0deb1c82ba..f89b38ca8a 100644
--- a/Content.Client/Lobby/UI/Loadouts/LoadoutGroupContainer.xaml
+++ b/Content.Client/Lobby/UI/Loadouts/LoadoutGroupContainer.xaml
@@ -1,7 +1,7 @@
-
+
diff --git a/Content.Client/Lobby/UI/LobbyGui.xaml b/Content.Client/Lobby/UI/LobbyGui.xaml
index 64291816ab..9b5c761644 100644
--- a/Content.Client/Lobby/UI/LobbyGui.xaml
+++ b/Content.Client/Lobby/UI/LobbyGui.xaml
@@ -20,7 +20,7 @@
-
-
+
@@ -63,7 +63,7 @@
-
@@ -73,7 +73,7 @@
HorizontalExpand="True" HorizontalAlignment="Center" />
-
+
@@ -97,7 +97,7 @@
-
+
@@ -111,7 +111,7 @@
-
+
diff --git a/Content.Client/Lobby/UI/Roles/RequirementsSelector.xaml.cs b/Content.Client/Lobby/UI/Roles/RequirementsSelector.xaml.cs
index ce75537355..3e6f4cfb2f 100644
--- a/Content.Client/Lobby/UI/Roles/RequirementsSelector.xaml.cs
+++ b/Content.Client/Lobby/UI/Roles/RequirementsSelector.xaml.cs
@@ -31,9 +31,9 @@ public sealed partial class RequirementsSelector : BoxContainer
RobustXamlLoader.Load(this);
_options = new RadioOptions(RadioOptionsLayout.Horizontal)
{
- FirstButtonStyle = StyleBase.ButtonOpenRight,
- ButtonStyle = StyleBase.ButtonOpenBoth,
- LastButtonStyle = StyleBase.ButtonOpenLeft,
+ FirstButtonStyle = StyleClass.ButtonOpenRight,
+ ButtonStyle = StyleClass.ButtonOpenBoth,
+ LastButtonStyle = StyleClass.ButtonOpenLeft,
HorizontalExpand = true,
};
//Override default radio option button width
@@ -50,7 +50,7 @@ public sealed partial class RequirementsSelector : BoxContainer
Text = Loc.GetString("role-timer-locked"),
Visible = true,
HorizontalAlignment = HAlignment.Center,
- StyleClasses = {StyleBase.StyleClassLabelSubText},
+ StyleClasses = {StyleClass.LabelSubText},
};
_lockStripe = new StripeBack()
diff --git a/Content.Client/MainMenu/UI/MainMenuControl.xaml.cs b/Content.Client/MainMenu/UI/MainMenuControl.xaml.cs
index 1d5244305d..45bd94f7b6 100644
--- a/Content.Client/MainMenu/UI/MainMenuControl.xaml.cs
+++ b/Content.Client/MainMenu/UI/MainMenuControl.xaml.cs
@@ -11,6 +11,9 @@ namespace Content.Client.MainMenu.UI;
[GenerateTypedNameReferences]
public sealed partial class MainMenuControl : Control
{
+ public const string StyleIdentifierMainMenu = "mainMenu";
+ public const string StyleIdentifierMainMenuVBox = "mainMenuVBox";
+
public MainMenuControl(IResourceCache resCache, IConfigurationManager configMan)
{
RobustXamlLoader.Load(this);
diff --git a/Content.Client/MainMenu/UI/MainMenuSheetlet.cs b/Content.Client/MainMenu/UI/MainMenuSheetlet.cs
new file mode 100644
index 0000000000..45171af3b7
--- /dev/null
+++ b/Content.Client/MainMenu/UI/MainMenuSheetlet.cs
@@ -0,0 +1,27 @@
+using Content.Client.Stylesheets;
+using Content.Client.Stylesheets.Fonts;
+using Content.Client.Stylesheets.Stylesheets;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using static Content.Client.Stylesheets.StylesheetHelpers;
+
+namespace Content.Client.MainMenu.UI;
+
+[CommonSheetlet]
+public sealed class MainMenuSheetlet : Sheetlet
+{
+ public override StyleRule[] GetRules(NanotrasenStylesheet sheet, object config)
+ {
+ return
+ [
+ // make those buttons bigger
+ E