diff --git a/mods/ENVIRONMENT/mcl_ambient_light/README.txt b/mods/ENVIRONMENT/mcl_ambient_light/README.txt new file mode 100644 index 000000000..866e619dc --- /dev/null +++ b/mods/ENVIRONMENT/mcl_ambient_light/README.txt @@ -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 diff --git a/mods/ENVIRONMENT/mcl_ambient_light/init.lua b/mods/ENVIRONMENT/mcl_ambient_light/init.lua new file mode 100644 index 000000000..cf1a99e06 --- /dev/null +++ b/mods/ENVIRONMENT/mcl_ambient_light/init.lua @@ -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) diff --git a/mods/ENVIRONMENT/mcl_ambient_light/mod.conf b/mods/ENVIRONMENT/mcl_ambient_light/mod.conf new file mode 100644 index 000000000..5b2859ae9 --- /dev/null +++ b/mods/ENVIRONMENT/mcl_ambient_light/mod.conf @@ -0,0 +1,2 @@ +name = ambient_light +description = Makes all nodes lit to a small degree! diff --git a/settingtypes.txt b/settingtypes.txt index 344afa50a..1c406f7e7 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -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 \ No newline at end of file