From 4f60a8144a723e0a9d80a39988db5bee024c18b9 Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Sun, 13 Mar 2016 22:12:54 -0700 Subject: 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. --- pumpkin.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'pumpkin.lua') 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 }) -- cgit v1.2.3