Skip to content

Commit

Permalink
Merge branch 'master' into FSB-Caladrius-(Replacement-Shuttle---Caduc…
Browse files Browse the repository at this point in the history
…eus)
  • Loading branch information
dustylens authored Jan 22, 2025
2 parents e62bfdc + 51b9336 commit e7662f5
Show file tree
Hide file tree
Showing 201 changed files with 17,409 additions and 2,657 deletions.
3 changes: 3 additions & 0 deletions .github/mapchecker/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,8 @@
],
"Sr": [
"ButtonFrameCautionSecurity", # Decal.
],
"Medical": [
"ButtonFrameCautionSecurity", # Decal.
]
}
56 changes: 26 additions & 30 deletions Content.Client/Atmos/Consoles/AtmosAlertsComputerWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<AtmosAlertsComputerEntry>? _allAlarms = null;

private IEnumerable<AtmosAlertsComputerEntry>? _activeAlarms = null;
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -502,16 +500,14 @@ 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);

return;
}

var entryContainer = (AtmosAlarmGaslockEntryContainer)tableChild;

entryContainer.UpdateEntry(entry, entry.NetEntity == _trackedEntity, focusData);
}
// End Frontier: separate UpdateUI function for gaslocks
Expand All @@ -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
}
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Fax/AdminUI/AdminFaxEui.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 3 additions & 0 deletions Content.Client/Fax/AdminUI/AdminFaxWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
<Label Text="{Loc admin-fax-stamp-color}" />
<ColorSelectorSliders Margin="12 0 0 0" Name="StampColorSelector" Color="#BB3232"/>
<CheckBox Name="LockPageCheckbox" Text="{Loc admin-fax-lock-page}" ToolTip="{Loc admin-fax-lock-page-tooltip}"/>
<!-- Frontier: stamp protection -->
<CheckBox Name="StampProtectPageCheckbox" Text="{Loc admin-fax-stamp-protect-page}" ToolTip="{Loc admin-fax-stamp-protect-page-tooltip}"/>
<!-- End Frontier: stamp protection -->
<Button Name="SendButton" Text="{Loc admin-fax-send}" Margin="0 10 0 0" />
</BoxContainer>
</DefaultWindow>
5 changes: 3 additions & 2 deletions Content.Client/Fax/AdminUI/AdminFaxWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public sealed partial class AdminFaxWindow : DefaultWindow
{
private const string StampsRsiPath = "/Textures/Objects/Misc/bureaucracy.rsi";

public Action<(NetEntity entity, string title, string stampedBy, string message, string stampSprite, Color stampColor, bool locked)>? OnMessageSend;
public Action<(NetEntity entity, string title, string stampedBy, string message, string stampSprite, Color stampColor, bool locked, bool stampProtected)>? OnMessageSend; // Frontier: add stampProtected
public Action<NetEntity>? OnFollowFax;

[Dependency] private readonly IResourceCache _resCache = default!;
Expand Down Expand Up @@ -99,6 +99,7 @@ private void SendMessage(BaseButton.ButtonEventArgs obj)
var from = FromEdit.Text;
var stampColor = StampColorSelector.Color;
var locked = LockPageCheckbox.Pressed;
OnMessageSend?.Invoke((faxEntity.Value, title, from, message, stamp, stampColor, locked));
var stampProtected = StampProtectPageCheckbox.Pressed; // Frontier
OnMessageSend?.Invoke((faxEntity.Value, title, from, message, stamp, stampColor, locked, stampProtected)); // Frontier: add stampProtected
}
}
2 changes: 1 addition & 1 deletion Content.Client/Shuttles/UI/ShuttleNavControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ protected override void Draw(DrawingHandleScreen handle)
// The actual position in the UI. We offset the matrix position to render it off by half its width
// plus by the offset.
//var uiPosition = ScalePosition(gridCentre) / UIScale;
var uiPosition = Vector2.Transform(gridBody.LocalCenter, curGridToView);
var uiPosition = Vector2.Transform(gridBody.LocalCenter, curGridToView) / UIScale;

// Confines the UI position within the viewport.
var uiXCentre = (int) Width / 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,11 @@

namespace Content.Client._NF.Atmos.BUI;

