mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-07-04 05:37:13 -04:00
change implementation of fix
corrected stored itemname as soon registter_craftitem is called
This commit is contained in:
parent
dde7f13ac9
commit
312f499325
1 changed files with 4 additions and 5 deletions
|
@ -116,6 +116,10 @@ function bucket.register_liquid(source, flowing, itemname, inventory_image, name
|
|||
return ItemStack("bucket:bucket_empty")
|
||||
end
|
||||
})
|
||||
if itemname:sub(1,1) == ":" then
|
||||
-- If the itemname starts with a colon, correct that
|
||||
bucket.liquids[source]["itemname"] = itemname:sub(2)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -148,11 +152,6 @@ minetest.register_craftitem("bucket:bucket_empty", {
|
|||
|
||||
-- default set to return filled bucket
|
||||
local giving_back = liquiddef.itemname
|
||||
if giving_back:sub(1,1) == ":" then
|
||||
--overwrite with removed prepending colon if present in itemname
|
||||
--for cases where mods and submods use the same namespace
|
||||
giving_back = giving_back:sub(2)
|
||||
end
|
||||
|
||||
-- check if holding more than 1 empty bucket
|
||||
if item_count > 1 then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue