Set minimum light level to 1 for all nodes by adopting ambience_light mod - much more MC-like

This commit is contained in:
kay27 2021-12-13 02:09:03 +04:00
parent 2cfc6cf2c4
commit 6747a199ae
4 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,7 @@
ambient_light by MikeRedwood
============================
Makes all nodes lit to a small degree!
License of source code:
-----------------------
GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999

View File

@ -0,0 +1,10 @@
local light_min = tonumber(minetest.settings:get("light_min")) or 1
minetest.register_on_mods_loaded(function ()
for i, def in pairs(minetest.registered_nodes) do
local light_source = def.light_source
if light_source == nil or light_source < light_min then
minetest.override_item(i, { light_source = light_min })
end
end
end)

View File

@ -0,0 +1,2 @@
name = ambient_light
description = Makes all nodes lit to a small degree!

View File

@ -157,6 +157,13 @@ fix_doubleplants (Mcimport double plant fixes) bool true
# Allow players to create Minecraft-like maps.
enable_real_maps (Enable Real Maps) bool true
# Minimum emissive light level below which the block is made to emit said light level. Defaults to 1 (looks like in MC).
# WARNING! You may have to run fixlight on loaded areas after you remove it or change the light level.
# Will work on all blocks including under ground.
# For debugging mods or exploring underground worlds in creative mod author recommends 9.
# Min 0 and Max 14.
light_min (Minimum light level) int 1
[Debugging]
# If enabled, this will show the itemstring of an item in the description.
mcl_item_id_debug (Item ID Debug) bool false