Skip to content

Commit

Permalink
merge ready
Browse files Browse the repository at this point in the history
  • Loading branch information
volas committed Mar 12, 2024
1 parent f6e8079 commit 48bf2a6
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 22 deletions.
2 changes: 1 addition & 1 deletion code/_onclick/hud/rendering/plane_master.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions code/game/turfs/turf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/modules/admin/verbs/lighting.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 1 addition & 11 deletions code/modules/admin/verbs/massmodvar.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions code/modules/admin/verbs/modifyvariables.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
8 changes: 8 additions & 0 deletions code/modules/lighting/environment.dm
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion code/modules/lighting/lighting_area.dm
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions code/modules/lighting/lighting_object.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 48bf2a6

Please sign in to comment.