]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Adjust power monitor power display (#28487)
authorKevin Zheng <kevinz5000@gmail.com>
Sat, 1 Jun 2024 20:56:57 +0000 (12:56 -0800)
committerGitHub <noreply@github.com>
Sat, 1 Jun 2024 20:56:57 +0000 (16:56 -0400)
Content.Client/Power/PowerMonitoringWindow.xaml.Widgets.cs
Resources/Locale/en-US/components/power-monitoring-component.ftl

index 25a586a75de8eda326dd49da26f1599a219d56f0..1427df05153422e2fc455277445b50180f392137 100644 (file)
@@ -102,7 +102,8 @@ public sealed partial class PowerMonitoringWindow
         button.ToolTip = Loc.GetString(name);
 
         // Update power value
-        button.PowerValue.Text = Loc.GetString("power-monitoring-window-value", ("value", entry.PowerValue));
+        // Don't use SI prefixes, just give the number in W, so that it is readily apparent which consumer is using a lot of power.
+        button.PowerValue.Text = Loc.GetString("power-monitoring-window-button-value", ("value", Math.Round(entry.PowerValue).ToString("N0")));
     }
 
     private void UpdateEntrySourcesOrLoads(BoxContainer masterContainer, BoxContainer currentContainer, PowerMonitoringConsoleEntry[]? entries, SpriteSpecifier.Texture icon)
@@ -480,6 +481,7 @@ public sealed class PowerMonitoringButton : Button
         PowerValue = new Label()
         {
             HorizontalAlignment = HAlignment.Right,
+            Align = Label.AlignMode.Right,
             SetWidth = 72f,
             Margin = new Thickness(10, 0, 0, 0),
             ClipText = true,
index e84c09e60d5bcd3d5d077b673cefe04082111179..9433c9ea9ef90ad1146e9844179ddba8f543fb05 100644 (file)
@@ -14,6 +14,7 @@ power-monitoring-window-total-sources = Total generator output
 power-monitoring-window-total-battery-usage = Total battery usage
 power-monitoring-window-total-loads = Total network loads
 power-monitoring-window-value = { POWERWATTS($value) }
+power-monitoring-window-button-value = {$value} W
 power-monitoring-window-show-inactive-consumers = Show Inactive Consumers
 
 power-monitoring-window-show-cable-networks = Toggle cable networks