summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cocoa.lua17
-rw-r--r--init.lua6
-rw-r--r--textures/farming_cocoa_1.pngbin230 -> 230 bytes
-rw-r--r--textures/farming_cocoa_2.pngbin244 -> 238 bytes
-rw-r--r--textures/farming_cocoa_3.pngbin253 -> 446 bytes
-rw-r--r--textures/farming_cocoa_4.pngbin0 -> 253 bytes
6 files changed, 14 insertions, 9 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
diff --git a/init.lua b/init.lua
index 8a9165c..4faa222 100644
--- a/init.lua
+++ b/init.lua
@@ -211,7 +211,7 @@ local function reg_plant_stages(plant_name, stage, force_last)
end
-register_plant_node = function(node)
+local register_plant_node = function(node)
local plant_name, stage = plant_name_stage(node)
@@ -554,8 +554,8 @@ farming.register_plant = function(name, def)
waving = 1,
tiles = {mname .. "_" .. pname .. "_" .. i .. ".png"},
paramtype = "light",
- paramtype2 = def.paramtype2 or nil,
- place_param2 = def.place_param2 or nil,
+ paramtype2 = def.paramtype2,
+ place_param2 = def.place_param2,
walkable = false,
buildable_to = true,
drop = drop,
diff --git a/textures/farming_cocoa_1.png b/textures/farming_cocoa_1.png
index f887a1f..18fd362 100644
--- a/textures/farming_cocoa_1.png
+++ b/textures/farming_cocoa_1.png
Binary files differ
diff --git a/textures/farming_cocoa_2.png b/textures/farming_cocoa_2.png
index f0d3935..c304ee0 100644
--- a/textures/farming_cocoa_2.png
+++ b/textures/farming_cocoa_2.png
Binary files differ
diff --git a/textures/farming_cocoa_3.png b/textures/farming_cocoa_3.png
index 8eaf67e..d66b47d 100644
--- a/textures/farming_cocoa_3.png
+++ b/textures/farming_cocoa_3.png
Binary files differ
diff --git a/textures/farming_cocoa_4.png b/textures/farming_cocoa_4.png
new file mode 100644
index 0000000..990a8b4
--- /dev/null
+++ b/textures/farming_cocoa_4.png
Binary files differ