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,35 +327,40 @@ 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
|
||||||
minetest.register_node("trunks:"..TRuNK.."root", {
|
local des = node.description
|
||||||
description = des.." Root",
|
|
||||||
paramtype = "light",
|
minetest.register_node("trunks:"..TRuNK.."root", {
|
||||||
paramtype2 = "facedir",
|
description = des.." Root",
|
||||||
tiles = {
|
paramtype = "light",
|
||||||
--[[top]] MoD.."_"..TRuNK..".png",
|
paramtype2 = "facedir",
|
||||||
--[[bottom]] MoD.."_"..TRuNK..".png",
|
tiles = {
|
||||||
--[[right]] MoD.."_"..TRuNK..".png^trunks_root_mask.png^[makealpha:0,0,0",
|
--[[top]] MoD.."_"..TRuNK..".png",
|
||||||
--[[left]] MoD.."_"..TRuNK..".png^trunks_root_mask.png^[transformFX^[makealpha:0,0,0",
|
--[[bottom]] MoD.."_"..TRuNK..".png",
|
||||||
--[[back]] MoD.."_"..TRuNK..".png",
|
--[[right]] MoD.."_"..TRuNK..".png^trunks_root_mask.png^[makealpha:0,0,0",
|
||||||
--[[front]] MoD.."_"..TRuNK..".png"
|
--[[left]] MoD.."_"..TRuNK..".png^trunks_root_mask.png^[transformFX^[makealpha:0,0,0",
|
||||||
},
|
--[[back]] MoD.."_"..TRuNK..".png",
|
||||||
drawtype = "nodebox",
|
--[[front]] MoD.."_"..TRuNK..".png"
|
||||||
selection_box = {type = "fixed", fixed = roots_cube},
|
},
|
||||||
node_box = {type = "fixed", fixed = roots_sheet},
|
drawtype = "nodebox",
|
||||||
groups = {
|
selection_box = {type = "fixed", fixed = roots_cube},
|
||||||
tree=1,
|
node_box = {type = "fixed", fixed = roots_sheet},
|
||||||
snappy=1,
|
groups = {
|
||||||
choppy=2,
|
tree=1,
|
||||||
oddly_breakable_by_hand=1,
|
snappy=1,
|
||||||
flammable=2--,
|
choppy=2,
|
||||||
--not_in_creative_inventory=1 -- atm in inv for testing
|
oddly_breakable_by_hand=1,
|
||||||
},
|
flammable=2--,
|
||||||
--drop = "trunks:twig_1", -- not sure about this yet
|
--not_in_creative_inventory=1 -- atm in inv for testing
|
||||||
sounds = default.node_sound_wood_defaults(),
|
},
|
||||||
})
|
--drop = "trunks:twig_1", -- not sure about this yet
|
||||||
|
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