diff options
author | Novatux <nathanael.courant@laposte.net> | 2014-06-08 22:49:30 +0200 |
---|---|---|
committer | Novatux <nathanael.courant@laposte.net> | 2014-06-08 22:49:30 +0200 |
commit | 5ab329285c38ca7b10142c1ec77276ce73e6293f (patch) | |
tree | fb47c34172bec0f167cd1e490f9cf27934ced31c | |
parent | 8b0c56ad0826874107dbc83be8fc156fe4703b6e (diff) | |
download | pipeworks-5ab329285c38ca7b10142c1ec77276ce73e6293f.tar pipeworks-5ab329285c38ca7b10142c1ec77276ce73e6293f.tar.gz pipeworks-5ab329285c38ca7b10142c1ec77276ce73e6293f.tar.bz2 pipeworks-5ab329285c38ca7b10142c1ec77276ce73e6293f.tar.xz pipeworks-5ab329285c38ca7b10142c1ec77276ce73e6293f.zip |
Try to fix old node breakers dropping items
-rw-r--r-- | node_breaker.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/node_breaker.lua b/node_breaker.lua index b6eb8ac..21c5194 100644 --- 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 |