mirror of
https://github.com/mt-mods/unifieddyes.git
synced 2024-11-26 09:23:47 +01:00
fix several dye-handling bugs
This commit is contained in:
parent
aeb179a129
commit
2fcae9d17d
6
init.lua
6
init.lua
@ -221,8 +221,10 @@ function unifieddyes.after_dig_node(pos, oldnode, oldmetadata, digger)
|
|||||||
if oldmetadata and oldmetadata.fields then
|
if oldmetadata and oldmetadata.fields then
|
||||||
prevdye = oldmetadata.fields.dye
|
prevdye = oldmetadata.fields.dye
|
||||||
end
|
end
|
||||||
if not creative_mode and prevdye and minetest.registered_items[prevdye] then
|
|
||||||
local inv = digger:get_inventory()
|
local inv = digger:get_inventory()
|
||||||
|
|
||||||
|
if prevdye and not (inv:contains_item("main", prevdye) and creative_mode) and minetest.registered_items[prevdye] then
|
||||||
if inv:room_for_item("main", prevdye) then
|
if inv:room_for_item("main", prevdye) then
|
||||||
inv:add_item("main", prevdye)
|
inv:add_item("main", prevdye)
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user