From 11c9f59abd843bf4f3ba941220a80d804e7b90d3 Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Fri, 17 Feb 2017 23:07:43 -0800 Subject: [PATCH] Lighting now states which atom is missing a `light_sources` list on runtime --- code/modules/lighting/lighting_source.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/modules/lighting/lighting_source.dm b/code/modules/lighting/lighting_source.dm index f2aa13a82e3..01f967a0544 100644 --- a/code/modules/lighting/lighting_source.dm +++ b/code/modules/lighting/lighting_source.dm @@ -66,7 +66,10 @@ destroyed = TRUE force_update() if(source_atom) - source_atom.light_sources -= src + if(!source_atom.light_sources) + log_runtime(EXCEPTION("Atom [source_atom] was a light source, but lacked a light source list!\n"), source_atom) + else + source_atom.light_sources -= src if(top_atom) top_atom.light_sources -= src