diff --git a/Content.Client/Power/Generation/Teg/TegSystem.cs b/Content.Client/Power/Generation/Teg/TegSystem.cs index e1f0874e8a..92b5062b6d 100644 --- a/Content.Client/Power/Generation/Teg/TegSystem.cs +++ b/Content.Client/Power/Generation/Teg/TegSystem.cs @@ -1,5 +1,6 @@ using Content.Client.Examine; using Robust.Shared.Map; +using Robust.Shared.Prototypes; namespace Content.Client.Power.Generation.Teg; @@ -14,6 +15,9 @@ namespace Content.Client.Power.Generation.Teg; /// public sealed class TegSystem : EntitySystem { + [ValidatePrototypeId] + private const string ArrowPrototype = "TegCirculatorArrow"; + public override void Initialize() { SubscribeLocalEvent(CirculatorExamined); @@ -21,6 +25,6 @@ public sealed class TegSystem : EntitySystem private void CirculatorExamined(EntityUid uid, TegCirculatorComponent component, ClientExaminedEvent args) { - Spawn("TegCirculatorArrow", new EntityCoordinates(uid, 0, 0)); + Spawn(ArrowPrototype, new EntityCoordinates(uid, 0, 0)); } } diff --git a/Content.Server/Power/Generation/Teg/TegCirculatorComponent.cs b/Content.Server/Power/Generation/Teg/TegCirculatorComponent.cs index e2f7e59e35..636ccdd17a 100644 --- a/Content.Server/Power/Generation/Teg/TegCirculatorComponent.cs +++ b/Content.Server/Power/Generation/Teg/TegCirculatorComponent.cs @@ -14,30 +14,35 @@ public sealed class TegCirculatorComponent : Component /// /// The difference between the inlet and outlet pressure at the start of the previous tick. /// - [DataField("last_pressure_delta")] [ViewVariables(VVAccess.ReadWrite)] + [ViewVariables(VVAccess.ReadWrite)] + [DataField("lastPressureDelta")] public float LastPressureDelta; /// /// The amount of moles transferred by the circulator last tick. /// - [DataField("last_moles_transferred")] [ViewVariables(VVAccess.ReadWrite)] + [ViewVariables(VVAccess.ReadWrite)] + [DataField("lastMolesTransferred")] public float LastMolesTransferred; /// /// Minimum pressure delta between inlet and outlet for which the circulator animation speed is "fast". /// - [DataField("visual_speed_delta")] [ViewVariables(VVAccess.ReadWrite)] + [ViewVariables(VVAccess.ReadWrite)] + [DataField("visualSpeedDelta")] public float VisualSpeedDelta = 5 * Atmospherics.OneAtmosphere; /// /// Light color of this circulator when it's running at "slow" speed. /// - [DataField("light_color_slow")] [ViewVariables(VVAccess.ReadWrite)] - public Color LightColorSlow; + [ViewVariables(VVAccess.ReadWrite)] + [DataField("lightColorSlow")] + public Color LightColorSlow = Color.FromHex("#FF3300"); /// /// Light color of this circulator when it's running at "fast" speed. /// - [DataField("light_color_fast")] [ViewVariables(VVAccess.ReadWrite)] - public Color LightColorFast; + [ViewVariables(VVAccess.ReadWrite)] + [DataField("lightColorFast")] + public Color LightColorFast = Color.FromHex("#AA00FF"); } diff --git a/Content.Server/Power/Generation/Teg/TegGeneratorComponent.cs b/Content.Server/Power/Generation/Teg/TegGeneratorComponent.cs index 3bd1616ce3..13ccc50eae 100644 --- a/Content.Server/Power/Generation/Teg/TegGeneratorComponent.cs +++ b/Content.Server/Power/Generation/Teg/TegGeneratorComponent.cs @@ -15,55 +15,64 @@ public sealed class TegGeneratorComponent : Component /// /// A value of 0.9 means that 90% of energy transferred goes to electricity. /// - [ViewVariables(VVAccess.ReadWrite)] [DataField("thermal_efficiency")] + [ViewVariables(VVAccess.ReadWrite)] + [DataField("thermalEfficiency")] public float ThermalEfficiency = 0.65f; /// /// Simple factor that scales effective electricity generation. /// - [ViewVariables(VVAccess.ReadWrite)] [DataField("power_factor")] + [ViewVariables(VVAccess.ReadWrite)] + [DataField("powerFactor")] public float PowerFactor = 1; /// /// Amount of energy (Joules) generated by the TEG last atmos tick. /// - [ViewVariables(VVAccess.ReadWrite)] [DataField("last_generation")] + [ViewVariables(VVAccess.ReadWrite)] + [DataField("lastGeneration")] public float LastGeneration; /// /// The current target for TEG power generation. /// Drifts towards actual power draw of the network with . /// - [ViewVariables(VVAccess.ReadWrite)] [DataField("ramp_position")] + [ViewVariables(VVAccess.ReadWrite)] + [DataField("rampPosition")] public float RampPosition; /// /// Factor by which TEG power generation scales, both up and down. /// - [ViewVariables(VVAccess.ReadWrite)] [DataField("ramp_factor")] + [ViewVariables(VVAccess.ReadWrite)] + [DataField("rampFactor")] public float RampFactor = 1.05f; /// /// Minimum position for the ramp. Avoids TEG taking too long to start. /// - [ViewVariables(VVAccess.ReadWrite)] [DataField("ramp_threshold")] + [ViewVariables(VVAccess.ReadWrite)] + [DataField("rampMinimum")] public float RampMinimum = 5000; /// /// Power output value at which the sprite appearance and sound volume should cap out. /// - [ViewVariables(VVAccess.ReadWrite)] [DataField("max_visual_power")] + [ViewVariables(VVAccess.ReadWrite)] + [DataField("maxVisualPower")] public float MaxVisualPower = 200_000; /// /// Minimum ambient sound volume, when we're producing just barely any power at all. /// - [ViewVariables(VVAccess.ReadWrite)] [DataField("volume_min")] + [ViewVariables(VVAccess.ReadWrite)] + [DataField("volumeMin")] public float VolumeMin = -9; /// /// Maximum ambient sound volume, when we're producing >= power. /// - [ViewVariables(VVAccess.ReadWrite)] [DataField("volume_max")] + [ViewVariables(VVAccess.ReadWrite)] + [DataField("volumeMax")] public float VolumeMax = -4; } diff --git a/Content.Server/SensorMonitoring/SensorMonitoringConsoleComponent.cs b/Content.Server/SensorMonitoring/SensorMonitoringConsoleComponent.cs index a13eb34b91..d73421ebf1 100644 --- a/Content.Server/SensorMonitoring/SensorMonitoringConsoleComponent.cs +++ b/Content.Server/SensorMonitoring/SensorMonitoringConsoleComponent.cs @@ -16,7 +16,7 @@ public sealed class SensorMonitoringConsoleComponent : Component /// If enabled, additional data streams are shown intended to only be visible for debugging. /// [ViewVariables(VVAccess.ReadWrite)] - [DataField("debug_streams")] + [DataField("debugStreams")] public bool DebugStreams = false; [ViewVariables(VVAccess.ReadWrite)] diff --git a/Resources/Maps/Test/test_teg.yml b/Resources/Maps/Test/test_teg.yml index 11dd0de1c6..d592c40567 100644 --- a/Resources/Maps/Test/test_teg.yml +++ b/Resources/Maps/Test/test_teg.yml @@ -1434,7 +1434,7 @@ entities: pos: -1.5,5.5 parent: 2 type: Transform - - debug_streams: True + - debugStreams: True type: SensorMonitoringConsole - ShutdownSubscribers: - 3 diff --git a/Resources/Prototypes/Entities/Structures/Power/Generation/teg.yml b/Resources/Prototypes/Entities/Structures/Power/Generation/teg.yml index 6fd3117112..3c58c9f148 100644 --- a/Resources/Prototypes/Entities/Structures/Power/Generation/teg.yml +++ b/Resources/Prototypes/Entities/Structures/Power/Generation/teg.yml @@ -166,8 +166,6 @@ - type: AtmosUnsafeUnanchor - type: TegCirculator - light_color_fast: '#AA00FF' - light_color_slow: '#FF3300' - # Spawned by the client-side circulator examine code to indicate the inlet/outlet direction. type: entity