handle optional dependencies better
This commit is contained in:
parent
ff729567fa
commit
f5ed551863
6
init.lua
6
init.lua
@ -107,8 +107,7 @@ minetest.register_node("yl_dice:dice", {
|
||||
|
||||
local BASE_BLOCK
|
||||
|
||||
if minetest.get_modpath("yl_nether") then
|
||||
-- FIXME check if this item is actually registered
|
||||
if minetest.registered_items["yl_nether:ivory_block"] then
|
||||
BASE_BLOCK = "yl_nether:ivory_block"
|
||||
end
|
||||
|
||||
@ -122,6 +121,9 @@ if BASE_BLOCK then
|
||||
{ "", "", "" },
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
if minetest.registered_items["dye:red"] then
|
||||
local colors = {
|
||||
"red",
|
||||
"blue",
|
||||
|
Loading…
Reference in New Issue
Block a user