MineClone5/mods/ENVIRONMENT/mcl_ambient_light/init.lua

14 lines
438 B
Lua
Raw Permalink Normal View History

2021-12-15 01:20:34 +01:00
minetest.register_on_mods_loaded(function ()
local light_min = 1
2021-12-17 00:04:36 +01:00
for name, def in pairs(minetest.registered_nodes) do
if name ~= "air" then
local light_source = def.light_source
if light_source == nil or light_source < light_min then
minetest.override_item(name, { light_source = light_min })
elseif light_source == light_min then
minetest.override_item(name, { light_source = light_min + 1 })
end
2021-12-15 01:20:34 +01:00
end
end
end)