mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-11-18 00:08:25 +01:00
Fixed inhibition of buckets because of homedecor's overwrite
This commit is contained in:
parent
165a9e070f
commit
a32db0e243
@ -328,6 +328,7 @@ homedecor.register("well", {
|
|||||||
})
|
})
|
||||||
|
|
||||||
if minetest.get_modpath("bucket") then
|
if minetest.get_modpath("bucket") then
|
||||||
|
local original_bucket_on_use = minetest.registered_items["bucket:bucket_empty"].on_use
|
||||||
minetest.override_item("bucket:bucket_empty", {
|
minetest.override_item("bucket:bucket_empty", {
|
||||||
on_use = function(itemstack, user, pointed_thing)
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
local wielditem = user:get_wielded_item()
|
local wielditem = user:get_wielded_item()
|
||||||
@ -342,8 +343,10 @@ if minetest.get_modpath("bucket") then
|
|||||||
else
|
else
|
||||||
minetest.chat_send_player(user:get_player_name(), "No room in your inventory to add a filled bucket!")
|
minetest.chat_send_player(user:get_player_name(), "No room in your inventory to add a filled bucket!")
|
||||||
end
|
end
|
||||||
end
|
|
||||||
return wielditem
|
return wielditem
|
||||||
|
else
|
||||||
|
return original_bucket_on_use(itemstack, user, pointed_thing)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user