mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 21:48:58 +03:00
# Description <!-- Explain this PR in as much detail as applicable Some example prompts to consider: How might this affect the game? The codebase? What might be some alternatives to this? How/Who does this benefit/hurt [the game/codebase]? --> Ports https://github.com/space-wizards/space-station-14/pull/32294 Ports https://github.com/ss14-harmony/ss14-harmony/pull/310 (and everything needed for it to function) Early-merges https://github.com/space-wizards/space-station-14/pull/34302 Adds the ability for multiple central command maps that get randomly selected. Tested and works. --- # Changelog <!-- You can add an author after the `🆑` to change the name that appears in the changelog (ex: `🆑 Death`) Leaving it blank will default to your GitHub display name This includes all available types for the changelog --> 🆑 Several contributors - add: Added a new central command map that is randomly picked alongside the old one (thank you to Spanky from Harmony) - add: Added Advanced SMES for mappers. - add: Added the atmospheric network monitor for seeing what the temperature, moles, and pressure is on every pipe everywhere through a computer. - add: Nukie med bundle now contains a compact defibrillator. - add: Ported a better mapping editor. - add: Added the throngler plushie. - remove: Removed the Throngler as a possible loot spawn for gamble crates. --------- Signed-off-by: sleepyyapril <123355664+sleepyyapril@users.noreply.github.com> (cherry picked from commit 9272f65b64392f66a7cd4fd7c84bb152dc93b65a)
86 lines
3.2 KiB
C#
86 lines
3.2 KiB
C#
using Content.Shared.Atmos;
|
|
using Content.Shared.Atmos.Monitor;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary;
|
|
|
|
namespace Content.Server.Atmos.Monitor.Components;
|
|
|
|
[RegisterComponent]
|
|
public sealed partial class AtmosMonitorComponent : Component
|
|
{
|
|
// Whether this monitor can send alarms,
|
|
// or recieve atmos command events.
|
|
//
|
|
// Useful for wires; i.e., pulsing a monitor wire
|
|
// will make it send an alert, and cutting
|
|
// it will make it so that alerts are no longer
|
|
// sent/receieved.
|
|
//
|
|
// Note that this cancels every single network
|
|
// event, including ones that may not be
|
|
// related to atmos monitor events.
|
|
[DataField("netEnabled")]
|
|
public bool NetEnabled = true;
|
|
|
|
[DataField("temperatureThresholdId", customTypeSerializer: (typeof(PrototypeIdSerializer<AtmosAlarmThresholdPrototype>)))]
|
|
public string? TemperatureThresholdId;
|
|
|
|
[DataField("temperatureThreshold")]
|
|
public AtmosAlarmThreshold? TemperatureThreshold;
|
|
|
|
[DataField("pressureThresholdId", customTypeSerializer: (typeof(PrototypeIdSerializer<AtmosAlarmThresholdPrototype>)))]
|
|
public string? PressureThresholdId;
|
|
|
|
[DataField("pressureThreshold")]
|
|
public AtmosAlarmThreshold? PressureThreshold;
|
|
|
|
// monitor fire - much different from temperature
|
|
// since there's events for fire, setting this to true
|
|
// will make the atmos monitor act like a smoke detector,
|
|
// immediately signalling danger if there's a fire
|
|
[DataField("monitorFire")]
|
|
public bool MonitorFire = false;
|
|
|
|
[DataField("gasThresholdPrototypes",
|
|
customTypeSerializer:typeof(PrototypeIdValueDictionarySerializer<Gas, AtmosAlarmThresholdPrototype>))]
|
|
public Dictionary<Gas, string>? GasThresholdPrototypes;
|
|
|
|
[DataField("gasThresholds")]
|
|
public Dictionary<Gas, AtmosAlarmThreshold>? GasThresholds;
|
|
|
|
/// <summary>
|
|
/// Stores a reference to the gas on the tile this entity is on (or the pipe network it monitors; see <see cref="MonitorsPipeNet"/>).
|
|
/// </summary>
|
|
[ViewVariables]
|
|
public GasMixture? TileGas;
|
|
|
|
// Stores the last alarm state of this alarm.
|
|
[DataField("lastAlarmState")]
|
|
public AtmosAlarmType LastAlarmState = AtmosAlarmType.Normal;
|
|
|
|
[DataField("trippedThresholds")]
|
|
public HashSet<AtmosMonitorThresholdType> TrippedThresholds = new();
|
|
|
|
/// <summary>
|
|
/// Registered devices in this atmos monitor. Alerts will be sent directly
|
|
/// to these devices.
|
|
/// </summary>
|
|
[DataField("registeredDevices")]
|
|
public HashSet<string> RegisteredDevices = new();
|
|
|
|
/// <summary>
|
|
/// Specifies whether this device monitors its own internal pipe network rather than the surrounding atmosphere.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// If 'true', the entity will require a NodeContainerComponent with one or more PipeNodes to function.
|
|
/// </remarks>
|
|
[DataField]
|
|
public bool MonitorsPipeNet = false;
|
|
|
|
/// <summary>
|
|
/// Specifies the name of the pipe node that this device is monitoring.
|
|
/// </summary>
|
|
[DataField]
|
|
public string NodeNameMonitoredPipe = "monitored";
|
|
}
|