summaryrefslogtreecommitdiff
path: root/cocoa.lua
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2018-03-22 15:57:36 +0000
committerTenPlus1 <kinsellaja@yahoo.com>2018-03-22 15:57:36 +0000
commita50c8d33ebe0a31f19c955f82b6943948d43a7f5 (patch)
treec503426f8d25106ca7c17db1c44be407ad2bff32 /cocoa.lua
parent7a972937da8a116e1d285531749c4c3f47341f96 (diff)
add new stage to cocoa, tweak code
Diffstat (limited to 'cocoa.lua')
-rw-r--r--cocoa.lua17
1 files changed, 11 insertions, 6 deletions
diff --git a/cocoa.lua b/cocoa.lua
index 2bbbb50..a8491ac 100644
--- a/cocoa.lua
+++ b/cocoa.lua
@@ -125,25 +125,30 @@ local crop_def = {
-- stage 1
minetest.register_node("farming:cocoa_1", table.copy(crop_def))
--- stage2
+-- stage 2
crop_def.tiles = {"farming_cocoa_2.png"}
+minetest.register_node("farming:cocoa_2", table.copy(crop_def))
+
+-- stage3
+crop_def.tiles = {"farming_cocoa_3.png"}
crop_def.drop = {
items = {
{items = {'farming:cocoa_beans 1'}, rarity = 1},
}
}
-minetest.register_node("farming:cocoa_2", table.copy(crop_def))
+minetest.register_node("farming:cocoa_3", table.copy(crop_def))
--- stage 3 (final)
-crop_def.tiles = {"farming_cocoa_3.png"}
+-- stage 4 (final)
+crop_def.tiles = {"farming_cocoa_4.png"}
crop_def.groups.growing = 0
crop_def.drop = {
items = {
{items = {'farming:cocoa_beans 2'}, rarity = 1},
{items = {'farming:cocoa_beans 1'}, rarity = 2},
+ {items = {'farming:cocoa_beans 1'}, rarity = 4},
}
}
-minetest.register_node("farming:cocoa_3", table.copy(crop_def))
+minetest.register_node("farming:cocoa_4", table.copy(crop_def))
-- add random cocoa pods to jungle tree's
minetest.register_on_generated(function(minp, maxp)
@@ -181,7 +186,7 @@ minetest.register_on_generated(function(minp, maxp)
--print ("Cocoa Pod added at " .. minetest.pos_to_string(pos))
minetest.swap_node(pos, {
- name = "farming:cocoa_" .. tostring(math.random(1, 3))
+ name = "farming:cocoa_" .. tostring(math.random(1, 4))
})
end