mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-07-04 13:47:12 -04:00
Fix register_liquid for mods and submods using same namespace
a fix allowing to use itemname with colon prefix when doing register_liquid
This commit is contained in:
parent
0351c66915
commit
dde7f13ac9
1 changed files with 5 additions and 0 deletions
|
@ -148,6 +148,11 @@ 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