From e5b6078bc4bac7bab05977581328390aa18ef8d0 Mon Sep 17 00:00:00 2001 From: Kyle Spier-Swenson Date: Wed, 16 Dec 2015 03:19:17 -0800 Subject: [PATCH] Cleans up turf/get_lumcount I'm going to just declare that any case where a turf's loc isn't an area to be a bug that lighting code shouldn't be hiding --- code/modules/lighting/lighting_system.dm | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/code/modules/lighting/lighting_system.dm b/code/modules/lighting/lighting_system.dm index 9ce09b420c1..ffaba03f17d 100644 --- a/code/modules/lighting/lighting_system.dm +++ b/code/modules/lighting/lighting_system.dm @@ -342,17 +342,10 @@ lighting_changed = 0 /turf/proc/get_lumcount() - var/light_amount - if(!src || !istype(src)) - return + . = LIGHTING_CAP var/area/A = src.loc - if(!A || !istype(src)) - return if(IS_DYNAMIC_LIGHTING(A)) light_amount = src.lighting_lumcount - else - light_amount = LIGHTING_CAP - return light_amount /area var/lighting_use_dynamic = DYNAMIC_LIGHTING_ENABLED //Turn this flag off to make the area fullbright