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; namespace Content.Server.Body.Components;
[RegisterComponent, Friend(typeof(LungSystem))] [RegisterComponent, Friend(typeof(LungSystem))]
public class LungComponent : Component public sealed class LungComponent : Component
{ {
[DataField("air")] [DataField("air")]
public GasMixture Air { get; set; } = new() public GasMixture Air { get; set; } = new()
@@ -20,9 +20,6 @@ public class LungComponent : Component
Temperature = Atmospherics.NormalBodyTemperature Temperature = Atmospherics.NormalBodyTemperature
}; };
[DataField("validReagentGases", required: true)]
public HashSet<Gas> ValidGases = default!;
[ViewVariables] [ViewVariables]
public Solution LungSolution = default!; public Solution LungSolution = default!;
} }

View File

@@ -9,7 +9,7 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.Body.Components namespace Content.Server.Body.Components
{ {
[RegisterComponent, Friend(typeof(RespiratorSystem))] [RegisterComponent, Friend(typeof(RespiratorSystem))]
public class RespiratorComponent : Component public sealed class RespiratorComponent : Component
{ {
/// <summary> /// <summary>
/// Saturation level. Reduced by CycleDelay each tick. /// Saturation level. Reduced by CycleDelay each tick.
@@ -28,7 +28,7 @@ namespace Content.Server.Body.Components
public float MaxSaturation = 5.0f; public float MaxSaturation = 5.0f;
[DataField("minSaturation")] [DataField("minSaturation")]
public float MinSaturation = -5.0f; public float MinSaturation = -2.0f;
// TODO HYPEROXIA? // TODO HYPEROXIA?

View File

@@ -54,7 +54,7 @@ public class LungSystem : EntitySystem
public void GasToReagent(EntityUid uid, LungComponent lung) 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 i = (int) gas;
var moles = lung.Air.Moles[i]; var moles = lung.Air.Moles[i];

View File

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

View File

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

View File

@@ -223,13 +223,6 @@
normal: spacecat normal: spacecat
crit: spacecat_dead crit: spacecat_dead
dead: 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 - type: entity
name: caracal cat name: caracal cat

View File

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

View File

@@ -101,6 +101,11 @@
Gas: Gas:
effects: effects:
- !type:HealthChange - !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 scaleByQuantity: true
ignoreResistances: true ignoreResistances: true
damage: damage: