From 07fbf53b474e003fda4e024590f20be2c310dc2d Mon Sep 17 00:00:00 2001 From: Erki Date: Thu, 25 Jul 2019 01:15:03 +0300 Subject: [PATCH] Thou shalt not act recursively. (#6640) --- code/controllers/subsystems/chemistry.dm | 1 - code/modules/reagents/Chemistry-Holder.dm | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/code/controllers/subsystems/chemistry.dm b/code/controllers/subsystems/chemistry.dm index 9d81c6f9ab3..a59e6709e29 100644 --- a/code/controllers/subsystems/chemistry.dm +++ b/code/controllers/subsystems/chemistry.dm @@ -113,7 +113,6 @@ var/datum/controller/subsystem/chemistry/SSchemistry if (holder in active_holders) return - //Process once, right away. If we still need to continue then add to the active_holders list and continue later if (holder.process_reactions()) active_holders += holder diff --git a/code/modules/reagents/Chemistry-Holder.dm b/code/modules/reagents/Chemistry-Holder.dm index 1ac67c363c9..8b45b6580f0 100644 --- a/code/modules/reagents/Chemistry-Holder.dm +++ b/code/modules/reagents/Chemistry-Holder.dm @@ -123,8 +123,11 @@ for(var/datum/chemical_reaction/C in effect_reactions) C.post_reaction(src) - update_holder(equalize_temperature()) //If the thermal energy of the reagents is different after a reaction, then run process_reactions again. - return reaction_occured + var/temps_updated = equalize_temperature() + + update_holder(reactions = reaction_occured) + + return temps_updated /* Holder-to-chemical */