Lung tweaks (#6634)

This commit is contained in:
mirrorcult
2022-02-10 14:58:41 -07:00
committed by GitHub
parent a8f3e56bc4
commit 2738b46362
8 changed files with 10 additions and 25 deletions

View File

@@ -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!;
}

View File

@@ -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?

View File

@@ -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];

View File

@@ -100,11 +100,6 @@
size: 1
compatibility: Biological
- type: Lung
validReagentGases:
- Oxygen
- Plasma
- Tritium
- CarbonDioxide
- type: Metabolizer
removeEmpty: true
solutionOnBody: false

View File

@@ -82,11 +82,6 @@
size: 1
compatibility: Biological
- type: Lung
validReagentGases:
- Oxygen
- Plasma
- Tritium
- CarbonDioxide
- type: Metabolizer
removeEmpty: true
solutionOnBody: false

View File

@@ -223,13 +223,6 @@
normal: spacecat
crit: spacecat_dead
dead: spacecat_dead
- type: Respirator #Space kitty should be immune to Asphyxiation. Taken from xenos.yml
damage:
types:
Asphyxiation: 1
damageRecovery:
types:
Asphyxiation: -1
- type: entity
name: caracal cat

View File

@@ -14,7 +14,7 @@
- type: Respirator
damage:
types:
Asphyxiation: 3
Asphyxiation: 1.5
damageRecovery:
types:
Asphyxiation: -1.5

View File

@@ -101,6 +101,11 @@
Gas:
effects:
- !type:HealthChange
conditions:
# Don't want people to get toxin damage from the gas they just
# exhaled, right?
- !type:ReagentThreshold
min: 0.5
scaleByQuantity: true
ignoreResistances: true
damage: