From a638096ce3be7e591a9ca64cdab74cf42651ba22 Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Sat, 27 Dec 2014 19:33:22 +0100 Subject: [PATCH] Implementation of multiple buckets handler - Uncommented and changed a bit the lines of Casimir's redefinition of bucket:bucket_empty in ./minetestforfun_game/mods/bucket/init.lua to implement multiple buckets handle system, commented in an old commit (it was buggy, or something). The system has been modified a bit to prevent bugs from incompatibility between carbone's api (which the definition has been copied from) and minetestforfun_game's one. --- minetestforfun_game/mods/bucket/init.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/minetestforfun_game/mods/bucket/init.lua b/minetestforfun_game/mods/bucket/init.lua index daf19980..41bb3b49 100644 --- a/minetestforfun_game/mods/bucket/init.lua +++ b/minetestforfun_game/mods/bucket/init.lua @@ -135,11 +135,10 @@ minetest.register_craftitem(":bucket:bucket_empty", { -- Stacked buckets: add a filled bucket, replace stack. local inv = user:get_inventory() if inv:room_for_item("main", liquiddef.itemname) then - minetest.add_node(pointed_thing.under, {name="air"}) - --count = count - 1 - --itemstack:set_count(count) - return ItemStack(liquiddef.itemname) - --inv:add_item("main", bucket_liquid) + count = count - 1 + itemstack:set_count(count) + inv:add_item("main", liquiddef.itemname) + return ItemStack(itemstack) else minetest.chat_send_player(user:get_player_name(), "Your inventory is full.") end