Bugfix: Station AI's Comms Console UI is missing a screen (#45663)

* Add a default screen to the comms console BUI

* Return to Screen, ScreenDummy is dead

* margin adjustment
This commit is contained in:
Whatstone 2026-08-31 19:03:50 +00:00 • committed by GitHub
parent 196167622e
commit 0b2245ff2c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 13 additions and 15 deletions

View file

@ -15,5 +15,5 @@ public sealed partial class CommunicationsConsoleComponent : SharedCommunication
/// If this isn't true, create a dummy entity or adjust the margins/scale in MessagingControls.xaml.
/// </remarks>
[DataField]
public EntProtoId ScreenDisplayId = "ScreenDummy";
public EntProtoId ScreenDisplayId = "Screen";
}

View file

@ -24,6 +24,8 @@ public sealed partial class CommunicationsConsoleBoundUserInterface(EntityUid ow
[ViewVariables]
private CommunicationsConsoleMenu? _menu;
private static readonly EntProtoId FallbackScreen = "Screen";
/// <inheritdoc/>
protected override void Open()
{
@ -38,6 +40,8 @@ public sealed partial class CommunicationsConsoleBoundUserInterface(EntityUid ow
if (EntMan.TryGetComponent<CommunicationsConsoleComponent>(Owner, out var console))
_menu.SetBroadcastDisplayEntity(console.ScreenDisplayId);
else
_menu.SetBroadcastDisplayEntity(FallbackScreen);
}
public void AlertLevelSelected(ProtoId<AlertLevelPrototype> level)

View file

@ -25,12 +25,14 @@
<Label StyleClasses="StatusFieldTitle" Align="Center" VAlign="Top"
VerticalAlignment="Top"
Text="{Loc 'comms-console-station-broadcast-header'}" />
<Label Name="BroadcastTopCharLimitLabel"
StyleClasses="CommsConsoleCharLimit" HorizontalAlignment="Center" Margin="0 10 0 0" />
<SpriteView Name="BroadcastEntityDisplay" Scale="8 8" SpriteOffset="True"
VerticalExpand="True" Margin="0 -124 0 -112" /> <!-- Forgive me for negamargin but there's just too much goddamn space - whatstone -->
<Label Name="BroadcastBottomCharLimitLabel"
StyleClasses="CommsConsoleCharLimit" HorizontalAlignment="Center" />
<BoxContainer Orientation="Vertical" VerticalExpand="True" VerticalAlignment="Center">
<Label Name="BroadcastTopCharLimitLabel"
StyleClasses="CommsConsoleCharLimit" HorizontalAlignment="Center" Margin="0 10 0 0" />
<SpriteView Name="BroadcastEntityDisplay" Scale="8 8" SpriteOffset="True"
Margin="0 -56 0 -56" /> <!-- Forgive me for negamargin but there's just too much goddamn space - whatstone -->
<Label Name="BroadcastBottomCharLimitLabel"
StyleClasses="CommsConsoleCharLimit" HorizontalAlignment="Center" />
</BoxContainer>
<PanelContainer StyleClasses="BackgroundDark" Margin="10 6 6 6"
HorizontalExpand="True" VerticalExpand="True">
<TextEdit Name="ScreenMessageInput" MinHeight="40"

View file

@ -39,14 +39,6 @@
deviceNetId: Wireless
receiveFrequencyId: ShuttleTimer
# Dummy screen for comms console
- type: entity
parent: Screen
id: ScreenDummy
categories: [HideSpawnMenu]
components:
- type: Sprite
- type: entity
id: ArrivalsShuttleTimer
parent: Screen