diff --git a/.github/mapchecker/config.py b/.github/mapchecker/config.py index 5c8b1abb05b..3f795f474f5 100644 --- a/.github/mapchecker/config.py +++ b/.github/mapchecker/config.py @@ -52,5 +52,8 @@ ], "Sr": [ "ButtonFrameCautionSecurity", # Decal. + ], + "Medical": [ + "ButtonFrameCautionSecurity", # Decal. ] } diff --git a/Content.Client/Atmos/Consoles/AtmosAlertsComputerWindow.xaml.cs b/Content.Client/Atmos/Consoles/AtmosAlertsComputerWindow.xaml.cs index 57ad482e02f..344a71a470d 100644 --- a/Content.Client/Atmos/Consoles/AtmosAlertsComputerWindow.xaml.cs +++ b/Content.Client/Atmos/Consoles/AtmosAlertsComputerWindow.xaml.cs @@ -31,7 +31,6 @@ public sealed partial class AtmosAlertsComputerWindow : FancyWindow private AtmosAlertsComputerEntry[]? _airAlarms = null; private AtmosAlertsComputerEntry[]? _fireAlarms = null; - private AtmosAlertsComputerEntry[]? _gaslocks = null; // Frontier private IEnumerable? _allAlarms = null; private IEnumerable? _activeAlarms = null; @@ -195,7 +194,6 @@ public void UpdateUI(EntityCoordinates? consoleCoords, AtmosAlertsComputerEntry[ // Retain alarm data for use inbetween updates _airAlarms = airAlarms; _fireAlarms = fireAlarms; - _gaslocks = gaslocks; // Frontier _allAlarms = airAlarms.Concat(fireAlarms); _allAlarms = airAlarms.Concat(gaslocks); // Frontier @@ -288,7 +286,7 @@ public void UpdateUI(EntityCoordinates? consoleCoords, AtmosAlertsComputerEntry[ } // Frontier: gaslocks - for (int index = 0; index < gaslocks.Count(); index++) + for (var index = 0; index < gaslocks.Length; index++) { var entry = gaslocks.ElementAt(index); UpdateGaslockUIEntry(entry, index, GaslocksTable, console, focusGaslockData); @@ -470,7 +468,7 @@ private void UpdateGaslockUIEntry(AtmosAlertsComputerEntry entry, int index, Con newEntryContainer.SendUndockAction += SendGaslockUndockAction; // On click - newEntryContainer.FocusButton.OnButtonUp += args => + newEntryContainer.FocusButton.OnButtonUp += _ => { if (_trackedEntity == newEntryContainer.NetEntity) { @@ -502,7 +500,7 @@ private void UpdateGaslockUIEntry(AtmosAlertsComputerEntry entry, int index, Con // Update values and UI elements var tableChild = table.GetChild(index); - if (tableChild is not AtmosAlarmGaslockEntryContainer) + if (tableChild is not AtmosAlarmGaslockEntryContainer entryContainer) { table.RemoveChild(tableChild); UpdateGaslockUIEntry(entry, index, table, console, focusData); @@ -510,8 +508,6 @@ private void UpdateGaslockUIEntry(AtmosAlertsComputerEntry entry, int index, Con return; } - var entryContainer = (AtmosAlarmGaslockEntryContainer)tableChild; - entryContainer.UpdateEntry(entry, entry.NetEntity == _trackedEntity, focusData); } // End Frontier: separate UpdateUI function for gaslocks @@ -520,26 +516,27 @@ private void UpdateConsoleTable(AtmosAlertsComputerComponent console, Control ta { foreach (var tableChild in table.Children) { - // Frontier: multiple type checks - if (tableChild is AtmosAlarmEntryContainer) + switch (tableChild) { - var entryContainer = (AtmosAlarmEntryContainer)tableChild; - - if (entryContainer.NetEntity != currTrackedEntity) - entryContainer.RemoveAsFocus(); - - else if (entryContainer.NetEntity == currTrackedEntity) - entryContainer.SetAsFocus(); - } - else if (tableChild is AtmosAlarmGaslockEntryContainer) - { - var entryContainer = (AtmosAlarmGaslockEntryContainer)tableChild; + // Frontier: multiple type checks + case AtmosAlarmEntryContainer entry: + { + if (entry.NetEntity != currTrackedEntity) + entry.RemoveAsFocus(); - if (entryContainer.NetEntity != currTrackedEntity) - entryContainer.RemoveAsFocus(); + else if (entry.NetEntity == currTrackedEntity) + entry.SetAsFocus(); + break; + } + case AtmosAlarmGaslockEntryContainer gaslockEntry: + { + if (gaslockEntry.NetEntity != currTrackedEntity) + gaslockEntry.RemoveAsFocus(); - else if (entryContainer.NetEntity == currTrackedEntity) - entryContainer.SetAsFocus(); + else if (gaslockEntry.NetEntity == currTrackedEntity) + gaslockEntry.SetAsFocus(); + break; + } } // End Frontier } @@ -671,14 +668,13 @@ private bool TryGetNextScrollPosition([NotNullWhen(true)] out float? nextScrollP foreach (var control in container.Children) { - if (control == null) // Frontier: move type checks down - continue; - - if (control is AtmosAlarmEntryContainer && ((AtmosAlarmEntryContainer)control).NetEntity == _trackedEntity) // Frontier: add type check + // Frontier - Move type checks down + if (control is AtmosAlarmEntryContainer entry && entry.NetEntity == _trackedEntity) return true; - if (control is AtmosAlarmGaslockEntryContainer && ((AtmosAlarmGaslockEntryContainer)control).NetEntity == _trackedEntity) // Frontier - return true; // Frontier + // Frontier - Add gaslock check + if (control is AtmosAlarmGaslockEntryContainer gaslockEntry && gaslockEntry.NetEntity == _trackedEntity) + return true; nextScrollPosition += control.Height; } diff --git a/Content.Client/Fax/AdminUI/AdminFaxEui.cs b/Content.Client/Fax/AdminUI/AdminFaxEui.cs index 452c54eb797..3e79e2c6870 100644 --- a/Content.Client/Fax/AdminUI/AdminFaxEui.cs +++ b/Content.Client/Fax/AdminUI/AdminFaxEui.cs @@ -16,7 +16,7 @@ public AdminFaxEui() _window.OnClose += () => SendMessage(new AdminFaxEuiMsg.Close()); _window.OnFollowFax += entity => SendMessage(new AdminFaxEuiMsg.Follow(entity)); _window.OnMessageSend += args => SendMessage(new AdminFaxEuiMsg.Send(args.entity, args.title, - args.stampedBy, args.message, args.stampSprite, args.stampColor, args.locked)); + args.stampedBy, args.message, args.stampSprite, args.stampColor, args.locked, args.stampProtected)); // Frontier } public override void Opened() diff --git a/Content.Client/Fax/AdminUI/AdminFaxWindow.xaml b/Content.Client/Fax/AdminUI/AdminFaxWindow.xaml index dc4092a3b53..6a8b1ee8e76 100644 --- a/Content.Client/Fax/AdminUI/AdminFaxWindow.xaml +++ b/Content.Client/Fax/AdminUI/AdminFaxWindow.xaml @@ -24,6 +24,9 @@