forked from MineClone5/MineClone5
Fix light
This commit is contained in:
parent
d547e435bb
commit
9d77c22c4f
|
@ -1,11 +1,13 @@
|
||||||
minetest.register_on_mods_loaded(function ()
|
minetest.register_on_mods_loaded(function ()
|
||||||
local light_min = 1
|
local light_min = 1
|
||||||
for i, def in pairs(minetest.registered_nodes) do
|
for name, def in pairs(minetest.registered_nodes) do
|
||||||
local light_source = def.light_source
|
if name ~= "air" then
|
||||||
if light_source == nil or light_source < light_min then
|
local light_source = def.light_source
|
||||||
minetest.override_item(i, { light_source = light_min })
|
if light_source == nil or light_source < light_min then
|
||||||
elseif light_source == light_min then
|
minetest.override_item(name, { light_source = light_min })
|
||||||
minetest.override_item(i, { light_source = light_min + 1 })
|
elseif light_source == light_min then
|
||||||
|
minetest.override_item(name, { light_source = light_min + 1 })
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
name = ambient_light
|
name = ambient_light
|
||||||
author = MikeRedwood
|
author = MikeRedwood, kay27
|
||||||
description = Makes all nodes lit to a small degree!
|
description = Makes all nodes lit to a small degree!
|
||||||
|
|
Loading…
Reference in New Issue