From 48bf2a6abf8dd4e97370c69a1a167ba285121aee Mon Sep 17 00:00:00 2001 From: volas Date: Tue, 12 Mar 2024 07:34:38 +0300 Subject: [PATCH] merge ready --- code/_onclick/hud/rendering/plane_master.dm | 2 +- code/game/turfs/turf.dm | 4 ++-- code/modules/admin/verbs/lighting.dm | 2 +- code/modules/admin/verbs/massmodvar.dm | 12 +----------- code/modules/admin/verbs/modifyvariables.dm | 3 --- code/modules/lighting/environment.dm | 8 ++++++++ code/modules/lighting/lighting_area.dm | 1 - code/modules/lighting/lighting_object.dm | 6 +++--- 8 files changed, 16 insertions(+), 22 deletions(-) diff --git a/code/_onclick/hud/rendering/plane_master.dm b/code/_onclick/hud/rendering/plane_master.dm index e03c2dff7b90..38648f137b7f 100644 --- a/code/_onclick/hud/rendering/plane_master.dm +++ b/code/_onclick/hud/rendering/plane_master.dm @@ -128,7 +128,7 @@ invisibility = INVISIBILITY_LIGHTING -/atom/movable/screen/plane_master/exposure/apply_effects(mob/mymob, iscamera = FALSE) // todo: prefs +/atom/movable/screen/plane_master/exposure/apply_effects(mob/mymob, iscamera = FALSE) remove_filter("blur_exposure") if(!istype(mymob)) return diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index efe01cd9fc73..2007b99f435e 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -3,8 +3,8 @@ // base turf luminosity, works against byond native darkness // most likely you shouldn't touch it - // currently direcly used only by starlight - // light subsystem uses lighting_object's for luminosity + // currently direcly used only by starlight/environment lighting + // dynamic lighting subsystem uses lighting_object's for luminosity luminosity = 0 var/turf/basetype = /turf/environment/space diff --git a/code/modules/admin/verbs/lighting.dm b/code/modules/admin/verbs/lighting.dm index fa990c9f161f..6526f2cd859e 100644 --- a/code/modules/admin/verbs/lighting.dm +++ b/code/modules/admin/verbs/lighting.dm @@ -11,7 +11,7 @@ return if(choice == "Custom") - var/hex_color = input(usr, "Pick new level lighting color", "Level color") as color|null + var/hex_color = input(usr, "Pick new level lighting color", "Level color") as text if(!hex_color) return diff --git a/code/modules/admin/verbs/massmodvar.dm b/code/modules/admin/verbs/massmodvar.dm index f03e76bc5760..1699ab64549b 100644 --- a/code/modules/admin/verbs/massmodvar.dm +++ b/code/modules/admin/verbs/massmodvar.dm @@ -293,17 +293,7 @@ A.vars[variable] = O.vars[variable] if("num") - var/new_value - - if(variable == "dynamic_lighting") - new_value = tgui_alert(usr, "dynamic_lighting",, list("ENABLED", "DISABLED")) - switch(new_value) - if("ENABLED") - new_value = TRUE - if("DISABLED") - new_value = FALSE - else - new_value = input("Enter new number:","Num", O.vars[variable]) as num|null + var/new_value = input("Enter new number:","Num", O.vars[variable]) as num|null if(isnull(new_value)) return diff --git a/code/modules/admin/verbs/modifyvariables.dm b/code/modules/admin/verbs/modifyvariables.dm index 7a64ff286984..2b5a4ab0a297 100644 --- a/code/modules/admin/verbs/modifyvariables.dm +++ b/code/modules/admin/verbs/modifyvariables.dm @@ -491,9 +491,6 @@ return O.set_light(l_power = var_new) if("dynamic_lighting") - if(!isarea(O)) - to_chat(usr, "This can only be used on instances of type /area") - return var/var_new = tgui_alert(usr, "dynamic_lighting",, list("ENABLED", "DISABLED")) switch(var_new) if("ENABLED") diff --git a/code/modules/lighting/environment.dm b/code/modules/lighting/environment.dm index 40244458595a..8706bd20472c 100644 --- a/code/modules/lighting/environment.dm +++ b/code/modules/lighting/environment.dm @@ -1,4 +1,12 @@ // environment lighting - second unsimulated lighting system for z-levels and areas +// still WiP and need some sorting +// +// todo: +// * move level color holder to SSenviromnent and merge SSenviromnent into SSmapping +// * add better instruments to create /area/ lighting +// * update get_lumcount to properly count lums from the area +// * update Set Level Light verb and add animation setup +// * more globally - update parallax, do better blending // z-level mask we use to apply environment color for clients // done as a separate effect so we can change it in a centralised way and apply animations diff --git a/code/modules/lighting/lighting_area.dm b/code/modules/lighting/lighting_area.dm index 7079c11adca2..8a5f65c51528 100644 --- a/code/modules/lighting/lighting_area.dm +++ b/code/modules/lighting/lighting_area.dm @@ -1,4 +1,3 @@ -// todo we need it? /area/proc/set_dynamic_lighting(new_dynamic_lighting = TRUE) if (new_dynamic_lighting == dynamic_lighting) return FALSE diff --git a/code/modules/lighting/lighting_object.dm b/code/modules/lighting/lighting_object.dm index b6958b43fde2..f659a0ea426a 100644 --- a/code/modules/lighting/lighting_object.dm +++ b/code/modules/lighting/lighting_object.dm @@ -25,9 +25,9 @@ qdel(myturf.lighting_object, force = TRUE) myturf.lighting_object = src + // just in case if something spawns us before initialization // any lighting source will add us to the queue anyway - // saves us init time on objects that don't have any lightins sources around - // todo: do on-demand spawn like corners, but we need something for darkness + // saves us init time on objects that don't have any lighting sources around if(!SSlighting.initialized) icon_state = "dark" color = null @@ -112,7 +112,7 @@ else if(!set_luminosity) icon_state = "dark" color = null - else if(set_luminosity) + else icon_state = null color = list( rr, rg, rb, 00,