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];
|
||||
|
||||
@@ -100,11 +100,6 @@
|
||||
size: 1
|
||||
compatibility: Biological
|
||||
- type: Lung
|
||||
validReagentGases:
|
||||
- Oxygen
|
||||
- Plasma
|
||||
- Tritium
|
||||
- CarbonDioxide
|
||||
- type: Metabolizer
|
||||
removeEmpty: true
|
||||
solutionOnBody: false
|
||||
|
||||
@@ -82,11 +82,6 @@
|
||||
size: 1
|
||||
compatibility: Biological
|
||||
- type: Lung
|
||||
validReagentGases:
|
||||
- Oxygen
|
||||
- Plasma
|
||||
- Tritium
|
||||
- CarbonDioxide
|
||||
- type: Metabolizer
|
||||
removeEmpty: true
|
||||
solutionOnBody: false
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
- type: Respirator
|
||||
damage:
|
||||
types:
|
||||
Asphyxiation: 3
|
||||
Asphyxiation: 1.5
|
||||
damageRecovery:
|
||||
types:
|
||||
Asphyxiation: -1.5
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user