mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-31 09:08:30 +01:00
var/static_lighting proper varedit support (#61164)
per title it creates/destroys the lighting objects now
This commit is contained in:
@@ -27,6 +27,12 @@
|
||||
if("base_lighting_alpha")
|
||||
set_base_lighting(new_alpha = var_value)
|
||||
return TRUE
|
||||
if("static_lighting")
|
||||
if(!static_lighting)
|
||||
create_area_lighting_objects()
|
||||
else
|
||||
remove_area_lighting_objects()
|
||||
|
||||
return ..()
|
||||
|
||||
/area/proc/update_base_lighting()
|
||||
|
||||
@@ -15,3 +15,19 @@ GLOBAL_DATUM_INIT(fullbright_overlay, /mutable_appearance, create_fullbright_ove
|
||||
//Non static lighting areas.
|
||||
//Any lighting area that wont support static lights.
|
||||
//These areas will NOT have corners generated.
|
||||
|
||||
///regenerates lighting objects for turfs in this area, primary use is VV changes
|
||||
/area/proc/create_area_lighting_objects()
|
||||
for(var/turf/T in src)
|
||||
if(T.always_lit)
|
||||
continue
|
||||
T.lighting_build_overlay()
|
||||
CHECK_TICK
|
||||
|
||||
///Removes lighting objects from turfs in this area if we have them, primary use is VV changes
|
||||
/area/proc/remove_area_lighting_objects()
|
||||
for(var/turf/T in src)
|
||||
if(T.always_lit)
|
||||
continue
|
||||
T.lighting_clear_overlay()
|
||||
CHECK_TICK
|
||||
|
||||
Reference in New Issue
Block a user