Fix light

This commit is contained in:
kay27 2021-12-17 03:04:36 +04:00
parent d547e435bb
commit 9d77c22c4f
2 changed files with 9 additions and 7 deletions

View File

@ -1,11 +1,13 @@
minetest.register_on_mods_loaded(function ()
local light_min = 1
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 })
elseif light_source == light_min then
minetest.override_item(i, { light_source = light_min + 1 })
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
end
end
end)

View File

@ -1,3 +1,3 @@
name = ambient_light
author = MikeRedwood
author = MikeRedwood, kay27
description = Makes all nodes lit to a small degree!