Fix tooltip for replacements

This commit is contained in:
Jean-Patrick Guerrero 2019-09-10 12:37:39 +02:00
parent fc3f1fece2
commit 84795a6523
3 changed files with 13 additions and 2 deletions

View File

@ -466,8 +466,15 @@ local function get_tooltip(item, info)
if info.replace then
local def = reg_items[info.replace]
tooltip = add(S("Replaced by @1 on crafting",
clrz("yellow", get_desc(def, info.replace))))
local desc = clrz("yellow", get_desc(def, info.replace))
if info.cooktime then
tooltip = add(S("Replaced by @1 on smelting", desc))
elseif info.burntime then
tooltip = add(S("Replaced by @1 on burning", desc))
else
tooltip = add(S("Replaced by @1 on crafting", desc))
end
end
return fmt("tooltip[%s;%s]", item, ESC(tooltip))

View File

@ -6,6 +6,8 @@ Usage @1 of @2=Usage @1 de @2
Recipe @1 of @2=Recette @1 de @2
Burning time: @1=Temps de combustion : @1
Cooking time: @1=Temps de cuisson : @1
Replaced by @1 on smelting=Remplacé par @1 lors de la cuisson
Replaced by @1 on burning=Remplacé par @1 lors de la combustion
Replaced by @1 on crafting=Remplacé par @1 lors de la fabrication
This tool cannot be repaired=Cet outil ne peut être réparé
Any item belonging to the group(s): @1=Tout item appartenant au(x) groupe(s) : @1

View File

@ -7,6 +7,8 @@ Usage @1 of @2=
Recipe @1 of @2=
Burning time: @1=
Cooking time: @1=
Replaced by @1 on smelting=
Replaced by @1 on burning=
Replaced by @1 on crafting=
This tool cannot be repaired=
Any item belonging to the group(s): @1=