From e1cfa9208012f40f2183b0a3db5f7171e62e5f77 Mon Sep 17 00:00:00 2001 From: Putnam3145 Date: Tue, 13 Sep 2022 23:19:12 -0700 Subject: [PATCH] fixes the worst use of a for loop ever --- .../chemistry/reagents/alcohol_reagents.dm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm index 04dc8a0d26..948586046e 100644 --- a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm @@ -1686,14 +1686,14 @@ All effects don't start immediately, but rather get worse over time; the rate is var/heal_points = 10 if(L.health <= 0) heal_points = 20 //heal more if we're in softcrit - for(var/i in 1 to min(volume, heal_points)) //only heals 1 point of damage per unit on add, for balance reasons - L.adjustBruteLoss(-1) - L.adjustFireLoss(-1) - L.adjustToxLoss(-1) - L.adjustOxyLoss(-1) - L.adjustStaminaLoss(-1) + heal_points = min(volume, heal_points) + L.adjustBruteLoss(-heal_points) + L.adjustFireLoss(-heal_points) + L.adjustToxLoss(-heal_points) + L.adjustOxyLoss(-heal_points) + L.adjustStaminaLoss(-heal_points) L.visible_message("[L] shivers with renewed vigor!", "One taste of [lowertext(name)] fills you with energy!") - if(!L.stat && heal_points == 20) //brought us out of softcrit + if(!L.stat && L.health > 0) //brought us out of softcrit L.visible_message("[L] lurches to [L.p_their()] feet!", "Up and at 'em, kid.") /datum/reagent/consumable/ethanol/bastion_bourbon/on_mob_life(mob/living/L)