diff --git a/.github/workflows/labeler-review.yml b/.github/workflows/labeler-review.yml
index a0341e42a18..0adfee7d0e5 100644
--- a/.github/workflows/labeler-review.yml
+++ b/.github/workflows/labeler-review.yml
@@ -16,7 +16,7 @@ jobs:
with:
username: ${{ github.actor }}
team: "content-maintainers,junior-maintainers"
- GITHUB_TOKEN: ${{ secrets.GH_PAT }}
+ GITHUB_TOKEN: ${{ secrets.LABELER_PAT }}
- if: ${{ steps.checkUserMember.outputs.isTeamMember == 'true' }}
uses: actions-ecosystem/action-add-labels@v1
with:
diff --git a/Content.Client/Access/UI/AccessOverriderWindow.xaml.cs b/Content.Client/Access/UI/AccessOverriderWindow.xaml.cs
index ba087718583..aaca2dae806 100644
--- a/Content.Client/Access/UI/AccessOverriderWindow.xaml.cs
+++ b/Content.Client/Access/UI/AccessOverriderWindow.xaml.cs
@@ -88,8 +88,8 @@ public void UpdateState(IPrototypeManager protoManager, AccessOverriderBoundUser
button.Disabled = !interfaceEnabled;
if (interfaceEnabled)
{
- button.Pressed = state.TargetAccessReaderIdAccessList?.Contains(accessName) ?? false;
- button.Disabled = (!state.AllowedModifyAccessList?.Contains(accessName)) ?? true;
+ button.Pressed = state.TargetAccessReaderIdAccessList?.Select(x => x.Id).Contains(accessName) ?? false;
+ button.Disabled = (!state.AllowedModifyAccessList?.Select(x => x.Id).Contains(accessName)) ?? true;
}
}
}
diff --git a/Content.Client/Administration/UI/Notes/NoteEdit.xaml.cs b/Content.Client/Administration/UI/Notes/NoteEdit.xaml.cs
index a412e47396b..c8e3afeb22c 100644
--- a/Content.Client/Administration/UI/Notes/NoteEdit.xaml.cs
+++ b/Content.Client/Administration/UI/Notes/NoteEdit.xaml.cs
@@ -159,6 +159,7 @@ private void OnTypeChanged(OptionButton.ItemSelectedEventArgs args)
SecretCheckBox.Pressed = false;
SeverityOption.Disabled = false;
PermanentCheckBox.Pressed = true;
+ SubmitButton.Disabled = true;
UpdatePermanentCheckboxFields();
break;
case (int) NoteType.Message: // Message: these are shown to the player when they log on
diff --git a/Content.Client/Atmos/Components/PipeColorVisualsComponent.cs b/Content.Client/Atmos/Components/PipeColorVisualsComponent.cs
index 355b10cb4a4..9b24b1adc25 100644
--- a/Content.Client/Atmos/Components/PipeColorVisualsComponent.cs
+++ b/Content.Client/Atmos/Components/PipeColorVisualsComponent.cs
@@ -1,8 +1,4 @@
-using Robust.Shared.GameObjects;
-
namespace Content.Client.Atmos.Components;
[RegisterComponent]
-public sealed partial class PipeColorVisualsComponent : Component
-{
-}
+public sealed partial class PipeColorVisualsComponent : Component;
diff --git a/Content.Client/Atmos/Consoles/AtmosAlarmEntryContainer.xaml b/Content.Client/Atmos/Consoles/AtmosAlarmEntryContainer.xaml
index 6bdfb3989f9..3dbe14e6b6d 100644
--- a/Content.Client/Atmos/Consoles/AtmosAlarmEntryContainer.xaml
+++ b/Content.Client/Atmos/Consoles/AtmosAlarmEntryContainer.xaml
@@ -1,6 +1,5 @@
@@ -62,7 +61,7 @@
-
+
diff --git a/Content.Client/Atmos/Consoles/AtmosAlarmEntryContainer.xaml.cs b/Content.Client/Atmos/Consoles/AtmosAlarmEntryContainer.xaml.cs
index 79bb66560e3..e533ef2dce0 100644
--- a/Content.Client/Atmos/Consoles/AtmosAlarmEntryContainer.xaml.cs
+++ b/Content.Client/Atmos/Consoles/AtmosAlarmEntryContainer.xaml.cs
@@ -136,8 +136,9 @@ public void UpdateEntry(AtmosAlertsComputerEntry entry, bool isFocus, AtmosAlert
GasGridContainer.RemoveAllChildren();
var gasData = focusData.Value.GasData.Where(g => g.Key != Gas.Oxygen);
+ var keyValuePairs = gasData.ToList();
- if (gasData.Count() == 0)
+ if (keyValuePairs.Count == 0)
{
// No other gases
var gasLabel = new Label()
@@ -158,13 +159,11 @@ public void UpdateEntry(AtmosAlertsComputerEntry entry, bool isFocus, AtmosAlert
else
{
// Add an entry for each gas
- foreach ((var gas, (var mol, var percent, var alert)) in gasData)
+ foreach ((var gas, (var mol, var percent, var alert)) in keyValuePairs)
{
- var gasPercent = (FixedPoint2)0f;
- gasPercent = percent * 100f;
+ FixedPoint2 gasPercent = percent * 100f;
- if (!_gasShorthands.TryGetValue(gas, out var gasShorthand))
- gasShorthand = "X";
+ var gasShorthand = _gasShorthands.GetValueOrDefault(gas, "X");
var gasLabel = new Label()
{
diff --git a/Content.Client/Atmos/Consoles/AtmosAlertsComputerBoundUserInterface.cs b/Content.Client/Atmos/Consoles/AtmosAlertsComputerBoundUserInterface.cs
index 08cae979b9b..6f0e7f80da1 100644
--- a/Content.Client/Atmos/Consoles/AtmosAlertsComputerBoundUserInterface.cs
+++ b/Content.Client/Atmos/Consoles/AtmosAlertsComputerBoundUserInterface.cs
@@ -14,8 +14,6 @@ protected override void Open()
_menu = new AtmosAlertsComputerWindow(this, Owner);
_menu.OpenCentered();
_menu.OnClose += Close;
-
- EntMan.TryGetComponent(Owner, out var xform);
}
protected override void UpdateState(BoundUserInterfaceState state)
@@ -24,9 +22,6 @@ protected override void UpdateState(BoundUserInterfaceState state)
var castState = (AtmosAlertsComputerBoundInterfaceState) state;
- if (castState == null)
- return;
-
EntMan.TryGetComponent(Owner, out var xform);
_menu?.UpdateUI(xform?.Coordinates, castState.AirAlarms, castState.FireAlarms, castState.FocusData);
}
diff --git a/Content.Client/Atmos/Consoles/AtmosAlertsComputerWindow.xaml b/Content.Client/Atmos/Consoles/AtmosAlertsComputerWindow.xaml
index 8824a776ee6..e5ede1b92e3 100644
--- a/Content.Client/Atmos/Consoles/AtmosAlertsComputerWindow.xaml
+++ b/Content.Client/Atmos/Consoles/AtmosAlertsComputerWindow.xaml
@@ -1,7 +1,6 @@
(OnInit);
- SubscribeLocalEvent(OnAppearanceChanged, after: new[] { typeof(SubFloorHideSystem) });
+ SubscribeLocalEvent(OnAppearanceChanged, after: [typeof(SubFloorHideSystem)]);
}
private void OnInit(EntityUid uid, PipeAppearanceComponent component, ComponentInit args)
@@ -84,7 +82,8 @@ private void OnAppearanceChanged(EntityUid uid, PipeAppearanceComponent componen
layer.Visible &= visible;
- if (!visible) continue;
+ if (!visible)
+ continue;
layer.Color = color;
}
diff --git a/Content.Client/Atmos/Monitor/AtmosAlarmableVisualsSystem.cs b/Content.Client/Atmos/Monitor/AtmosAlarmableVisualsSystem.cs
index 019f25f376b..18ca2234752 100644
--- a/Content.Client/Atmos/Monitor/AtmosAlarmableVisualsSystem.cs
+++ b/Content.Client/Atmos/Monitor/AtmosAlarmableVisualsSystem.cs
@@ -1,12 +1,7 @@
-using System.Collections.Generic;
using Content.Shared.Atmos.Monitor;
using Content.Shared.Power;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
-using Robust.Shared.GameObjects;
-using Robust.Shared.IoC;
-using Robust.Shared.Maths;
-using Robust.Shared.Serialization.Manager.Attributes;
namespace Content.Client.Atmos.Monitor;
@@ -27,7 +22,7 @@ protected override void OnAppearanceChange(EntityUid uid, AtmosAlarmableVisualsC
{
foreach (var visLayer in component.HideOnDepowered)
{
- if (args.Sprite.LayerMapTryGet(visLayer, out int powerVisibilityLayer))
+ if (args.Sprite.LayerMapTryGet(visLayer, out var powerVisibilityLayer))
args.Sprite.LayerSetVisible(powerVisibilityLayer, powered);
}
}
@@ -36,7 +31,7 @@ protected override void OnAppearanceChange(EntityUid uid, AtmosAlarmableVisualsC
{
foreach (var (setLayer, powerState) in component.SetOnDepowered)
{
- if (args.Sprite.LayerMapTryGet(setLayer, out int setStateLayer))
+ if (args.Sprite.LayerMapTryGet(setLayer, out var setStateLayer))
args.Sprite.LayerSetState(setStateLayer, new RSI.StateId(powerState));
}
}
diff --git a/Content.Client/Atmos/Monitor/UI/AirAlarmBoundUserInterface.cs b/Content.Client/Atmos/Monitor/UI/AirAlarmBoundUserInterface.cs
index d9e94e373b4..650f96eec97 100644
--- a/Content.Client/Atmos/Monitor/UI/AirAlarmBoundUserInterface.cs
+++ b/Content.Client/Atmos/Monitor/UI/AirAlarmBoundUserInterface.cs
@@ -1,11 +1,7 @@
using Content.Shared.Atmos;
using Content.Shared.Atmos.Monitor;
using Content.Shared.Atmos.Monitor.Components;
-using Robust.Client.GameObjects;
using Robust.Client.UserInterface;
-using Robust.Shared.GameObjects;
-using Robust.Shared.IoC;
-using Robust.Shared.Log;
namespace Content.Client.Atmos.Monitor.UI;
@@ -78,6 +74,7 @@ protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
- if (disposing) _window?.Dispose();
+ if (disposing)
+ _window?.Dispose();
}
}
diff --git a/Content.Client/Atmos/Monitor/UI/AirAlarmWindow.xaml.cs b/Content.Client/Atmos/Monitor/UI/AirAlarmWindow.xaml.cs
index e1425ac491b..65164983865 100644
--- a/Content.Client/Atmos/Monitor/UI/AirAlarmWindow.xaml.cs
+++ b/Content.Client/Atmos/Monitor/UI/AirAlarmWindow.xaml.cs
@@ -8,7 +8,6 @@
using Content.Shared.Atmos.Piping.Unary.Components;
using Content.Shared.Temperature;
using Robust.Client.AutoGenerated;
-using Robust.Client.GameObjects;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;
@@ -59,7 +58,7 @@ public AirAlarmWindow()
AirAlarmMode.Fill => "air-alarm-ui-mode-fill",
AirAlarmMode.Panic => "air-alarm-ui-mode-panic",
AirAlarmMode.None => "air-alarm-ui-mode-none",
- _ => "error"
+ _ => "error",
};
_modes.AddItem(Loc.GetString(text));
}
@@ -70,7 +69,7 @@ public AirAlarmWindow()
AirAlarmModeChanged!.Invoke((AirAlarmMode) args.Id);
};
- _autoMode.OnToggled += args =>
+ _autoMode.OnToggled += _ =>
{
AutoModeChanged!.Invoke(_autoMode.Pressed);
};
@@ -176,22 +175,18 @@ public void UpdateDeviceData(string addr, IAtmosDeviceData device)
public static Color ColorForThreshold(float amount, AtmosAlarmThreshold threshold)
{
- threshold.CheckThreshold(amount, out AtmosAlarmType curAlarm);
+ threshold.CheckThreshold(amount, out var curAlarm);
return ColorForAlarm(curAlarm);
}
public static Color ColorForAlarm(AtmosAlarmType curAlarm)
{
- if(curAlarm == AtmosAlarmType.Danger)
+ return curAlarm switch
{
- return StyleNano.DangerousRedFore;
- }
- else if(curAlarm == AtmosAlarmType.Warning)
- {
- return StyleNano.ConcerningOrangeFore;
- }
-
- return StyleNano.GoodGreenFore;
+ AtmosAlarmType.Danger => StyleNano.DangerousRedFore,
+ AtmosAlarmType.Warning => StyleNano.ConcerningOrangeFore,
+ _ => StyleNano.GoodGreenFore,
+ };
}
diff --git a/Content.Client/Atmos/Monitor/UI/Widgets/PumpControl.xaml.cs b/Content.Client/Atmos/Monitor/UI/Widgets/PumpControl.xaml.cs
index 17b03b84684..2cd51d6fc7f 100644
--- a/Content.Client/Atmos/Monitor/UI/Widgets/PumpControl.xaml.cs
+++ b/Content.Client/Atmos/Monitor/UI/Widgets/PumpControl.xaml.cs
@@ -1,12 +1,8 @@
-using System;
-using Content.Shared.Atmos.Monitor;
using Content.Shared.Atmos.Monitor.Components;
using Content.Shared.Atmos.Piping.Unary.Components;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
-using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML;
-using Robust.Shared.Localization;
namespace Content.Client.Atmos.Monitor.UI.Widgets;
@@ -25,7 +21,7 @@ public sealed partial class PumpControl : BoxContainer
private OptionButton _pressureCheck => CPressureCheck;
private FloatSpinBox _externalBound => CExternalBound;
private FloatSpinBox _internalBound => CInternalBound;
- private Button _copySettings => CCopySettings;
+ private Button _copySettings => CCopySettings;
public PumpControl(GasVentPumpData data, string address)
{
@@ -86,7 +82,7 @@ public PumpControl(GasVentPumpData data, string address)
_data.PressureChecks = (VentPressureBound) args.Id;
PumpDataChanged?.Invoke(_address, _data);
};
-
+
_copySettings.OnPressed += _ =>
{
PumpDataCopied?.Invoke(_data);
diff --git a/Content.Client/Atmos/Monitor/UI/Widgets/ScrubberControl.xaml.cs b/Content.Client/Atmos/Monitor/UI/Widgets/ScrubberControl.xaml.cs
index f2241bcd8da..c16ff688c93 100644
--- a/Content.Client/Atmos/Monitor/UI/Widgets/ScrubberControl.xaml.cs
+++ b/Content.Client/Atmos/Monitor/UI/Widgets/ScrubberControl.xaml.cs
@@ -1,15 +1,9 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
using Content.Shared.Atmos;
-using Content.Shared.Atmos.Monitor;
using Content.Shared.Atmos.Monitor.Components;
using Content.Shared.Atmos.Piping.Unary.Components;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
-using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML;
-using Robust.Shared.Localization;
namespace Content.Client.Atmos.Monitor.UI.Widgets;
@@ -27,7 +21,7 @@ public sealed partial class ScrubberControl : BoxContainer
private OptionButton _pumpDirection => CPumpDirection;
private FloatSpinBox _volumeRate => CVolumeRate;
private CheckBox _wideNet => CWideNet;
- private Button _copySettings => CCopySettings;
+ private Button _copySettings => CCopySettings;
private GridContainer _gases => CGasContainer;
private Dictionary _gasControls = new();
@@ -77,7 +71,7 @@ public ScrubberControl(GasVentScrubberData data, string address)
_data.PumpDirection = (ScrubberPumpDirection) args.Id;
ScrubberDataChanged?.Invoke(_address, _data);
};
-
+
_copySettings.OnPressed += _ =>
{
ScrubberDataCopied?.Invoke(_data);
diff --git a/Content.Client/Atmos/Monitor/UI/Widgets/SensorInfo.xaml.cs b/Content.Client/Atmos/Monitor/UI/Widgets/SensorInfo.xaml.cs
index da602cd7479..9e60b6cea62 100644
--- a/Content.Client/Atmos/Monitor/UI/Widgets/SensorInfo.xaml.cs
+++ b/Content.Client/Atmos/Monitor/UI/Widgets/SensorInfo.xaml.cs
@@ -43,7 +43,8 @@ public SensorInfo(AtmosSensorData data, string address)
var label = new RichTextLabel();
var fractionGas = amount / data.TotalMoles;
- label.SetMarkup(Loc.GetString("air-alarm-ui-gases-indicator", ("gas", $"{gas}"),
+ label.SetMarkup(Loc.GetString("air-alarm-ui-gases-indicator",
+ ("gas", $"{gas}"),
("color", AirAlarmWindow.ColorForThreshold(fractionGas, data.GasThresholds[gas])),
("amount", $"{amount:0.####}"),
("percentage", $"{(100 * fractionGas):0.##}")));
@@ -53,9 +54,9 @@ public SensorInfo(AtmosSensorData data, string address)
var threshold = data.GasThresholds[gas];
var gasThresholdControl = new ThresholdControl(Loc.GetString($"air-alarm-ui-thresholds-gas-title", ("gas", $"{gas}")), threshold, AtmosMonitorThresholdType.Gas, gas, 100);
gasThresholdControl.Margin = new Thickness(20, 2, 2, 2);
- gasThresholdControl.ThresholdDataChanged += (type, threshold, arg3) =>
+ gasThresholdControl.ThresholdDataChanged += (type, alarmThreshold, arg3) =>
{
- OnThresholdUpdate!(_address, type, threshold, arg3);
+ OnThresholdUpdate!(_address, type, alarmThreshold, arg3);
};
_gasThresholds.Add(gas, gasThresholdControl);
@@ -64,7 +65,8 @@ public SensorInfo(AtmosSensorData data, string address)
_pressureThreshold = new ThresholdControl(Loc.GetString("air-alarm-ui-thresholds-pressure-title"), data.PressureThreshold, AtmosMonitorThresholdType.Pressure);
PressureThresholdContainer.AddChild(_pressureThreshold);
- _temperatureThreshold = new ThresholdControl(Loc.GetString("air-alarm-ui-thresholds-temperature-title"), data.TemperatureThreshold,
+ _temperatureThreshold = new ThresholdControl(Loc.GetString("air-alarm-ui-thresholds-temperature-title"),
+ data.TemperatureThreshold,
AtmosMonitorThresholdType.Temperature);
TemperatureThresholdContainer.AddChild(_temperatureThreshold);
@@ -103,7 +105,8 @@ public void ChangeData(AtmosSensorData data)
}
var fractionGas = amount / data.TotalMoles;
- label.SetMarkup(Loc.GetString("air-alarm-ui-gases-indicator", ("gas", $"{gas}"),
+ label.SetMarkup(Loc.GetString("air-alarm-ui-gases-indicator",
+ ("gas", $"{gas}"),
("color", AirAlarmWindow.ColorForThreshold(fractionGas, data.GasThresholds[gas])),
("amount", $"{amount:0.####}"),
("percentage", $"{(100 * fractionGas):0.##}")));
diff --git a/Content.Client/Atmos/Monitor/UI/Widgets/ThresholdBoundControl.xaml.cs b/Content.Client/Atmos/Monitor/UI/Widgets/ThresholdBoundControl.xaml.cs
index 3612d84de4c..55f7c008987 100644
--- a/Content.Client/Atmos/Monitor/UI/Widgets/ThresholdBoundControl.xaml.cs
+++ b/Content.Client/Atmos/Monitor/UI/Widgets/ThresholdBoundControl.xaml.cs
@@ -1,7 +1,4 @@
-using Content.Client.Message;
-using Content.Shared.Atmos;
using Content.Shared.Atmos.Monitor;
-using Content.Shared.Temperature;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;
diff --git a/Content.Client/Atmos/Monitor/UI/Widgets/ThresholdControl.xaml.cs b/Content.Client/Atmos/Monitor/UI/Widgets/ThresholdControl.xaml.cs
index 78c73fa573a..651620f3e25 100644
--- a/Content.Client/Atmos/Monitor/UI/Widgets/ThresholdControl.xaml.cs
+++ b/Content.Client/Atmos/Monitor/UI/Widgets/ThresholdControl.xaml.cs
@@ -1,12 +1,8 @@
-using System;
using Content.Shared.Atmos;
using Content.Shared.Atmos.Monitor;
-using Content.Shared.Atmos.Monitor.Components;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
-using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML;
-using Robust.Shared.Localization;
// holy FUCK
// this technically works because some of this you can *not* do in XAML but holy FUCK
@@ -115,29 +111,38 @@ public ThresholdControl(string name, AtmosAlarmThreshold threshold, AtmosMonitor
_enabled.Pressed = !_threshold.Ignore;
}
- private String LabelForBound(string boundType) //, DebugMessage)> state) =>
{
if (_system.TileData.TryGetValue(uid, out var data))
diff --git a/Content.Client/Backmen/OfferItem/OfferItemIndicatorsOverlay.cs b/Content.Client/Backmen/OfferItem/OfferItemIndicatorsOverlay.cs
deleted file mode 100644
index 1f09cfa41d7..00000000000
--- a/Content.Client/Backmen/OfferItem/OfferItemIndicatorsOverlay.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-using System.Numerics;
-using Robust.Client.GameObjects;
-using Robust.Client.Graphics;
-using Robust.Client.Input;
-using Robust.Client.UserInterface;
-using Robust.Shared.Enums;
-using Robust.Shared.Utility;
-
-namespace Content.Client.Backmen.OfferItem;
-
-public sealed class OfferItemIndicatorsOverlay : Overlay
-{
- private readonly IInputManager _inputManager;
- private readonly IEntityManager _entMan;
- private readonly IEyeManager _eye;
- private readonly OfferItemSystem _offer;
-
- private readonly Texture _sight;
-
- public override OverlaySpace Space => OverlaySpace.ScreenSpace;
-
- private readonly Color _mainColor = Color.White.WithAlpha(0.3f);
- private readonly Color _strokeColor = Color.Black.WithAlpha(0.5f);
- private readonly float _scale = 0.6f; // 1 is a little big
-
- public OfferItemIndicatorsOverlay(IInputManager input, IEntityManager entMan,
- IEyeManager eye, OfferItemSystem offerSys)
- {
- _inputManager = input;
- _entMan = entMan;
- _eye = eye;
- _offer = offerSys;
-
- var spriteSys = _entMan.EntitySysManager.GetEntitySystem();
- _sight = spriteSys.Frame0(new SpriteSpecifier.Rsi(new ResPath("/Textures/Interface/Misc/give_item.rsi"),
- "give_item"));
- }
-
- protected override bool BeforeDraw(in OverlayDrawArgs args)
- {
- if (!_offer.IsInOfferMode())
- return false;
-
- return base.BeforeDraw(in args);
- }
-
- protected override void Draw(in OverlayDrawArgs args)
- {
- var mouseScreenPosition = _inputManager.MouseScreenPosition;
- var mousePosMap = _eye.PixelToMap(mouseScreenPosition);
- if (mousePosMap.MapId != args.MapId)
- return;
-
-
- var mousePos = mouseScreenPosition.Position;
- var uiScale = (args.ViewportControl as Control)?.UIScale ?? 1f;
- var limitedScale = uiScale > 1.25f ? 1.25f : uiScale;
-
- DrawSight(_sight, args.ScreenHandle, mousePos, limitedScale * _scale);
- }
-
- private void DrawSight(Texture sight, DrawingHandleScreen screen, Vector2 centerPos, float scale)
- {
- var sightSize = sight.Size * scale;
- var expandedSize = sightSize + new Vector2(7f, 7f);
-
- screen.DrawTextureRect(sight,
- UIBox2.FromDimensions(centerPos - sightSize * 0.5f, sightSize), _strokeColor);
- screen.DrawTextureRect(sight,
- UIBox2.FromDimensions(centerPos - expandedSize * 0.5f, expandedSize), _mainColor);
- }
-}
diff --git a/Content.Client/Backmen/OfferItem/OfferItemSystem.cs b/Content.Client/Backmen/OfferItem/OfferItemSystem.cs
deleted file mode 100644
index 1be1b6ebb03..00000000000
--- a/Content.Client/Backmen/OfferItem/OfferItemSystem.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-using Content.Shared.Backmen.OfferItem;
-using Robust.Client.Graphics;
-using Robust.Client.Input;
-using Robust.Client.Player;
-using Robust.Shared.Configuration;
-
-namespace Content.Client.Backmen.OfferItem;
-
-public sealed class OfferItemSystem : SharedOfferItemSystem
-{
- [Dependency] private readonly IOverlayManager _overlayManager = default!;
- [Dependency] private readonly IPlayerManager _playerManager = default!;
- [Dependency] private readonly IConfigurationManager _cfg = default!;
- [Dependency] private readonly IInputManager _inputManager = default!;
- [Dependency] private readonly IEyeManager _eye = default!;
-
- public override void Initialize()
- {
- base.Initialize();
- Subs.CVar(_cfg, Shared.Backmen.CCVar.CCVars.OfferModeIndicatorsPointShow, OnShowOfferIndicatorsChanged, true);
- }
-
-
-
- public override void Shutdown()
- {
- _overlayManager.RemoveOverlay();
- base.Shutdown();
- }
-
- public bool IsInOfferMode()
- {
- var entity = _playerManager.LocalEntity;
-
- if (entity == null)
- return false;
-
- return IsInOfferMode(entity.Value);
- }
- private void OnShowOfferIndicatorsChanged(bool isShow)
- {
- if (isShow)
- {
- _overlayManager.AddOverlay(new OfferItemIndicatorsOverlay(
- _inputManager,
- EntityManager,
- _eye,
- this));
- }
- else
- _overlayManager.RemoveOverlay();
- }
-}
diff --git a/Content.Client/Electrocution/ElectrocutionHUDVisualizerSystem.cs b/Content.Client/Electrocution/ElectrocutionHUDVisualizerSystem.cs
new file mode 100644
index 00000000000..b95c0d585d7
--- /dev/null
+++ b/Content.Client/Electrocution/ElectrocutionHUDVisualizerSystem.cs
@@ -0,0 +1,95 @@
+using Content.Shared.Electrocution;
+using Robust.Client.GameObjects;
+using Robust.Client.Player;
+using Robust.Shared.Player;
+
+namespace Content.Client.Electrocution;
+
+///
+/// Shows the Electrocution HUD to entities with the ShowElectrocutionHUDComponent.
+///
+public sealed class ElectrocutionHUDVisualizerSystem : VisualizerSystem
+{
+ [Dependency] private readonly IPlayerManager _playerMan = default!;
+
+ public override void Initialize()
+ {
+ base.Initialize();
+
+ SubscribeLocalEvent(OnInit);
+ SubscribeLocalEvent(OnShutdown);
+ SubscribeLocalEvent(OnPlayerAttached);
+ SubscribeLocalEvent(OnPlayerDetached);
+ }
+
+ private void OnPlayerAttached(Entity ent, ref LocalPlayerAttachedEvent args)
+ {
+ ShowHUD();
+ }
+
+ private void OnPlayerDetached(Entity ent, ref LocalPlayerDetachedEvent args)
+ {
+ RemoveHUD();
+ }
+
+ private void OnInit(Entity ent, ref ComponentInit args)
+ {
+ if (_playerMan.LocalEntity == ent)
+ {
+ ShowHUD();
+ }
+ }
+
+ private void OnShutdown(Entity ent, ref ComponentShutdown args)
+ {
+ if (_playerMan.LocalEntity == ent)
+ {
+ RemoveHUD();
+ }
+ }
+
+ // Show the HUD to the client.
+ // We have to look for all current entities that can be electrified and toggle the HUD layer on if they are.
+ private void ShowHUD()
+ {
+ var electrifiedQuery = AllEntityQuery();
+ while (electrifiedQuery.MoveNext(out var uid, out var _, out var appearanceComp, out var spriteComp))
+ {
+ if (!AppearanceSystem.TryGetData(uid, ElectrifiedVisuals.IsElectrified, out var electrified, appearanceComp))
+ continue;
+
+ if (electrified)
+ spriteComp.LayerSetVisible(ElectrifiedLayers.HUD, true);
+ else
+ spriteComp.LayerSetVisible(ElectrifiedLayers.HUD, false);
+ }
+ }
+
+ // Remove the HUD from the client.
+ // Find all current entities that can be electrified and hide the HUD layer.
+ private void RemoveHUD()
+ {
+ var electrifiedQuery = AllEntityQuery();
+ while (electrifiedQuery.MoveNext(out var uid, out var _, out var appearanceComp, out var spriteComp))
+ {
+
+ spriteComp.LayerSetVisible(ElectrifiedLayers.HUD, false);
+ }
+ }
+
+ // Toggle the HUD layer if an entity becomes (de-)electrified
+ protected override void OnAppearanceChange(EntityUid uid, ElectrocutionHUDVisualsComponent comp, ref AppearanceChangeEvent args)
+ {
+ if (args.Sprite == null)
+ return;
+
+ if (!AppearanceSystem.TryGetData(uid, ElectrifiedVisuals.IsElectrified, out var electrified, args.Component))
+ return;
+
+ var player = _playerMan.LocalEntity;
+ if (electrified && HasComp(player))
+ args.Sprite.LayerSetVisible(ElectrifiedLayers.HUD, true);
+ else
+ args.Sprite.LayerSetVisible(ElectrifiedLayers.HUD, false);
+ }
+}
diff --git a/Content.Client/Eui/BaseEui.cs b/Content.Client/Eui/BaseEui.cs
index 7f86ded7e48..c11ba5a9b69 100644
--- a/Content.Client/Eui/BaseEui.cs
+++ b/Content.Client/Eui/BaseEui.cs
@@ -55,7 +55,7 @@ public virtual void HandleMessage(EuiMessageBase msg)
///
protected void SendMessage(EuiMessageBase msg)
{
- var netMsg = _netManager.CreateNetMessage();
+ var netMsg = new MsgEuiMessage();
netMsg.Id = Id;
netMsg.Message = msg;
diff --git a/Content.Client/Input/ContentContexts.cs b/Content.Client/Input/ContentContexts.cs
index a113125d925..eafaa4774aa 100644
--- a/Content.Client/Input/ContentContexts.cs
+++ b/Content.Client/Input/ContentContexts.cs
@@ -89,7 +89,6 @@ public static void SetupContexts(IInputContextContainer contexts)
human.AddFunction(ContentKeyFunctions.ToggleStanding); // Ataraxia
human.AddFunction(ContentKeyFunctions.LookUp); // BACKMEN EDIT
human.AddFunction(CMKeyFunctions.CMUniqueAction); // BACKMEN EDIT
- human.AddFunction(ContentKeyFunctions.OfferItem); // Ataraxia
human.AddFunction(ContentKeyFunctions.TargetHead);
human.AddFunction(ContentKeyFunctions.TargetTorso);
human.AddFunction(ContentKeyFunctions.TargetLeftArm);
diff --git a/Content.Client/Light/HandheldLightSystem.cs b/Content.Client/Light/HandheldLightSystem.cs
index ddd99c7c483..d25b28756f8 100644
--- a/Content.Client/Light/HandheldLightSystem.cs
+++ b/Content.Client/Light/HandheldLightSystem.cs
@@ -21,6 +21,22 @@ public override void Initialize()
SubscribeLocalEvent(OnAppearanceChange);
}
+ ///
+ /// TODO: Not properly predicted yet. Don't call this function if you want a the actual return value!
+ ///
+ public override bool TurnOff(Entity ent, bool makeNoise = true)
+ {
+ return true;
+ }
+
+ ///
+ /// TODO: Not properly predicted yet. Don't call this function if you want a the actual return value!
+ ///
+ public override bool TurnOn(EntityUid user, Entity uid)
+ {
+ return true;
+ }
+
private void OnAppearanceChange(EntityUid uid, HandheldLightComponent? component, ref AppearanceChangeEvent args)
{
if (!Resolve(uid, ref component))
diff --git a/Content.Client/Lobby/LobbyUIController.cs b/Content.Client/Lobby/LobbyUIController.cs
index 125f2e4ffaf..5bcf467ddb0 100644
--- a/Content.Client/Lobby/LobbyUIController.cs
+++ b/Content.Client/Lobby/LobbyUIController.cs
@@ -6,6 +6,8 @@
using Content.Client.Lobby.UI;
using Content.Client.Players.PlayTimeTracking;
using Content.Client.Station;
+using Content.Corvax.Interfaces.Client;
+using Content.Corvax.Interfaces.Shared;
using Content.Shared.CCVar;
using Content.Shared.Clothing;
using Content.Shared.GameTicking;
@@ -40,6 +42,7 @@ public sealed partial class LobbyUIController : UIController, IOnStateEntered= 0 } &&
selector.Cost + selectionCount > category.MaxTraitPoints)
{
diff --git a/Content.Client/Lobby/UI/Roles/TraitPreferenceSelector.xaml.cs b/Content.Client/Lobby/UI/Roles/TraitPreferenceSelector.xaml.cs
index a52a3fa2dbc..59ff8eff1b9 100644
--- a/Content.Client/Lobby/UI/Roles/TraitPreferenceSelector.xaml.cs
+++ b/Content.Client/Lobby/UI/Roles/TraitPreferenceSelector.xaml.cs
@@ -10,6 +10,7 @@ namespace Content.Client.Lobby.UI.Roles;
public sealed partial class TraitPreferenceSelector : Control
{
public int Cost;
+ public readonly TraitPrototype Trait;
public bool Preference
{
@@ -23,6 +24,7 @@ public TraitPreferenceSelector(TraitPrototype trait)
{
RobustXamlLoader.Load(this);
+ Trait = trait;
var text = trait.Cost != 0 ? $"[{trait.Cost}] " : "";
text += Loc.GetString(trait.Name);
diff --git a/Content.Client/Options/UI/Tabs/KeyRebindTab.xaml.cs b/Content.Client/Options/UI/Tabs/KeyRebindTab.xaml.cs
index a7f68538bdd..5cbcef8f7b2 100644
--- a/Content.Client/Options/UI/Tabs/KeyRebindTab.xaml.cs
+++ b/Content.Client/Options/UI/Tabs/KeyRebindTab.xaml.cs
@@ -208,7 +208,6 @@ void HandleToggleAutoGetUp(BaseButton.ButtonToggledEventArgs args) // BACKMEN ED
AddButton(ContentKeyFunctions.SaveItemLocation);
AddButton(ContentKeyFunctions.ToggleStanding); // backmen: Laying System
AddButton(ContentKeyFunctions.LookUp); // BACKMEN EDIT
- AddButton(ContentKeyFunctions.OfferItem); // Ataraxia
AddCheckBox("ui-options-function-hold-look-up", _cfg.GetCVar(BackmenCCvars.CCVars.HoldLookUp), HandleHoldLookUp); // WD EDIT
AddHeader("ui-options-header-interaction-adv");
diff --git a/Content.Client/Shuttles/UI/BaseShuttleControl.xaml.cs b/Content.Client/Shuttles/UI/BaseShuttleControl.xaml.cs
index b50d8fa6b21..a5411005391 100644
--- a/Content.Client/Shuttles/UI/BaseShuttleControl.xaml.cs
+++ b/Content.Client/Shuttles/UI/BaseShuttleControl.xaml.cs
@@ -116,7 +116,7 @@ protected void DrawCircles(DrawingHandleScreen handle)
}
}
- protected void DrawGrid(DrawingHandleScreen handle, Matrix3x2 matrix, Entity grid, Color color, float alpha = 0.01f)
+ protected void DrawGrid(DrawingHandleScreen handle, Matrix3x2 gridToView, Entity grid, Color color, float alpha = 0.01f)
{
var rator = Maps.GetAllTilesEnumerator(grid.Owner, grid.Comp);
var minimapScale = MinimapScale;
@@ -264,7 +264,7 @@ protected void DrawGrid(DrawingHandleScreen handle, Matrix3x2 matrix, Entity