From 3989e20c296a7c0daf4d185b3c683c8d51faaaf9 Mon Sep 17 00:00:00 2001 From: DrSmugleaf Date: Sat, 17 Oct 2020 13:21:26 +0200 Subject: [PATCH] Fix gasping for real this time I promise (#2285) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix gasping I promise for real this time * Remove comments. Co-authored-by: VĂ­ctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com> --- .../Components/Body/Behavior/LungBehaviorComponent.cs | 1 + .../Components/Metabolism/MetabolismComponent.cs | 4 +++- Resources/Prototypes/Entities/Mobs/Species/human.yml | 6 +++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Content.Server/GameObjects/Components/Body/Behavior/LungBehaviorComponent.cs b/Content.Server/GameObjects/Components/Body/Behavior/LungBehaviorComponent.cs index 019ed6a4dc..78375835a4 100644 --- a/Content.Server/GameObjects/Components/Body/Behavior/LungBehaviorComponent.cs +++ b/Content.Server/GameObjects/Components/Body/Behavior/LungBehaviorComponent.cs @@ -159,6 +159,7 @@ namespace Content.Server.GameObjects.Components.Body.Behavior { var ratio = Atmospherics.BreathPercentage * frameTime; + Transfer(from, Air, ratio); ToBloodstream(Air); } diff --git a/Content.Server/GameObjects/Components/Metabolism/MetabolismComponent.cs b/Content.Server/GameObjects/Components/Metabolism/MetabolismComponent.cs index 14195c346c..a93e3dec88 100644 --- a/Content.Server/GameObjects/Components/Metabolism/MetabolismComponent.cs +++ b/Content.Server/GameObjects/Components/Metabolism/MetabolismComponent.cs @@ -20,6 +20,7 @@ using Robust.Shared.GameObjects.ComponentDependencies; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.IoC; using Robust.Shared.Localization; +using Robust.Shared.Log; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; using Robust.Shared.ViewVariables; @@ -228,6 +229,7 @@ namespace Content.Server.GameObjects.Components.Metabolism DeficitGases[gas] = deficit; + used += (amountNeeded - deficit) / amountNeeded; } @@ -417,7 +419,7 @@ namespace Content.Server.GameObjects.Components.Metabolism } else { - var overflowThreshold = needed * 1.5f; + var overflowThreshold = needed * 5f; amount = molesInBlood > overflowThreshold ? molesInBlood - overflowThreshold diff --git a/Resources/Prototypes/Entities/Mobs/Species/human.yml b/Resources/Prototypes/Entities/Mobs/Species/human.yml index b907ad4022..76071b389f 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/human.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/human.yml @@ -156,10 +156,10 @@ normalBodyTemperature: 310.15 thermalRegulationTemperatureThreshold: 25 needsGases: - Oxygen: 0.00332569564 + Oxygen: 0.00060763888 producesGases: - Oxygen: 0.00249427173 - CarbonDioxide: 0.00083142391 + Oxygen: 0.00045572916 + CarbonDioxide: 0.00015190972 - type: MobStateManager - type: HeatResistance - type: Appearance