1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-09-28 23:40:34 +02:00

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.
This commit is contained in:
LeMagnesium 2014-12-27 19:33:22 +01:00
parent 5af89270ec
commit a638096ce3

View File

@ -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