diff --git a/code/__defines/lighting.dm b/code/__defines/lighting.dm index 2e5c5d48fc..d775800ab3 100644 --- a/code/__defines/lighting.dm +++ b/code/__defines/lighting.dm @@ -60,8 +60,6 @@ #define DYNAMIC_LIGHTING_ENABLED 1 /// dynamic lighting enabled even if the area doesn't require power #define DYNAMIC_LIGHTING_FORCED 2 -/// dynamic lighting enabled only if starlight is. -#define DYNAMIC_LIGHTING_IFSTARLIGHT 3 #define IS_DYNAMIC_LIGHTING(A) A.dynamic_lighting diff --git a/code/controllers/configuration/entries/general.dm b/code/controllers/configuration/entries/general.dm index 7adffc77f3..d484c28e3d 100644 --- a/code/controllers/configuration/entries/general.dm +++ b/code/controllers/configuration/entries/general.dm @@ -581,7 +581,8 @@ /datum/config_entry/flag/allow_url_links default = TRUE // honestly if I were you i'd leave this one off, only use in dire situations -/datum/config_entry/flag/starlight // Whether space turfs have ambient light or not +/datum/config_entry/number/starlight // Whether space turfs have ambient light or not and how strong it is. + default = 0 // FIXME: Unused ///datum/config_entry/str_list/ert_species diff --git a/code/controllers/subsystems/lighting.dm b/code/controllers/subsystems/lighting.dm index f5d175c1ed..c0c0e7b377 100644 --- a/code/controllers/subsystems/lighting.dm +++ b/code/controllers/subsystems/lighting.dm @@ -20,11 +20,6 @@ SUBSYSTEM_DEF(lighting) /datum/controller/subsystem/lighting/Initialize() if(!subsystem_initialized) - if (CONFIG_GET(flag/starlight)) - for(var/area/A in world) - if (A.dynamic_lighting == DYNAMIC_LIGHTING_IFSTARLIGHT) - A.luminosity = 0 - subsystem_initialized = TRUE create_all_lighting_objects() diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm index 78111ed405..b87ef31ff4 100644 --- a/code/game/turfs/space/space.dm +++ b/code/game/turfs/space/space.dm @@ -13,7 +13,7 @@ var/forced_dirs = 0 //Force this one to pretend it's an overedge turf /turf/space/Initialize(mapload) - if(CONFIG_GET(flag/starlight)) + if(CONFIG_GET(number/starlight)) update_starlight() //Sprite stuff only beyond here @@ -75,7 +75,7 @@ /turf/space/proc/update_starlight() if(locate(/turf/simulated) in orange(src,1)) - set_light(CONFIG_GET(flag/starlight)) + set_light(CONFIG_GET(number/starlight)) else set_light(0) diff --git a/code/game/turfs/turf_changing.dm b/code/game/turfs/turf_changing.dm index 454ac52c69..20fb5e6205 100644 --- a/code/game/turfs/turf_changing.dm +++ b/code/game/turfs/turf_changing.dm @@ -100,8 +100,9 @@ if(SSair) SSair.mark_for_update(W) - for(var/turf/space/S in range(W, 1)) - S.update_starlight() + if(CONFIG_GET(number/starlight)) + for(var/turf/space/S in range(W, 1)) + S.update_starlight() W.levelupdate() W.update_icon(1) W.post_change() @@ -130,8 +131,9 @@ else if(lighting_object && !lighting_object.needs_update) lighting_object.update() - for(var/turf/space/space_tile in RANGE_TURFS(1, src)) - space_tile.update_starlight() + if(CONFIG_GET(number/starlight)) + for(var/turf/space/space_tile in RANGE_TURFS(1, src)) + space_tile.update_starlight() var/turf/simulated/sim_self = src if(lighting_object && istype(sim_self) && sim_self.shandler) //sanity check, but this should never be null for either of the switch cases (lighting_object will be null during initializations sometimes) diff --git a/code/modules/lighting/lighting_overlay.dm b/code/modules/lighting/lighting_overlay.dm index e21158f703..7ba7029a0d 100644 --- a/code/modules/lighting/lighting_overlay.dm +++ b/code/modules/lighting/lighting_overlay.dm @@ -30,7 +30,7 @@ affected_turf.lighting_object = src affected_turf.set_luminosity(0) - if(CONFIG_GET(flag/starlight)) + if(CONFIG_GET(number/starlight)) for(var/turf/space/space_tile in RANGE_TURFS(1, affected_turf)) space_tile.update_starlight()