From what I see, adding back a visual minimum brightness setting shouldn't be a problem. This mod adjusts the "brightness_visual_weights" of all surfaces in the game.
if settings.global["Clockwork-darknight"].value then
surface.brightness_visual_weights = { 1 / 0.85, 1 / 0.85, 1 / 0.85 }
else
surface.brightness_visual_weights = { 0, 0, 0}
end
Assuming all color channels use the same value:
- 1 = pitch black
- 0 = vanilla
- <0 = makes the environment brighter, but still loses saturation compared to regular day time
With that in mind, the boolean setting for pitch black nights could be changed to a number input.
(Though would need a migration: false -> 0, true -> 1)
{
type = "double-setting",
name = "Clockwork-darknight",
setting_type = "runtime-global",
default_value = 0.01,
minimum_value = 0,
maximum_value = 1,
order = "ec"
},
local darknessModifier = settings.global["Clockwork-darknight"].value;
surface.brightness_visual_weights = { darknessModifier, darknessModifier, darknessModifier }
Then we could enter something like 0.9 and have really dark, but not pitch black nights :)
Edit 2020-08-23:
Actually, 1.1764705... (1/0.85) is the maximum value, which the mod already uses for the pitch black setting.
https://forums.factorio.com/viewtopic.php?p=474827#p474827