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 ()
|
||||
local light_min = 1
|
||||
for i, def in pairs(minetest.registered_nodes) do
|
||||
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(i, { light_source = light_min })
|
||||
minetest.override_item(name, { light_source = light_min })
|
||||
elseif light_source == light_min then
|
||||
minetest.override_item(i, { light_source = light_min + 1 })
|
||||
minetest.override_item(name, { light_source = light_min + 1 })
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
name = ambient_light
|
||||
author = MikeRedwood
|
||||
author = MikeRedwood, kay27
|
||||
description = Makes all nodes lit to a small degree!
|
||||
|
|
Loading…
Reference in New Issue