Lung tweaks (#6634)
This commit is contained in:
@@ -11,7 +11,7 @@ using Robust.Shared.ViewVariables;
|
||||
namespace Content.Server.Body.Components;
|
||||
|
||||
[RegisterComponent, Friend(typeof(LungSystem))]
|
||||
public class LungComponent : Component
|
||||
public sealed class LungComponent : Component
|
||||
{
|
||||
[DataField("air")]
|
||||
public GasMixture Air { get; set; } = new()
|
||||
@@ -20,9 +20,6 @@ public class LungComponent : Component
|
||||
Temperature = Atmospherics.NormalBodyTemperature
|
||||
};
|
||||
|
||||
[DataField("validReagentGases", required: true)]
|
||||
public HashSet<Gas> ValidGases = default!;
|
||||
|
||||
[ViewVariables]
|
||||
public Solution LungSolution = default!;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ using Robust.Shared.ViewVariables;
|
||||
namespace Content.Server.Body.Components
|
||||
{
|
||||
[RegisterComponent, Friend(typeof(RespiratorSystem))]
|
||||
public class RespiratorComponent : Component
|
||||
public sealed class RespiratorComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Saturation level. Reduced by CycleDelay each tick.
|
||||
@@ -28,7 +28,7 @@ namespace Content.Server.Body.Components
|
||||
public float MaxSaturation = 5.0f;
|
||||
|
||||
[DataField("minSaturation")]
|
||||
public float MinSaturation = -5.0f;
|
||||
public float MinSaturation = -2.0f;
|
||||
|
||||
// TODO HYPEROXIA?
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ public class LungSystem : EntitySystem
|
||||
|
||||
public void GasToReagent(EntityUid uid, LungComponent lung)
|
||||
{
|
||||
foreach (var gas in lung.ValidGases)
|
||||
foreach (var gas in Enum.GetValues<Gas>())
|
||||
{
|
||||
var i = (int) gas;
|
||||
var moles = lung.Air.Moles[i];
|
||||
|
||||
Reference in New Issue
Block a user