From 5f61b40feab0c6ea7128d374ff8f967b4110670c Mon Sep 17 00:00:00 2001 From: AbsFree Date: Tue, 17 Dec 2024 10:01:24 +0100 Subject: [PATCH] added check for when we ran out of fuel --- .../code/modules/atmospherics/gasmixtures/reactions.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GainStation13/code/modules/atmospherics/gasmixtures/reactions.dm b/GainStation13/code/modules/atmospherics/gasmixtures/reactions.dm index 4f19363da1..1abd8e77ee 100644 --- a/GainStation13/code/modules/atmospherics/gasmixtures/reactions.dm +++ b/GainStation13/code/modules/atmospherics/gasmixtures/reactions.dm @@ -12,6 +12,8 @@ /datum/gas_reaction/lipoifium_formation/react(datum/gas_mixture/air) // TODO: make the reaction exothermic, and make it more efficient at lower temperatures + if (air.get_moles(GAS_BZ) < 15 || air.get_moles(GAS_TRITIUM) < 15) + return NO_REACTION var/temperature = air.return_temperature() var/reaction_efficiency = 0 if (temperature <= 5) @@ -21,7 +23,7 @@ else reaction_efficiency = -((temperature - 5) / 95) + 1 // will equal 1 at 5 kelvin, and will linearly fall until 0 at 100k - var/energy_released = reaction_efficiency*FIRE_CARBON_ENERGY_RELEASED + var/energy_released = reaction_efficiency * FIRE_CARBON_ENERGY_RELEASED air.adjust_moles(GAS_FAT, reaction_efficiency) air.adjust_moles(GAS_TRITIUM, -reaction_efficiency / 2) air.adjust_moles(GAS_BZ, -reaction_efficiency / 2)