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
|
local BASE_BLOCK
|
||||||
|
|
||||||
if minetest.get_modpath("yl_nether") then
|
if minetest.registered_items["yl_nether:ivory_block"] then
|
||||||
-- FIXME check if this item is actually registered
|
|
||||||
BASE_BLOCK = "yl_nether:ivory_block"
|
BASE_BLOCK = "yl_nether:ivory_block"
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -122,6 +121,9 @@ if BASE_BLOCK then
|
|||||||
{ "", "", "" },
|
{ "", "", "" },
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
if minetest.registered_items["dye:red"] then
|
||||||
local colors = {
|
local colors = {
|
||||||
"red",
|
"red",
|
||||||
"blue",
|
"blue",
|
||||||
|
Loading…
Reference in New Issue
Block a user