summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAuke Kok <auke-jan.h.kok@intel.com>2015-04-10 15:23:38 -0700
committerAuke Kok <auke-jan.h.kok@intel.com>2015-04-10 15:23:38 -0700
commit0073de68e759906948e33feb937657eace75c143 (patch)
tree67d71d98e56dfd99b69a15e11dc8a89b77326a6a
parent5da6b39eeb42124e81b07e11014542d1bdb325a9 (diff)
Melons: Place melons on their side.
Melons naturally grow on their side with stems attached, so place them on their side with stem to the plant. I've modified the textures to make them visually connect properly, and tuned the bottom texture a bit more to look like an actual melon bottom. Yes, I actually had a watermelon at my house and looked at it's rear end.
-rw-r--r--melon.lua11
-rw-r--r--textures/crops_melon_bottom.pngbin667 -> 725 bytes
-rw-r--r--textures/crops_melon_stem.pngbin680 -> 678 bytes
-rw-r--r--textures/crops_melon_top.pngbin628 -> 673 bytes
4 files changed, 6 insertions, 5 deletions
diff --git a/melon.lua b/melon.lua
index 214a1fa..52840c3 100644
--- a/melon.lua
+++ b/melon.lua
@@ -11,10 +11,10 @@ of the license, or (at your option) any later version.
--]]
local faces = {
- [1] = { x = -1, z = 0, r = 3, o = 1 } ,
- [2] = { x = 1, z = 0, r = 1, o = 3 } ,
- [3] = { x = 0, z = -1, r = 2, o = 0 } ,
- [4] = { x = 0, z = 1, r = 0, o = 2 }
+ [1] = { x = -1, z = 0, r = 3, o = 1, m = 14 },
+ [2] = { x = 1, z = 0, r = 1, o = 3, m = 16 },
+ [3] = { x = 0, z = -1, r = 2, o = 0, m = 5 },
+ [4] = { x = 0, z = 1, r = 0, o = 2, m = 11 }
}
local interval = 30
@@ -102,6 +102,7 @@ minetest.register_node("crops:melon", {
use_texture_alpha = false,
walkable = true,
groups = { snappy=3, flammable=3, oddly_breakable_by_hand=2 },
+ paramtype2 = "facedir",
drop = {max_items = 5, items = {
{ items = {'crops:melon_slice'}, rarity = 1 },
{ items = {'crops:melon_slice'}, rarity = 1 },
@@ -180,7 +181,7 @@ minetest.register_abm({
if minetest.registered_nodes[n.name].drawtype == "plantlike" or
minetest.registered_nodes[n.name].groups.flora == 1 or
n.name == "air" then
- minetest.set_node(t, {name = "crops:melon"})
+ minetest.set_node(t, {name = "crops:melon", param2 = faces[r].m})
minetest.set_node(pos, {name = "crops:melon_plant_5_attached", param2 = faces[r].r})
end
end
diff --git a/textures/crops_melon_bottom.png b/textures/crops_melon_bottom.png
index 572c1d0..020560c 100644
--- a/textures/crops_melon_bottom.png
+++ b/textures/crops_melon_bottom.png
Binary files differ
diff --git a/textures/crops_melon_stem.png b/textures/crops_melon_stem.png
index aff846b..e51fd95 100644
--- a/textures/crops_melon_stem.png
+++ b/textures/crops_melon_stem.png
Binary files differ
diff --git a/textures/crops_melon_top.png b/textures/crops_melon_top.png
index 796cb1b..9215931 100644
--- a/textures/crops_melon_top.png
+++ b/textures/crops_melon_top.png
Binary files differ