Stems: 8 stages, fix bone meal and selection box

This commit is contained in:
Wuzzy 2017-03-14 02:37:42 +01:00
parent b42fdbf385
commit 6794911023
3 changed files with 69 additions and 89 deletions

View file

@ -168,18 +168,24 @@ mcl_dye.apply_bone_meal = function(pointed_thing)
return true
elseif string.find(n.name, "mcl_farming:pumpkin_") ~= nil then
stage = tonumber(string.sub(n.name, -1))
if stage == 1 then
minetest.add_node(pos, {name="mcl_farming:pumpkin_"..math.random(stage,2)})
else
minetest.add_node(pos, {name="mcl_farming:pumpkintige_unconnect"})
if stage then
stage = stage + math.random(2,5)
if stage >= 8 then
minetest.add_node(pos, {name="mcl_farming:pumpkintige_unconnect"})
else
minetest.add_node(pos, {name="mcl_farming:pumpkin_"..stage})
end
end
return true
elseif string.find(n.name, "mcl_farming:melontige_") ~= nil then
stage = tonumber(string.sub(n.name, -1))
if stage == 1 then
minetest.add_node(pos, {name="mcl_farming:melontige_"..math.random(stage,2)})
else
minetest.add_node(pos, {name="mcl_farming:melontige_unconnect"})
if stage then
stage = stage + math.random(2,5)
if stage >= 8 then
minetest.add_node(pos, {name="mcl_farming:melontige_unconnect"})
else
minetest.add_node(pos, {name="mcl_farming:melontige_"..stage})
end
end
return true
elseif n.name == "mcl_cocoas:cocoa_1" or n.name == "mcl_cocoas:cocoa_2" then