forked from mtcontrib/plantlife_modpack
Fix crash caused by the previous merge
This commit is contained in:
parent
b597f99014
commit
efe869d386
@ -44,7 +44,7 @@ abstract_trunks.place_twig = function(pos)
|
|||||||
|
|
||||||
-- small twigs
|
-- small twigs
|
||||||
if twig_size <= 16 then
|
if twig_size <= 16 then
|
||||||
minetest.swap_node(right_here, {name="trunks:twig_"..random(1,4), param2=random(0,3)})
|
minetest.swap_node(right_here, {name="trunks:twig_"..math.random(1,4), param2=math.random(0,3)})
|
||||||
end
|
end
|
||||||
-- big twigs
|
-- big twigs
|
||||||
if Big_Twigs == true then
|
if Big_Twigs == true then
|
||||||
@ -163,7 +163,7 @@ abstract_trunks.place_twig = function(pos)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
elseif twig_size <= 25 then
|
elseif twig_size <= 25 then
|
||||||
minetest.swap_node(right_here, {name="trunks:twig_"..random(12,13), param2=random(0,3)})
|
minetest.swap_node(right_here, {name="trunks:twig_"..math.random(12,13), param2=math.random(0,3)})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -270,10 +270,10 @@ abstract_trunks.place_trunk = function(pos)
|
|||||||
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 chance = random(1, 17)
|
local chance = math.random(1, 17)
|
||||||
local length = random(3,5)
|
local length = math.random(3,5)
|
||||||
if chance == NR then
|
if chance == NR then
|
||||||
local trunk_type = random(1,3)
|
local trunk_type = math.random(1,3)
|
||||||
if trunk_type == 1 then
|
if trunk_type == 1 then
|
||||||
if minetest.get_modpath(MoD) ~= nil then
|
if minetest.get_modpath(MoD) ~= nil then
|
||||||
minetest.swap_node(right_here, {name=MoD..":"..TRuNK})
|
minetest.swap_node(right_here, {name=MoD..":"..TRuNK})
|
||||||
@ -509,7 +509,7 @@ end
|
|||||||
if Roots == true then -- see settings.txt
|
if Roots == true then -- see settings.txt
|
||||||
|
|
||||||
abstract_trunks.grow_roots = function(pos)
|
abstract_trunks.grow_roots = function(pos)
|
||||||
local twig_size = random(1,27)
|
local twig_size = math.random(1,27)
|
||||||
|
|
||||||
local right_here = {x=pos.x , y=pos.y , z=pos.z }
|
local right_here = {x=pos.x , y=pos.y , z=pos.z }
|
||||||
local below = {x=pos.x , y=pos.y-1, z=pos.z }
|
local below = {x=pos.x , y=pos.y-1, z=pos.z }
|
||||||
|
Loading…
Reference in New Issue
Block a user