Fixed some bugs regarding space lighting.

This commit is contained in:
Aryn
2014-03-02 07:27:33 -07:00
committed by ZomgPonies
parent 9495c5b639
commit b773a05600
2 changed files with 12 additions and 8 deletions
@@ -77,9 +77,7 @@ var/list/lit_z_levels = list(1,5)
var/turf/T = locate(x,y,z)
if(!T.is_outside)
T.light_overlay = image(icon='icons/effects/ArynLights.dmi',icon_state="0000",layer=9)
T.light_overlay.invisibility = INVISIBILITY_LIGHTING
T.mouse_opacity = 0
T.light_overlay = new(T)
//T.ResetValue()
if(!all_lightpoints_made) new/lightpoint(x+0.5,y+0.5,z)
+11 -5
View File
@@ -53,18 +53,17 @@ Turf Procs:
#define LIGHTCLAMP(x) ( max(0,min(3,round(x,1))) )
//This is now an image because weird shit happens with /obj
/*obj/effect/lighting_overlay
//anchored = 1
atom/movable/lighting_overlay
anchored = 1
layer = 9
mouse_opacity = 0
icon = 'icons/effects/ArynLights.dmi'
icon_state = "0000"
invisibility = INVISIBILITY_LIGHTING*/
invisibility = INVISIBILITY_LIGHTING
atom/var/light/light
turf/var/image/light_overlay
turf/var/atom/movable/lighting_overlay/light_overlay
turf/var/lit_value = 0
turf/var/max_brightness = 0
@@ -169,6 +168,13 @@ turf/proc/ResetAllLights()
for(var/light/light in lit_by)
light.Reset()
/turf/space/ResetAllLights()
var/atom/movable/lighting_overlay/overlay = locate() in src
overlay.loc = null
light_overlay = null
is_outside = 1
. = ..()
turf/proc/ResetValue()
if(is_outside)
max_brightness = lighting_controller.starlight