From b773a05600e451c4a80aa6f2f5358778c037ede3 Mon Sep 17 00:00:00 2001 From: Aryn Date: Sun, 2 Mar 2014 07:27:33 -0700 Subject: [PATCH] Fixed some bugs regarding space lighting. --- code/WorkInProgress/Aryn/Lighting/Controller.dm | 4 +--- code/WorkInProgress/Aryn/Lighting/Engine.dm | 16 +++++++++++----- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/code/WorkInProgress/Aryn/Lighting/Controller.dm b/code/WorkInProgress/Aryn/Lighting/Controller.dm index f363d320165..c5a0fee140e 100644 --- a/code/WorkInProgress/Aryn/Lighting/Controller.dm +++ b/code/WorkInProgress/Aryn/Lighting/Controller.dm @@ -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) diff --git a/code/WorkInProgress/Aryn/Lighting/Engine.dm b/code/WorkInProgress/Aryn/Lighting/Engine.dm index 2f971d220fc..be0a839deca 100644 --- a/code/WorkInProgress/Aryn/Lighting/Engine.dm +++ b/code/WorkInProgress/Aryn/Lighting/Engine.dm @@ -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