forked from mtcontrib/plantlife_modpack
Fix trunks mod start failure if some type of trunk does not exist.
This commit is contained in:
parent
16db34a9f1
commit
2ad8c73f66
@ -327,7 +327,9 @@ for i in pairs(TRuNKS) do
|
|||||||
local TRuNK = TRuNKS[i][2]
|
local TRuNK = TRuNKS[i][2]
|
||||||
if minetest.get_modpath(MoD) ~= nil then
|
if minetest.get_modpath(MoD) ~= nil then
|
||||||
|
|
||||||
local des = minetest.registered_nodes[MoD..":"..TRuNK].description
|
local node = minetest.registered_nodes[MoD..":"..TRuNK]
|
||||||
|
if node then
|
||||||
|
local des = node.description
|
||||||
|
|
||||||
minetest.register_node("trunks:"..TRuNK.."root", {
|
minetest.register_node("trunks:"..TRuNK.."root", {
|
||||||
description = des.." Root",
|
description = des.." Root",
|
||||||
@ -356,6 +358,9 @@ for i in pairs(TRuNKS) do
|
|||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
else
|
||||||
|
print(string.format("[Trunks] warning: tree type '%s:%s' not found", MoD, TRuNK))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user