mirror of
https://git.minetest.land/Mineclonia/Mineclonia.git
synced 2024-11-28 13:23:00 +00:00
Better grammar for group tooltips in craftguide
This commit is contained in:
parent
0bde9d73ab
commit
c054915521
1 changed files with 9 additions and 4 deletions
|
@ -67,12 +67,17 @@ function craftguide:get_tooltip(item, recipe_type, cooktime, groups)
|
||||||
return tooltip.."Unknown Item ("..item..")]"
|
return tooltip.."Unknown Item ("..item..")]"
|
||||||
end
|
end
|
||||||
if groups then
|
if groups then
|
||||||
local groupstr = "Any item belonging to the "
|
local groupstr
|
||||||
for i=1, #groups do
|
if #groups == 1 then
|
||||||
groupstr = groupstr..colorize(groups[i])..
|
groupstr = "Any item belonging to the " .. colorize(groups[1]) .. " group"
|
||||||
|
else
|
||||||
|
groupstr = "Any item belonging to the following groups: "
|
||||||
|
for i=1, #groups do
|
||||||
|
groupstr = groupstr .. colorize(groups[i])..
|
||||||
(groups[i+1] and " and " or "")
|
(groups[i+1] and " and " or "")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
tooltip = tooltip..groupstr.." group(s)"
|
tooltip = tooltip..groupstr
|
||||||
end
|
end
|
||||||
if recipe_type == "cooking" then
|
if recipe_type == "cooking" then
|
||||||
tooltip = tooltip..item_desc.."\nCooking time: "..
|
tooltip = tooltip..item_desc.."\nCooking time: "..
|
||||||
|
|
Loading…
Reference in a new issue