public sealed class GasSaleConsoleBoundUserInterface : BoundUserInterface
public sealed class GasSaleConsoleBoundUserInterface(EntityUid owner, Enum uiKey) : BoundUserInterface(owner, uiKey)
{
[ViewVariables]
private GasSaleMenu? _menu;

public GasSaleConsoleBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
{
}

protected override void Open()
{
base.Open();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,73 +1,93 @@
<BoxContainer xmlns="https://spacestation14.io"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:s="clr-namespace:Content.Client.Stylesheets"
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
Orientation="Vertical" HorizontalExpand ="True" Margin="0 0 0 3">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
Orientation="Vertical" HorizontalExpand="True" Margin="0 0 0 3">

<!-- Device selection button -->
<Button Name="FocusButton" HorizontalExpand="True" SetHeight="32" Margin="12 0 0 0" StyleClasses="OpenBoth" Access="Public">
<Button Name="FocusButton" HorizontalExpand="True" SetHeight="32" Margin="12 0 0 0" StyleClasses="OpenBoth"
Access="Public">
<BoxContainer HorizontalExpand="True" VerticalExpand="True" Orientation="Horizontal">

<!-- Alarm state -->
<TextureRect Stretch="Keep" HorizontalAlignment="Left" Margin="-20 -2 0 0" ModulateSelfOverride="#25252a" TexturePath="/Textures/Interface/AtmosMonitoring/status_bg.png">
<TextureRect Stretch="Keep" HorizontalAlignment="Left" Margin="-20 -2 0 0" ModulateSelfOverride="#25252a"
TexturePath="/Textures/Interface/AtmosMonitoring/status_bg.png">
<BoxContainer VerticalExpand="True" HorizontalExpand="True" Orientation="Horizontal" Margin="8 0">
<TextureRect Name="ArrowTexture" VerticalAlignment="Center" SetSize="12 12" Stretch="KeepAspectCentered" Margin="3 0" TexturePath="/Textures/Interface/Nano/triangle_right.png"></TextureRect>
<Label Name="AlarmStateLabel" HorizontalExpand="True" HorizontalAlignment="Center" FontColorOverride="#5A5A5A" Text="{Loc 'atmos-alerts-window-invalid-state'}"></Label>
<TextureRect Name="ArrowTexture" VerticalAlignment="Center" SetSize="12 12"
Stretch="KeepAspectCentered" Margin="3 0"
TexturePath="/Textures/Interface/Nano/triangle_right.png" />
<Label Name="AlarmStateLabel" HorizontalExpand="True" HorizontalAlignment="Center"
FontColorOverride="#5A5A5A" Text="{Loc 'atmos-alerts-window-invalid-state'}" />
</BoxContainer>
</TextureRect>

<!-- Alarm name -->
<Label Name="AlarmNameLabel" Text="???" HorizontalExpand="True" HorizontalAlignment="Center" Margin="5 0"></Label>
<Label Name="AlarmNameLabel" Text="???" HorizontalExpand="True" HorizontalAlignment="Center" Margin="5 0" />
</BoxContainer>
</Button>

<!-- Panel that appears on selecting the device -->
<PanelContainer Name="FocusContainer" HorizontalExpand="True" Margin="1 -1 1 0" ReservesSpace="False" Visible="False" Access="Public">
<PanelContainer Name="FocusContainer" HorizontalExpand="True" Margin="1 -1 1 0" ReservesSpace="False"
Visible="False" Access="Public">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#25252a"/>
<gfx:StyleBoxFlat BackgroundColor="#25252a" />
</PanelContainer.PanelOverride>
<BoxContainer HorizontalExpand="True" VerticalExpand="True" Orientation="Vertical">

<!-- Atmosphere status -->
<Control>

<!-- Main container for displaying atmospheric data -->
<BoxContainer Name="MainDataContainer" HorizontalExpand="True" VerticalExpand="True" Orientation="Vertical" ReservesSpace="False" Visible="False">
<BoxContainer Name="MainDataContainer" HorizontalExpand="True" VerticalExpand="True"
Orientation="Vertical" ReservesSpace="False" Visible="False">
<BoxContainer HorizontalExpand="True" Orientation="Horizontal">
<Label Name="DirectionHeaderLabel" Text="{Loc 'atmos-alerts-window-direction-label'}" HorizontalAlignment="Center" HorizontalExpand="True" FontColorOverride="#a9a9a9" Margin="0 2 0 0" SetHeight="24"/>
<Label Name="PressureHeaderLabel" Text="{Loc 'atmos-alerts-window-pressure-label'}" HorizontalAlignment="Center" HorizontalExpand="True" FontColorOverride="#a9a9a9" Margin="0 2 0 0" SetHeight="24"/>
<Label Name="EnabledHeaderLabel" Text="{Loc 'atmos-alerts-window-enabled-label'}" HorizontalAlignment="Center" HorizontalExpand="True" FontColorOverride="#a9a9a9" Margin="0 2 0 0" SetHeight="24"/>
<Label Name="DockedHeaderLabel" Text="{Loc 'atmos-alerts-window-docked-label'}" HorizontalAlignment="Center" HorizontalExpand="True" FontColorOverride="#a9a9a9" Margin="0 2 0 0" SetHeight="24"/>
<Label Name="DirectionHeaderLabel" Text="{Loc 'atmos-alerts-window-direction-label'}"
HorizontalAlignment="Center" HorizontalExpand="True" FontColorOverride="#a9a9a9"
Margin="0 2 0 0" SetHeight="24" />
<Label Name="PressureHeaderLabel" Text="{Loc 'atmos-alerts-window-pressure-label'}"
HorizontalAlignment="Center" HorizontalExpand="True" FontColorOverride="#a9a9a9"
Margin="0 2 0 0" SetHeight="24" />
<Label Name="EnabledHeaderLabel" Text="{Loc 'atmos-alerts-window-enabled-label'}"
HorizontalAlignment="Center" HorizontalExpand="True" FontColorOverride="#a9a9a9"
Margin="0 2 0 0" SetHeight="24" />
<Label Name="DockedHeaderLabel" Text="{Loc 'atmos-alerts-window-docked-label'}"
HorizontalAlignment="Center" HorizontalExpand="True" FontColorOverride="#a9a9a9"
Margin="0 2 0 0" SetHeight="24" />
</BoxContainer>
<PanelContainer HorizontalExpand="True">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#202023"/>
<gfx:StyleBoxFlat BackgroundColor="#202023" />
</PanelContainer.PanelOverride>
<BoxContainer HorizontalExpand="True" Orientation="Horizontal">
<Button Name="DirectionLabel" Text="???" HorizontalAlignment="Center" HorizontalExpand="True" Margin="0 2 0 0" />
<LineEdit Name="PressureInput" Text="???" MinSize="70 0" HorizontalAlignment="Center" HorizontalExpand="True" Margin="0 2 0 0"/>
<Button Name="EnabledLabel" Text="???" HorizontalAlignment="Center" HorizontalExpand="True" Margin="0 2 0 0"/>
<Button Name="DockedLabel" Text="???" HorizontalAlignment="Center" HorizontalExpand="True" Margin="0 2 0 0"/>
<Button Name="DirectionLabel" Text="???" HorizontalAlignment="Center"
HorizontalExpand="True" Margin="0 2 0 0" />
<LineEdit Name="PressureInput" Text="???" MinSize="70 0" HorizontalAlignment="Center"
HorizontalExpand="True" Margin="0 2 0 0" />
<Button Name="EnabledLabel" Text="???" HorizontalAlignment="Center" HorizontalExpand="True"
Margin="0 2 0 0" />
<Button Name="DockedLabel" Text="???" HorizontalAlignment="Center" HorizontalExpand="True"
Margin="0 2 0 0" />
</BoxContainer>
</PanelContainer>
<BoxContainer HorizontalExpand="True" Orientation="Horizontal">
<Label Name="GasesHeaderLabel" Text="{Loc 'atmos-alerts-window-gaslock-gases-label'}" HorizontalAlignment="Center" HorizontalExpand="True" FontColorOverride="#a9a9a9" Margin="0 4 0 0" SetHeight="24"></Label>
</BoxContainer> <PanelContainer HorizontalExpand=
"True">
<Label Name="GasesHeaderLabel" Text="{Loc 'atmos-alerts-window-gaslock-gases-label'}"
HorizontalAlignment="Center" HorizontalExpand="True" FontColorOverride="#a9a9a9"
Margin="0 4 0 0" SetHeight="24" />
</BoxContainer>
<PanelContainer HorizontalExpand="True">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#202023"/>
<gfx:StyleBoxFlat BackgroundColor="#202023" />
</PanelContainer.PanelOverride>

<!-- Gas entries added via C# code -->
<GridContainer Name="GasGridContainer" HorizontalExpand="True" Columns = "4"></GridContainer>
<GridContainer Name="GasGridContainer" HorizontalExpand="True" Columns="4" />
</PanelContainer>
</BoxContainer>

<!-- If the alarm is inactive, this is label is diplayed instead -->
<Label Name="NoDataLabel" Text="{Loc 'atmos-alerts-window-no-data-available'}" HorizontalAlignment="Center" Margin="0 15" FontColorOverride="#a9a9a9" ReservesSpace="False" Visible="False"></Label>
<Label Name="NoDataLabel" Text="{Loc 'atmos-alerts-window-no-data-available'}"
HorizontalAlignment="Center" Margin="0 15" FontColorOverride="#a9a9a9" ReservesSpace="False"
Visible="False" />
</Control>
</BoxContainer>
</PanelContainer>

</BoxContainer>
Loading

0 comments on commit e7662f5

Please sign in to comment.