2022-01-22 15:55:11 +03:00
|
|
|
using Content.Shared.Atmos;
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.Xenoarchaeology.XenoArtifacts.Triggers.Components;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Activates artifact when it surrounded by certain gas.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[RegisterComponent]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class ArtifactGasTriggerComponent : Component
|
2022-01-22 15:55:11 +03:00
|
|
|
{
|
|
|
|
|
/// <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-01-22 15:55:11 +03:00
|
|
|
{
|
|
|
|
|
Gas.Oxygen,
|
|
|
|
|
Gas.Plasma,
|
|
|
|
|
Gas.Nitrogen,
|
2022-06-17 03:00:23 -04:00
|
|
|
Gas.CarbonDioxide,
|
2023-12-20 21:19:50 -07:00
|
|
|
Gas.Ammonia,
|
2023-02-13 08:30:10 -05:00
|
|
|
Gas.NitrousOxide
|
2022-01-22 15:55:11 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gas id that will activate artifact.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("gas")]
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public Gas? ActivationGas;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// How many moles of gas should be present in room to activate artifact.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("moles")]
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public float ActivationMoles = Atmospherics.MolesCellStandard * 0.1f;
|
|
|
|
|
}
|