Files
wwdpublic/Content.Server/Atmos/Portable/PortableScrubberComponent.cs
Spatison 7c4bf63a33 [Feature] TG Gases / TG Газы (#147)
* 237.2.0

* feat: /tg/ gases

* Revert "237.2.0"

This reverts commit 08ecd6b145.

* fix: sound

* Revert "237.2.0"

This reverts commit 08ecd6b145.

* tweak: AI rewie

* fix: tupo

* Revert "237.2.0"

This reverts commit 08ecd6b145.

* fix: tupo
2024-12-17 14:08:35 +07:00

101 lines
3.3 KiB
C#

using Content.Shared.Atmos;
using Content.Shared.Construction.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.Atmos.Portable
{
[RegisterComponent]
public sealed partial class PortableScrubberComponent : Component
{
/// <summary>
/// The air inside this machine.
/// </summary>
[DataField("gasMixture"), ViewVariables(VVAccess.ReadWrite)]
public GasMixture Air { get; private set; } = new();
[DataField("port"), ViewVariables(VVAccess.ReadWrite)]
public string PortName { get; set; } = "port";
/// <summary>
/// Which gases this machine will scrub out.
/// Unlike fixed scrubbers controlled by an air alarm,
/// this can't be changed in game.
/// </summary>
[DataField("filterGases")]
public HashSet<Gas> FilterGases = new()
{
Gas.CarbonDioxide,
Gas.Plasma,
Gas.Tritium,
Gas.WaterVapor,
Gas.Ammonia,
Gas.NitrousOxide,
Gas.Frezon,
Gas.BZ,
Gas.Pluoxium,
Gas.Hydrogen,
Gas.Nitrium,
Gas.Healium,
Gas.HyperNoblium,
Gas.ProtoNitrate,
Gas.Zauker,
Gas.Halon,
Gas.Helium,
Gas.AntiNoblium
};
[ViewVariables(VVAccess.ReadWrite)]
public bool Enabled = true;
/// <summary>
/// Maximum internal pressure before it refuses to take more.
/// </summary>
[DataField]
public float MaxPressure = 2500;
/// <summary>
/// The base amount of maximum internal pressure
/// </summary>
[DataField]
public float BaseMaxPressure = 2500;
/// <summary>
/// The machine part that modifies the maximum internal pressure
/// </summary>
[DataField(customTypeSerializer: typeof(PrototypeIdSerializer<MachinePartPrototype>))]
public string MachinePartMaxPressure = "MatterBin";
/// <summary>
/// How much the <see cref="MachinePartMaxPressure"/> will affect the pressure.
/// The value will be multiplied by this amount for each increasing part tier.
/// </summary>
[DataField]
public float PartRatingMaxPressureModifier = 1.5f;
/// <summary>
/// The speed at which gas is scrubbed from the environment.
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
public float TransferRate = 800;
/// <summary>
/// The base speed at which gas is scrubbed from the environment.
/// </summary>
[DataField]
public float BaseTransferRate = 800;
/// <summary>
/// The machine part which modifies the speed of <see cref="TransferRate"/>
/// </summary>
[DataField(customTypeSerializer: typeof(PrototypeIdSerializer<MachinePartPrototype>))]
public string MachinePartTransferRate = "Manipulator";
/// <summary>
/// How much the <see cref="MachinePartTransferRate"/> will modify the rate.
/// The value will be multiplied by this amount for each increasing part tier.
/// </summary>
[DataField]
public float PartRatingTransferRateModifier = 1.4f;
}
}