projects
/
zefram
/
minetest
/
pipeworks.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b0c56a
)
Try to fix old node breakers dropping items
author
Novatux
<nathanael.courant@laposte.net>
Sun, 8 Jun 2014 20:49:30 +0000
(22:49 +0200)
committer
Novatux
<nathanael.courant@laposte.net>
Sun, 8 Jun 2014 20:49:30 +0000
(22:49 +0200)
node_breaker.lua
patch
|
blob
|
history
diff --git
a/node_breaker.lua
b/node_breaker.lua
index b6eb8acbe8c7c0d6adae215058ad1868a7d09269..21c5194003edf082b4c0c94e4c79333122f14ddb 100644
(file)
--- a/
node_breaker.lua
+++ b/
node_breaker.lua
@@
-96,6
+96,12
@@
local function break_node (pos, facedir)
--end
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
+
+ if inv:get_size("ghost_pick") ~= 1 then -- Legacy code
+ inv:set_size("ghost_pick", 1)
+ inv:set_size("main", 100)
+ end
+
local pick_inv = "pick"
local pick = inv:get_stack("pick", 1)
if pick:is_empty() then