diff --git a/code/controllers/subsystem/objects.dm b/code/controllers/subsystem/objects.dm index ccd49428120..35236b38fb6 100644 --- a/code/controllers/subsystem/objects.dm +++ b/code/controllers/subsystem/objects.dm @@ -9,6 +9,7 @@ var/datum/subsystem/objects/SSobj priority = 12 var/list/processing = list() + var/list/burning = list() /datum/subsystem/objects/New() NEW_SS_GLOBAL(SSobj) @@ -37,5 +38,9 @@ var/datum/subsystem/objects/SSobj ++i continue SSobj.processing.Cut(i, i+1) - - + for(var/obj/burningobj in SSobj.burning) + if(burningobj && (burningobj.burn_state == 1)) + if(burningobj.burn_world_time < world.time) + burningobj.burn() + else + SSobj.burning -= burningobj \ No newline at end of file diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 9eb1d4258ac..51df368a08f 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -11,6 +11,7 @@ var/burn_state = -1 // -1=fireproof | 0=will burn in fires | 1=currently on fire var/burntime = 10 //How long it takes to burn to ashes, in seconds + var/burn_world_time //What world time the object will burn up completely /obj/Destroy() if(!istype(src, /obj/machinery)) @@ -163,23 +164,21 @@ /obj/fire_act(var/global_overlay=1) if(!burn_state) burn_state = 1 + SSobj.burning += src + burn_world_time = world.time + burntime*10 if(global_overlay) overlays += fire_overlay - spawn(burntime*10) - if(burn_state == 1) - burn() + return 1 -/obj/proc/burn(var/visible=1) +/obj/proc/burn() for(var/obj/item/Item in contents) //Empty out the contents Item.loc = src.loc Item.fire_act() //Set them on fire, too - - if(visible) - src.visible_message("[src] burns away, leaving behind a pile of ashes.") new /obj/effect/decal/cleanable/ash(src.loc) qdel(src) /obj/proc/extinguish() if(burn_state == 1) burn_state = 0 - overlays -= fire_overlay \ No newline at end of file + overlays -= fire_overlay + SSobj.burning -= src \ No newline at end of file diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index c655ee34d45..e410f6dde59 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -1,5 +1,6 @@ /obj/item/clothing name = "clothing" + burn_state = 0 //Burnable var/flash_protect = 0 //Malk: What level of bright light protection item has. 1 = Flashers, Flashes, & Flashbangs | 2 = Welding | -1 = OH GOD WELDING BURNT OUT MY RETINAS var/tint = 0 //Malk: Sets the item's level of visual impairment tint, normally set to the same as flash_protect var/up = 0 // but seperated to allow items to protect but not impair vision, like space helmets @@ -23,6 +24,7 @@ w_class = 1.0 throwforce = 0 slot_flags = SLOT_EARS + burn_state = -1 //Not Burnable /obj/item/clothing/ears/earmuffs name = "earmuffs" @@ -32,7 +34,7 @@ flags = EARBANGPROTECT strip_delay = 15 put_on_delay = 25 - + burn_state = 0 //Burnable //Glasses /obj/item/clothing/glasses @@ -48,7 +50,7 @@ var/list/icon/current = list() //the current hud icons strip_delay = 20 put_on_delay = 25 - + burn_state = -1 //Not Burnable /* SEE_SELF // can see self, no matter what SEE_MOBS // can see all mobs, no matter what @@ -180,6 +182,7 @@ BLIND // can't see anything strip_delay = 50 put_on_delay = 50 flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH + burn_state = -1 //Not Burnable /obj/item/clothing/suit/space name = "space suit" @@ -201,6 +204,7 @@ BLIND // can't see anything max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT strip_delay = 80 put_on_delay = 80 + burn_state = -1 //Not Burnable //Under clothing /obj/item/clothing/under diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 525242cfb2d..a4c1a29a2aa 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -467,6 +467,6 @@ Shreds.desc = "The sad remains of what used to be a glorious [src.name]." qdel(src) else - burn(0) + burn() return shredded \ No newline at end of file