Merge pull request #15850 from Putnam3145/bastion-bourbon-shitcode

fixes the worst use of a for loop ever
This commit is contained in:
Lin
2022-09-17 23:13:41 +00:00
committed by GitHub
@@ -1686,14 +1686,14 @@ All effects don't start immediately, but rather get worse over time; the rate is
var/heal_points = 10 var/heal_points = 10
if(L.health <= 0) if(L.health <= 0)
heal_points = 20 //heal more if we're in softcrit 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 heal_points = min(volume, heal_points)
L.adjustBruteLoss(-1) L.adjustBruteLoss(-heal_points)
L.adjustFireLoss(-1) L.adjustFireLoss(-heal_points)
L.adjustToxLoss(-1) L.adjustToxLoss(-heal_points)
L.adjustOxyLoss(-1) L.adjustOxyLoss(-heal_points)
L.adjustStaminaLoss(-1) L.adjustStaminaLoss(-heal_points)
L.visible_message("<span class='warning'>[L] shivers with renewed vigor!</span>", "<span class='notice'>One taste of [lowertext(name)] fills you with energy!</span>") L.visible_message("<span class='warning'>[L] shivers with renewed vigor!</span>", "<span class='notice'>One taste of [lowertext(name)] fills you with energy!</span>")
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("<span class='danger'>[L] lurches to [L.p_their()] feet!</span>", "<span class='boldnotice'>Up and at 'em, kid.</span>") L.visible_message("<span class='danger'>[L] lurches to [L.p_their()] feet!</span>", "<span class='boldnotice'>Up and at 'em, kid.</span>")
/datum/reagent/consumable/ethanol/bastion_bourbon/on_mob_life(mob/living/L) /datum/reagent/consumable/ethanol/bastion_bourbon/on_mob_life(mob/living/L)