supports multiple harvesting stages
This commit is contained in:
parent
b1d61a499f
commit
76713b2532
12
nodes.lua
12
nodes.lua
@ -50,10 +50,20 @@ end
|
||||
-- Farming Redo
|
||||
-------------------------------------------------------------------------------
|
||||
if farming.mod == "redo" then
|
||||
local fp_grows = function(def, step)
|
||||
local crop = def.crop .. "_" .. step
|
||||
local node = minetest.registered_nodes[crop]
|
||||
if node then
|
||||
fp(def.seed, def.crop .. "_1", crop, def.trellis)
|
||||
return node.groups and node.groups.growing
|
||||
end
|
||||
end
|
||||
|
||||
for name, def in pairs(farming.registered_plants) do
|
||||
-- everything except cocoa (these can only be placed on jungletree)
|
||||
if name ~= "farming:cocoa_beans" then
|
||||
fp(def.seed, def.crop .. "_1", def.crop .. "_" .. def.steps, def.trellis)
|
||||
local step = def.steps
|
||||
while fp_grows(def, step) do step = step + 1 end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user