mech nitrogen filtering 2 (#19868)
* target oxygen logic * filter out nitrogen when low on oxygen * vvrw and datafield for everything * :trollface: * bruh does work * tagless chicken * move into atmos, make it not depend on mech * update mech prototype --------- Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
@@ -6,7 +6,8 @@ namespace Content.Server.Mech.Components;
|
||||
public sealed partial class MechAirComponent : Component
|
||||
{
|
||||
//TODO: this doesn't support a tank implant for mechs or anything like that
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||
public GasMixture Air = new (GasMixVolume);
|
||||
|
||||
public const float GasMixVolume = 70f;
|
||||
}
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
using Content.Shared.Atmos;
|
||||
|
||||
namespace Content.Server.Mech.Components;
|
||||
|
||||
/// <summary>
|
||||
/// This is basically a reverse scrubber for MechAir
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed partial class MechAirFilterComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Gases that will be filtered out of internal air
|
||||
/// </summary>
|
||||
[DataField("gases", required: true)]
|
||||
public HashSet<Gas> Gases = new();
|
||||
|
||||
/// <summary>
|
||||
/// Target volume to transfer every second.
|
||||
/// </summary>
|
||||
[DataField("transferRate")]
|
||||
public float TransferRate = MechAirComponent.GasMixVolume * 0.1f;
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
using Content.Shared.Atmos;
|
||||
|
||||
namespace Content.Server.Mech.Components;
|
||||
|
||||
/// <summary>
|
||||
/// This is basically a siphon vent for mech but not using pump vent component because MechAir bad
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed partial class MechAirIntakeComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Target pressure change for a single atmos tick
|
||||
/// </summary>
|
||||
[DataField("targetPressureChange")]
|
||||
public float TargetPressureChange = 5f;
|
||||
|
||||
/// <summary>
|
||||
/// How strong the intake pump is, it will be able to replenish air from lower pressure areas.
|
||||
/// </summary>
|
||||
[DataField("pumpPower")]
|
||||
public float PumpPower = 2f;
|
||||
|
||||
/// <summary>
|
||||
/// Pressure to intake gases up to, maintains MechAir pressure.
|
||||
/// </summary>
|
||||
[DataField("pressure")]
|
||||
public float Pressure = Atmospherics.OneAtmosphere;
|
||||
}
|
||||
Reference in New Issue
Block a user