Atmospheric network monitor (#32294)
* Updated to latest master version * Added gas pipe analyzer * Completed prototype * Playing with UI display * Refinement of the main UI * Renamed gas pipe analyzer to gas pipe sensor * Added focus network highlighting and map icons for gas pipe sensors * Added construction graph for gas pipe sensor * Improved efficiency of atmos pipe and focus pipe network data storage * Added gas pipe sensor variants * Fixed gas pipe sensor nav map icon not highlighting on focus * Rendered pipe lines now get merged together * Set up appearance handling for the gas pipe sensor, but setting the layers is bugged * Gas pipe sensor lights turn off when the device is unpowered * Renamed console * The gas pipe sensor is now a pipe. Redistributed components between it and its assembly * AtmosMonitors can now optionally monitor their internal pipe network instead of the surrounding atmosphere * Massive code clean up * Added delta states to handle pipe net updates, fixed entity deletion handling * Nav map blip data has been replaced with prototypes * Nav map blip fixes * Nav map colors are now set by the console component * Made the nav map more responsive to changes in focus * Updated nav map icons * Reverted unnecessary namespace changes * Code tidy up * Updated sprites and construction graph for gas pipe sensor * Updated localization files * Misc bug fixes * Added missing comment * Fixed issue with the circuit board for the monitor * Embellished the background of the console network entries * Updated console to account for PR #32273 * Removed gas pipe sensor * Fixing merge conflict * Update * Addressing reviews part 1 * Addressing review part 2 * Addressing reviews part 3 * Removed unnecessary references * Side panel values will be grayed out if there is no gas present in the pipe network * Declaring colors at the start of some files * Added a colored stripe to the side of the atmos network entries * Fixed an issue with pipe sensor blip coloration * Fixed delay that occurs when toggling gas sensors on/off
This commit is contained in:
@@ -31,19 +31,6 @@ public sealed partial class AtmosAlarmEntryContainer : BoxContainer
|
||||
[AtmosAlarmType.Danger] = "atmos-alerts-window-danger-state",
|
||||
};
|
||||
|
||||
private Dictionary<Gas, string> _gasShorthands = new Dictionary<Gas, string>()
|
||||
{
|
||||
[Gas.Ammonia] = "NH₃",
|
||||
[Gas.CarbonDioxide] = "CO₂",
|
||||
[Gas.Frezon] = "F",
|
||||
[Gas.Nitrogen] = "N₂",
|
||||
[Gas.NitrousOxide] = "N₂O",
|
||||
[Gas.Oxygen] = "O₂",
|
||||
[Gas.Plasma] = "P",
|
||||
[Gas.Tritium] = "T",
|
||||
[Gas.WaterVapor] = "H₂O",
|
||||
};
|
||||
|
||||
public AtmosAlarmEntryContainer(NetEntity uid, EntityCoordinates? coordinates)
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
@@ -162,12 +149,11 @@ public sealed partial class AtmosAlarmEntryContainer : BoxContainer
|
||||
foreach ((var gas, (var mol, var percent, var alert)) in keyValuePairs)
|
||||
{
|
||||
FixedPoint2 gasPercent = percent * 100f;
|
||||
|
||||
var gasShorthand = _gasShorthands.GetValueOrDefault(gas, "X");
|
||||
var gasAbbreviation = Atmospherics.GasAbbreviations.GetValueOrDefault(gas, Loc.GetString("gas-unknown-abbreviation"));
|
||||
|
||||
var gasLabel = new Label()
|
||||
{
|
||||
Text = Loc.GetString("atmos-alerts-window-other-gases-value", ("shorthand", gasShorthand), ("value", gasPercent)),
|
||||
Text = Loc.GetString("atmos-alerts-window-other-gases-value", ("shorthand", gasAbbreviation), ("value", gasPercent)),
|
||||
FontOverride = normalFont,
|
||||
FontColorOverride = GetAlarmStateColor(alert),
|
||||
HorizontalAlignment = HAlignment.Center,
|
||||
|
||||
Reference in New Issue
Block a user