giving_back = "bucket:bucket_empty" in register_full_bucket

master
daretmavi 2021-01-10 18:31:08 +01:00
parent 1f5e60aef7
commit c92224210c
2 changed files with 7 additions and 0 deletions

View File

@ -7,6 +7,8 @@ Added settings:
Some code cleanup
giving_back = "bucket:bucket_empty" in register_full_bucket as fallback
--------------------------------------------------
Ver. 4.1 [20.12.2020]

View File

@ -152,10 +152,15 @@ end
-- force_renew = (optional) bool. Force the liquid source to renew if it has a
-- source neighbour, even if defined as 'liquid_renewable = false'.
-- Needed to avoid creating holes in sloping rivers.
-- giving_back = (NEW) defines the bucket to return
-- This function can be called from any mod (that depends on bucket).
local function register_full_bucket(source, flowing, itemname, inventory_image, name,
groups, force_renew, giving_back)
-- for compatibility - if not defined, then default empty bucket is used
if giving_back == nil then
giving_back = "bucket:bucket_empty"
end
minetest.register_craftitem(itemname, {
description = name,
inventory_image = inventory_image,