make it game agnostic

This commit is contained in:
unknown 2022-02-22 22:15:16 -05:00
parent 62526b9a3b
commit 934ac7180b
2 changed files with 14 additions and 12 deletions

View File

@ -87,19 +87,21 @@ for y = 1, 14 do -- colors 0 and 15 are black and white, default dyes
end
end
minetest.override_item("dye:grey", {
inventory_image = "unifieddyes_dye.png^[colorize:#888888:200",
})
if minetest.get_modpath("dye") then
minetest.override_item("dye:grey", {
inventory_image = "unifieddyes_dye.png^[colorize:#888888:200",
})
minetest.override_item("dye:dark_grey", {
inventory_image = "unifieddyes_dye.png^[colorize:#444444:200",
})
minetest.override_item("dye:dark_grey", {
inventory_image = "unifieddyes_dye.png^[colorize:#444444:200",
})
minetest.register_craftitem(":dye:light_grey", {
description = S("Light grey Dye"),
inventory_image = "unifieddyes_dye.png^[colorize:#cccccc:200",
groups = { dye=1, not_in_creative_inventory=1 },
})
minetest.register_craftitem(":dye:light_grey", {
description = S("Light grey Dye"),
inventory_image = "unifieddyes_dye.png^[colorize:#cccccc:200",
groups = { dye=1, not_in_creative_inventory=1 },
})
end
-- build a table of color <-> palette associations to reduce the need for
-- realtime lookups with getpaletteidx()

View File

@ -1,4 +1,4 @@
name = unifieddyes
description = Unified Dyes expands the standard dye set from 15 to 90 colors.
depends = default, dye, basic_materials
optional_depends = default, dye, basic_materials
min_minetest_version = 5.2.0