Add debug light source/corner/overlay instance count

This commit is contained in:
Tigercat2000
2017-02-12 17:30:10 -08:00
parent a35b800585
commit 577df3de36
2 changed files with 7 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
/var/list/datum/light_source/all_lighting_sources = list()
// This is where the fun begins.
// These are the main datums that emit light.
@@ -31,6 +32,7 @@
var/force_update
/datum/light_source/New(var/atom/owner, var/atom/top)
all_lighting_sources += src
source_atom = owner // Set our new owner.
if(!source_atom.light_sources)
source_atom.light_sources = list()
@@ -55,10 +57,12 @@
update()
return ..()
// Kill ourselves.
/datum/light_source/proc/destroy()
all_lighting_sources -= src
destroyed = TRUE
force_update()
if(source_atom)