Adds var back which dissalows double bursting (#19814)

This commit is contained in:
Farie82
2022-12-01 01:39:16 -06:00
committed by GitHub
parent 0d14b178c3
commit d05bf18f84
@@ -164,6 +164,7 @@
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
gold_core_spawnable = NO_SPAWN
var/bursted = FALSE
/mob/living/simple_animal/mouse/blobinfected/Initialize(mapload)
. = ..()
@@ -176,10 +177,13 @@
/mob/living/simple_animal/mouse/blobinfected/death(gibbed)
. = ..(gibbed)
if(.) // Avoids a double burst due to the gib call in burst
if(.) // Only burst if they actually died
burst(gibbed)
/mob/living/simple_animal/mouse/blobinfected/proc/burst(gibbed)
if(bursted)
return // Avoids double bursting in some situations
bursted = TRUE
var/turf/T = get_turf(src)
if(!is_station_level(T.z) || isspaceturf(T))
to_chat(src, "<span class='userdanger'>You feel ready to burst, but this isn't an appropriate place! You must return to the station!</span>")