Add proper short_description to enchanted tools

This commit is contained in:
Wuzzy 2023-06-30 14:17:51 +02:00
parent b4b04c4330
commit bfc0637c82
5 changed files with 15 additions and 9 deletions

View File

@ -51,7 +51,8 @@ Bronze=
Diamond=
Durability=
Efficiency=
Enchanted @1 @2 @3=
Enchanted @1 @2=
Enchanted @1 @2@n@3=
Enchantment Table=
Mese=
Pickaxe=

View File

@ -49,7 +49,8 @@ Bronze=Bronze
Diamond=Diamant
Durability=Haltbarkeit
Efficiency=Effizienz
Enchanted @1 @2 @3=verzauberte(s) @1@2 @3
Enchanted @1 @2=@1@2 (verzaubert)
Enchanted @1 @2@n@3=@1@2 (verzaubert)@n@3
Enchantment Table=Zaubertisch
Mese=Mese
Pickaxe=spitzhacke

View File

@ -51,7 +51,8 @@ Bronze=Bronze
Diamond=Diamant
Durability=Durabilité
Efficiency=Efficacité
Enchanted @1 @2 @3=@2 en @1 enchantée @3
Enchanted @1 @2=@2 en @1 enchantée
Enchanted @1 @2@n@3=@2 en @1 enchantée@n@3
Enchantment Table=Table denchantements
Mese=Mese
Pickaxe=Pioche

View File

@ -51,7 +51,8 @@ Bronze=Bronzo
Diamond=Diamante
Durability=Durabilità
Efficiency=Efficacia
Enchanted @1 @2 @3=@2 su @1 incantesimo @3
Enchanted @1 @2=@2 su @1 incantesimo
Enchanted @1 @2@n@3=@2 su @1 incantesimo@n@3
Enchantment Table=Tavolo per migliorie
Mese=Mese
Pickaxe=Piccone

View File

@ -53,8 +53,8 @@ function enchanting:get_tooltip(enchant, orig_caps, fleshy)
}
return minetest.colorize and minetest.colorize(specs[enchant][1],
"\n" .. enchant_loc[enchant] .. specs[enchant][2]) or
"\n" .. enchant_loc[enchant] .. specs[enchant][2]
enchant_loc[enchant] .. specs[enchant][2]) or
enchant_loc[enchant] .. specs[enchant][2]
end
local enchant_buttons = {
@ -295,10 +295,12 @@ function enchanting:register_tools(mod, def)
fleshy = fleshy + enchanting.damages
end
local arg1 = def.material_desc[material] or cap(material)
local arg2 = def.tools[tool].desc or cap(tool)
local arg3 = self:get_tooltip(enchant, original_groupcaps[group], fleshy)
minetest.register_tool(":" .. mod .. ":enchanted_" .. tool .. "_" .. material .. "_" .. enchant, {
description = S("Enchanted @1 @2 @3",
def.material_desc[material] or cap(material), def.tools[tool].desc or cap(tool),
self:get_tooltip(enchant, original_groupcaps[group], fleshy)),
description = S("Enchanted @1 @2\n@3", arg1, arg2, arg3),
short_description = S("Enchanted @1 @2", arg1, arg2),
inventory_image = original_tool.inventory_image .. "^[colorize:violet:50",
wield_image = original_tool.wield_image,
groups = {not_in_creative_inventory = 1},