Power Monitoring Console (#7849)

This commit is contained in:
20kdc
2022-05-04 18:59:40 +01:00
committed by GitHub
parent 3d606f4316
commit 70cd3d18ca
9 changed files with 299 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
#nullable enable
using System;
using Robust.Shared.GameObjects;
using Robust.Shared.Maths;
using Robust.Shared.Serialization;
namespace Content.Shared.Power;
[Serializable, NetSerializable]
public sealed class PowerMonitoringConsoleBoundInterfaceState : BoundUserInterfaceState
{
public double TotalSources;
public double TotalLoads;
public PowerMonitoringConsoleEntry[] Sources;
public PowerMonitoringConsoleEntry[] Loads;
public PowerMonitoringConsoleBoundInterfaceState(double totalSources, double totalLoads, PowerMonitoringConsoleEntry[] sources, PowerMonitoringConsoleEntry[] loads)
{
TotalSources = totalSources;
TotalLoads = totalLoads;
Sources = sources;
Loads = loads;
}
}
[Serializable, NetSerializable]
public sealed class PowerMonitoringConsoleEntry
{
public string NameLocalized;
public string IconEntityPrototypeId;
public double Size;
public bool IsBattery;
public PowerMonitoringConsoleEntry(string nl, string ipi, double size, bool isBattery)
{
NameLocalized = nl;
IconEntityPrototypeId = ipi;
Size = size;
IsBattery = isBattery;
}
}
[Serializable, NetSerializable]
public enum PowerMonitoringConsoleUiKey
{
Key
}