Make PACMANs a little better (#24604)

* PACMAN generators show network load/supply.

This gives more feedback to players that their PACMAN is properly connected and what the network status is (i.e. you don't have enough generators).

* Buff JRPACMAN to 8 kW.

Shifted all power values up by +3 kW.

They're frequently too weak to power even single rooms so they deserve a buff.

* Change unit format helpers number format.

Always displays one digit of precision. This avoids jumping around when a value is changing live.
This commit is contained in:
Pieter-Jan Briers
2024-01-27 03:53:43 +01:00
committed by GitHub
parent 41c0efeaf1
commit f855cb2b00
9 changed files with 72 additions and 17 deletions

View File

@@ -1,8 +1,8 @@
<controls:FancyWindow xmlns="https://spacestation14.io"
xmlns:cc="clr-namespace:Content.Client.Administration.UI.CustomControls"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
MinSize="450 235"
SetSize="450 235"
MinSize="450 250"
SetSize="450 250"
Resizable="False"
Title="{Loc 'portable-generator-ui-title'}">
<BoxContainer Margin="4 0" Orientation="Horizontal">
@@ -32,6 +32,11 @@
</BoxContainer>
<Label Name="OutputSwitchLabel" Text="{Loc 'portable-generator-ui-switch'}" Visible="False" />
<Button Name="OutputSwitchButton" Visible="False" />
<!-- Network stats menu -->
<Label Text="{Loc 'portable-generator-ui-network-stats'}"/>
<Control>
<Label Name="NetworkStats" />
</Control>
</GridContainer>
<Label Margin="2 0 0 0" Name="CloggedLabel" FontColorOverride="Red" Text="{Loc 'portable-generator-ui-clogged'}" />
</BoxContainer>

View File

@@ -115,6 +115,22 @@ public sealed partial class GeneratorWindow : FancyWindow
}
CloggedLabel.Visible = state.Clogged;
if (state.NetworkStats is { } netStats)
{
NetworkStats.Text = Loc.GetString(
"portable-generator-ui-network-stats-value",
("load", netStats.Load),
("supply", netStats.Supply));
var good = netStats.Load <= netStats.Supply;
NetworkStats.SetOnlyStyleClass(good ? "Good" : "Caution");
}
else
{
NetworkStats.Text = Loc.GetString("portable-generator-ui-network-stats-not-connected");
NetworkStats.StyleClasses.Clear();
}
}
private bool TryGetStartProgress(out float progress)