More xeno artifacts effects (#6282)
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
using Content.Shared.Atmos;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Spawn a random gas with random temperature when artifact activated.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public class GasArtifactComponent : Component
|
||||
{
|
||||
public override string Name => "GasArtifact";
|
||||
|
||||
/// <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")]
|
||||
public Gas[] PossibleGases =
|
||||
{
|
||||
Gas.Oxygen,
|
||||
Gas.Plasma,
|
||||
Gas.Nitrogen,
|
||||
Gas.CarbonDioxide,
|
||||
Gas.Tritium
|
||||
};
|
||||
|
||||
/// <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;
|
||||
}
|
||||
Reference in New Issue
Block a user