mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
Merge pull request #14273 from MrStonedOne/patch-110
Fixes lava turfs processing forever as well as some burn logic
This commit is contained in:
@@ -193,30 +193,37 @@
|
||||
SSobj.processing |= src
|
||||
|
||||
/turf/simulated/floor/plating/lava/process()
|
||||
if(!contents)
|
||||
if(!burn_stuff())
|
||||
processing = 0
|
||||
SSobj.processing.Remove(src)
|
||||
return
|
||||
burn_stuff()
|
||||
|
||||
|
||||
/turf/simulated/floor/plating/lava/proc/burn_stuff()
|
||||
for(var/atom/movable/AM in contents)
|
||||
if(!istype(AM))
|
||||
return
|
||||
if(istype(AM, /obj))
|
||||
var/obj/O = AM
|
||||
. = 0
|
||||
for(var/thing in contents)
|
||||
if(istype(thing, /obj))
|
||||
var/obj/O = thing
|
||||
if(istype(O, /obj/effect/decal/cleanable/ash)) //So we don't get stuck burning the same ash pile forever
|
||||
qdel(O)
|
||||
return
|
||||
continue
|
||||
. = 1
|
||||
if(O.burn_state == FIRE_PROOF)
|
||||
O.burn_state = FLAMMABLE //Even fireproof things burn up in lava
|
||||
O.fire_act()
|
||||
else if (istype(AM, /mob/living))
|
||||
var/mob/living/L = AM
|
||||
O.fire_act()
|
||||
if (O)
|
||||
O.burn_state = FIRE_PROOF
|
||||
else
|
||||
O.fire_act()
|
||||
|
||||
|
||||
else if (istype(thing, /mob/living))
|
||||
. = 1
|
||||
var/mob/living/L = thing
|
||||
L.adjustFireLoss(20)
|
||||
if(L) //mobs turning into object corpses could get deleted here.
|
||||
L.adjust_fire_stacks(20)
|
||||
L.IgniteMob()
|
||||
|
||||
|
||||
/turf/simulated/floor/plating/lava/attackby(obj/item/C, mob/user, params) //Lava isn't a good foundation to build on
|
||||
return
|
||||
@@ -241,4 +248,4 @@
|
||||
/turf/simulated/floor/plating/lava/smooth/airless
|
||||
oxygen = 0
|
||||
nitrogen = 0
|
||||
temperature = TCMB
|
||||
temperature = TCMB
|
||||
|
||||
Reference in New Issue
Block a user