From 1fde77283df977a162bd2dbfb5b570192ec25d5b Mon Sep 17 00:00:00 2001 From: the-real-herowl Date: Sat, 27 Apr 2024 21:21:16 +0200 Subject: [PATCH] Improved compat alias visual --- mods/ITEMS/mcl_potions/potions.lua | 14 +++++++++++--- textures/vl_unknown.png | Bin 0 -> 111 bytes 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 textures/vl_unknown.png diff --git a/mods/ITEMS/mcl_potions/potions.lua b/mods/ITEMS/mcl_potions/potions.lua index 545b11876..938fdde6e 100644 --- a/mods/ITEMS/mcl_potions/potions.lua +++ b/mods/ITEMS/mcl_potions/potions.lua @@ -855,10 +855,18 @@ local function replace_legacy_potion(itemstack) return new_stack end local compat = "mcl_potions:compat_potion" +local compat_arrow = "mcl_potions:compat_arrow" minetest.register_craftitem(compat, { description = S("Unknown Potion"), _tt_help = S("Right-click to identify"), - image = "mcl_potions_dragon_breath.png", + image = "mcl_potions_potion_overlay.png^[colorize:#00F:127^mcl_potions_potion_bottle.png^vl_unknown.png", + on_secondary_use = replace_legacy_potion, + on_place = replace_legacy_potion, +}) +minetest.register_craftitem(compat_arrow, { + description = S("Unknown Tipped Arrow"), + _tt_help = S("Right-click to identify"), + image = "mcl_bows_arrow_inv.png^(mcl_potions_arrow_inv.png^[colorize:#FFF:100)^vl_unknown.png", on_secondary_use = replace_legacy_potion, on_place = replace_legacy_potion, }) @@ -876,11 +884,11 @@ for _, name in pairs(old_potions_2) do minetest.register_alias("mcl_potions:" .. name .. "_2", compat) minetest.register_alias("mcl_potions:" .. name .. "_2_splash", compat) minetest.register_alias("mcl_potions:" .. name .. "_2_lingering", compat) - minetest.register_alias("mcl_potions:" .. name .. "_2_arrow", compat) + minetest.register_alias("mcl_potions:" .. name .. "_2_arrow", compat_arrow) end for _, name in pairs(old_potions_plus) do minetest.register_alias("mcl_potions:" .. name .. "_plus", compat) minetest.register_alias("mcl_potions:" .. name .. "_plus_splash", compat) minetest.register_alias("mcl_potions:" .. name .. "_plus_lingering", compat) - minetest.register_alias("mcl_potions:" .. name .. "_plus_arrow", compat) + minetest.register_alias("mcl_potions:" .. name .. "_plus_arrow", compat_arrow) end diff --git a/textures/vl_unknown.png b/textures/vl_unknown.png new file mode 100644 index 0000000000000000000000000000000000000000..279a4cdb076afa6aa029f2e732fcddb712c8f892 GIT binary patch literal 111 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`W}YsNAr_~T6Be-k;CH!Ua8s(& zsAGasQ=7nRpGA9(EqE0)-Bv7`xn@hld4^wX5}^kUs7oa=FzA$IPCvikBs0(i22WQ% Jmvv4FO#o^^A|L<& literal 0 HcmV?d00001