diff options
author | Auke Kok <sofar@foo-projects.org> | 2016-03-13 22:12:54 -0700 |
---|---|---|
committer | Auke Kok <sofar@foo-projects.org> | 2016-03-13 22:12:54 -0700 |
commit | 4f60a8144a723e0a9d80a39988db5bee024c18b9 (patch) | |
tree | 89c4e403e5b8a6ffd6f1852e0dc50b7642512d6b | |
parent | 77d00903ad964319b74e13503fcb1e3877c9768e (diff) |
Oops, nobody got any pumpkins?
Turns out I made pumkins not drop items when digging. Yikes.
Use after_dig_node() so drops are handled nicely.
-rw-r--r-- | pumpkin.lua | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/pumpkin.lua b/pumpkin.lua index cd35168..32d3d31 100644 --- a/pumpkin.lua +++ b/pumpkin.lua @@ -110,12 +110,11 @@ minetest.register_node("crops:pumpkin", { walkable = true, groups = { snappy=3, flammable=3, oddly_breakable_by_hand=2 }, paramtype2 = "facedir", - drop = {'crops:pumpkin'}, sounds = default.node_sound_wood_defaults({ dig = { name = "default_dig_oddly_breakable_by_hand" }, dug = { name = "default_dig_choppy" } }), - on_dig = function(pos, node, digger) + after_dig_node = function(pos, node) for face = 1, 4 do local s = { x = pos.x + faces[face].x, y = pos.y, z = pos.z + faces[face].z } local n = minetest.get_node(s) @@ -126,7 +125,6 @@ minetest.register_node("crops:pumpkin", { end end end - minetest.remove_node(pos) end }) |