Fixing water and foam wasted on mobs that do not need to be extinguished (#6622)

This commit is contained in:
Mykhailo Bykhovtsev
2019-06-25 13:32:30 -07:00
committed by Werner
parent 1f2195f16a
commit 37f29cc13c
3 changed files with 47 additions and 4 deletions

View File

@@ -236,8 +236,9 @@
. = ..()
if(istype(M) && isliving(M))
var/mob/living/L = M
L.ExtinguishMob(L.on_fire ? amount : amount*0.5)
remove_self(amount)
var/needed = min(L.fire_stacks, amount)
L.ExtinguishMob(needed)
remove_self(needed)
if(istype(M) && !istype(M, /mob/abstract))
M.color = initial(M.color)

View File

@@ -316,8 +316,9 @@
/datum/reagent/toxin/fertilizer/monoammoniumphosphate/touch_mob(var/mob/living/L, var/amount)
. = ..()
if(istype(L))
L.ExtinguishMob(L.on_fire ? amount*3 : amount*1.5)
remove_self(amount)
var/needed = min(L.fire_stacks, amount)
L.ExtinguishMob(3* needed) // Foam is 3 times more efficient at extinguishing
remove_self(needed)
/datum/reagent/toxin/fertilizer/monoammoniumphosphate/affect_touch(var/mob/living/carbon/slime/S, var/alien, var/removed)
if(istype(S))