Files
S.P.L.U.R.T-Station-13/code/controllers/subsystem/fire_burning.dm
Poojawa 73b6b33f79 TG sync Sunday (#201)
* stage one

* datums and shit

* game stuff

* modules

* tgstation.dme

* tools

* these things for icons

* compiling fixes

* merge spree on TG

* other updates

* updated maps with deepfryers

* My helpers were not helping
2017-02-06 00:36:56 -06:00

43 lines
854 B
Plaintext

var/datum/subsystem/fire_burning/SSfire_burning
/datum/subsystem/fire_burning
name = "Fire Burning"
priority = 40
flags = SS_NO_INIT|SS_BACKGROUND
var/list/currentrun = list()
var/list/processing = list()
/datum/subsystem/fire_burning/New()
NEW_SS_GLOBAL(SSfire_burning)
/datum/subsystem/fire_burning/stat_entry()
..("P:[processing.len]")
/datum/subsystem/fire_burning/fire(resumed = 0)
if (!resumed)
src.currentrun = processing.Copy()
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
while(currentrun.len)
var/obj/O = currentrun[currentrun.len]
currentrun.len--
if (!O || QDELETED(O))
processing -= O
if (MC_TICK_CHECK)
return
continue
if(O.resistance_flags & ON_FIRE)
O.take_damage(20, BURN, "fire", 0)
else
processing -= O
if (MC_TICK_CHECK)
return