diff --git a/code/game/supplyshuttle.dm b/code/game/supplyshuttle.dm index 3331861c136..a64e798c3ec 100644 --- a/code/game/supplyshuttle.dm +++ b/code/game/supplyshuttle.dm @@ -238,7 +238,15 @@ var/list/mechtoys = list( var/list/clear_turfs = list() for(var/turf/T in area_shuttle) - if(T.density || T.contents.len) continue + if(T.density) continue + var/contcount + for(var/atom/A in T.contents) + if(istype(A,/atom/movable/lighting_overlay)) + continue + if(istype(A,/obj/machinery/light)) + continue + contcount++ + if(contcount) continue clear_turfs += T for(var/S in shoppinglist) diff --git a/code/modules/lighting/light_source.dm b/code/modules/lighting/light_source.dm index 41c66359671..35bd0db7323 100644 --- a/code/modules/lighting/light_source.dm +++ b/code/modules/lighting/light_source.dm @@ -120,9 +120,9 @@ #endif #if LIGHTING_LAMBERTIAN == 1 - . = CLAMP01((1 - CLAMP01(sqrt(.) / light_range)) * (1 / (sqrt(. + 1)))) + . = CLAMP01((1 - CLAMP01(sqrt(.) / max(1,light_range))) * (1 / (sqrt(. + 1)))) #else - . = 1 - CLAMP01(sqrt(.) / light_range) + . = 1 - CLAMP01(sqrt(.) / max(1,light_range)) #endif #elif LIGHTING_FALLOFF == 2 // square @@ -133,9 +133,9 @@ #endif #if LIGHTING_LAMBERTIAN == 1 - . = CLAMP01((1 - CLAMP01(. / light_range)) * (1 / (sqrt(.)**2 + ))) + . = CLAMP01((1 - CLAMP01(. / max(1,light_range))) * (1 / (sqrt(.)**2 + ))) #else - . = 1 - CLAMP01(. / light_range) + . = 1 - CLAMP01(. / max(1,light_range)) #endif #endif