forked from mtcontrib/plantlife_modpack
stop crash from not-registered node being called for in trunks mod
This commit is contained in:
parent
6fd0df8b54
commit
2bab75fa9e
@ -223,13 +223,13 @@ local TRuNKS = {
|
|||||||
|
|
||||||
if Horizontal_Trunks == true then -- see settings.txt
|
if Horizontal_Trunks == true then -- see settings.txt
|
||||||
for i in pairs(TRuNKS) do
|
for i in pairs(TRuNKS) do
|
||||||
local MoD = TRuNKS[i][1]
|
local MoD = TRuNKS[i][1]
|
||||||
local TRuNK = TRuNKS[i][2]
|
local TRuNK = TRuNKS[i][2]
|
||||||
local NR = TRuNKS[i][3]
|
local NR = TRuNKS[i][3]
|
||||||
|
local trunkname = MoD..":"..TRuNK
|
||||||
if minetest.get_modpath(MoD) ~= nil
|
if minetest.get_modpath(MoD) ~= nil
|
||||||
and NR < 6 then -- moretrees trunks allready have facedir
|
and NR < 6 -- moretrees trunks allready have facedir
|
||||||
|
and minetest.registered_nodes[trunkname] then -- the node being called exists.
|
||||||
trunkname = MoD..":"..TRuNK
|
|
||||||
temptrunk = clone_node(trunkname)
|
temptrunk = clone_node(trunkname)
|
||||||
temptrunk.paramtype2 = "facedir"
|
temptrunk.paramtype2 = "facedir"
|
||||||
minetest.register_node(":"..trunkname, temptrunk)
|
minetest.register_node(":"..trunkname, temptrunk)
|
||||||
|
Loading…
Reference in New Issue
Block a user