1
0
Fork 0

Improved compat alias visual

This commit is contained in:
the-real-herowl 2024-04-27 21:21:16 +02:00
parent 651fb74be1
commit 551bc99517
2 changed files with 11 additions and 3 deletions

View File

@ -855,10 +855,18 @@ local function replace_legacy_potion(itemstack)
return new_stack return new_stack
end end
local compat = "mcl_potions:compat_potion" local compat = "mcl_potions:compat_potion"
local compat_arrow = "mcl_potions:compat_arrow"
minetest.register_craftitem(compat, { minetest.register_craftitem(compat, {
description = S("Unknown Potion"), description = S("Unknown Potion"),
_tt_help = S("Right-click to identify"), _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_secondary_use = replace_legacy_potion,
on_place = 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", compat)
minetest.register_alias("mcl_potions:" .. name .. "_2_splash", 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_lingering", compat)
minetest.register_alias("mcl_potions:" .. name .. "_2_arrow", compat) minetest.register_alias("mcl_potions:" .. name .. "_2_arrow", compat_arrow)
end end
for _, name in pairs(old_potions_plus) do for _, name in pairs(old_potions_plus) do
minetest.register_alias("mcl_potions:" .. name .. "_plus", compat) minetest.register_alias("mcl_potions:" .. name .. "_plus", compat)
minetest.register_alias("mcl_potions:" .. name .. "_plus_splash", 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_lingering", compat)
minetest.register_alias("mcl_potions:" .. name .. "_plus_arrow", compat) minetest.register_alias("mcl_potions:" .. name .. "_plus_arrow", compat_arrow)
end end

BIN
textures/vl_unknown.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 B