2022-05-12 22:35:13 -07:00
|
|
|
using Content.Shared.Atmos;
|
2022-02-07 05:26:10 +03:00
|
|
|
|
|
|
|
|
namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Spawn a random gas with random temperature when artifact activated.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[RegisterComponent]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class GasArtifactComponent : Component
|
2022-02-07 05:26:10 +03:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gas that will be spawned when artifact activated.
|
|
|
|
|
/// If null it will be picked on startup from <see cref="PossibleGases"/>.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
[DataField("spawnGas")]
|
|
|
|
|
public Gas? SpawnGas;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// List of possible activation gases to pick on startup.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("possibleGas")]
|
2022-11-06 18:05:44 -05:00
|
|
|
public List<Gas> PossibleGases = new()
|
2022-02-07 05:26:10 +03:00
|
|
|
{
|
|
|
|
|
Gas.Oxygen,
|
|
|
|
|
Gas.Plasma,
|
|
|
|
|
Gas.Nitrogen,
|
|
|
|
|
Gas.CarbonDioxide,
|
2022-06-17 03:00:23 -04:00
|
|
|
Gas.Tritium,
|
2023-12-20 21:19:50 -07:00
|
|
|
Gas.Ammonia,
|
2022-07-27 00:46:24 -04:00
|
|
|
Gas.NitrousOxide,
|
2022-07-27 02:55:28 -07:00
|
|
|
Gas.Frezon
|
2022-02-07 05:26:10 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Temperature of spawned gas. If null it will be picked on startup from range from
|
|
|
|
|
/// <see cref="MinRandomTemperature"/> to <see cref="MaxRandomTemperature"/>.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
[DataField("spawnTemperature")]
|
|
|
|
|
public float? SpawnTemperature;
|
|
|
|
|
|
|
|
|
|
[DataField("minRandomTemp")]
|
|
|
|
|
public float MinRandomTemperature = 100;
|
|
|
|
|
|
|
|
|
|
[DataField("maxRandomTemp")]
|
|
|
|
|
public float MaxRandomTemperature = 400;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Max allowed external atmospheric pressure.
|
|
|
|
|
/// Artifact will stop spawn gas.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
[DataField("maxExternalPressure")]
|
|
|
|
|
public float MaxExternalPressure = Atmospherics.GasMinerDefaultMaxExternalPressure;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Moles of gas to spawn each time when artifact activated.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
[DataField("spawnAmount")]
|
|
|
|
|
public float SpawnAmount = Atmospherics.MolesCellStandard * 3;
|
|
|
|
|
}
|