mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-17 10:03:50 +01:00
Temporary commit to back up data.
Conflicts: code/WorkInProgress/Aryn/Lighting/Controller.dm
This commit is contained in:
@@ -76,9 +76,11 @@ var/list/lit_z_levels = list(1,5)
|
||||
world << "<font color=red>Progress: [round((turfs_updated/total_turfs)*100, 0.01)]% ([turfs_updated]/[total_turfs])"
|
||||
|
||||
var/turf/T = locate(x,y,z)
|
||||
if(!T.light_overlay && !T.is_outside)
|
||||
T.light_overlay = new(T)
|
||||
T.ResetValue()
|
||||
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.ResetValue()
|
||||
if(!all_lightpoints_made) new/lightpoint(x+0.5,y+0.5,z)
|
||||
|
||||
|
||||
@@ -89,8 +91,9 @@ var/list/lit_z_levels = list(1,5)
|
||||
started = 1
|
||||
|
||||
for(var/turf/T)
|
||||
if(!T.is_outside)
|
||||
if(!T.lit_value) T.ResetValue()
|
||||
if(!T.is_outside && T.light_overlay)
|
||||
|
||||
T.ResetValue()
|
||||
T.UpdateLight()
|
||||
|
||||
world << "<b><font color=red>Lighting initialization took [(world.timeofday-start_time)/world.fps] seconds.</font></b>"
|
||||
|
||||
@@ -53,17 +53,18 @@ Turf Procs:
|
||||
|
||||
#define LIGHTCLAMP(x) ( max(0,min(3,round(x,1))) )
|
||||
|
||||
obj/effect/lighting_overlay
|
||||
//This is now an image because weird shit happens with /obj
|
||||
/*obj/effect/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/obj/effect/lighting_overlay/light_overlay
|
||||
turf/var/image/light_overlay
|
||||
|
||||
turf/var/lit_value = 0
|
||||
turf/var/max_brightness = 0
|
||||
|
||||
@@ -52,9 +52,14 @@ lightpoint
|
||||
proc/max_value()
|
||||
if(cached_value < 0)
|
||||
var
|
||||
valueA = (NW?(NW.lit_value):0)
|
||||
valueB = (NE?(NE.lit_value):0)
|
||||
valueC = (SW?(SW.lit_value):0)
|
||||
valueD = (SE?(SE.lit_value):0)
|
||||
valueA = value_of(NW)
|
||||
valueB = value_of(NE)
|
||||
valueC = value_of(SW)
|
||||
valueD = value_of(SE)
|
||||
cached_value = max(valueA,valueB,valueC,valueD)
|
||||
return cached_value
|
||||
return cached_value
|
||||
|
||||
proc/value_of(turf/T)
|
||||
if(!T) return 0
|
||||
if(T.is_outside) return min(lighting_controller.starlight,3)
|
||||
return T.lit_value
|
||||
Reference in New Issue
Block a user