1
0
mirror of https://github.com/mt-mods/unifieddyes.git synced 2024-12-25 02:00:27 +01:00

define on_use for default dyes

(forgot to include the overrides)
This commit is contained in:
Vanessa Ezekowitz 2017-02-25 16:45:57 -05:00
parent dcf9bf648f
commit 46a55946ef

View File

@ -709,7 +709,8 @@ for _, h in ipairs(unifieddyes.HUES_EXTENDED) do
local color = string.format("%02x", r2)..string.format("%02x", g2)..string.format("%02x", b2)
if minetest.registered_items["dye:"..val..hue] then
minetest.override_item("dye:"..val..hue, {
inventory_image = "unifieddyes_dye.png^[colorize:#"..color..":200"
inventory_image = "unifieddyes_dye.png^[colorize:#"..color..":200",
on_use = unifieddyes.on_use
})
else
minetest.register_craftitem(":dye:"..val..hue, {
@ -766,11 +767,13 @@ for y = 1, 14 do -- colors 0 and 15 are black and white, default dyes
end
minetest.override_item("dye:grey", {
inventory_image = "unifieddyes_dye.png^[colorize:#888888:200"
inventory_image = "unifieddyes_dye.png^[colorize:#888888:200",
on_use = unifieddyes.on_use
})
minetest.override_item("dye:dark_grey", {
inventory_image = "unifieddyes_dye.png^[colorize:#444444:200"
inventory_image = "unifieddyes_dye.png^[colorize:#444444:200",
on_use = unifieddyes.on_use
})
minetest.register_craftitem(":dye:light_grey", {