Update craftguide error msgs

This commit is contained in:
Wuzzy 2017-06-08 21:36:23 +02:00
parent fe090c9a9e
commit bdddaf3429

View file

@ -301,9 +301,13 @@ function craftguide:get_formspec(player_name, is_fuel)
local xoffset = data.iX / 2 + (even_num and 0.5 or 0) + 2 local xoffset = data.iX / 2 + (even_num and 0.5 or 0) + 2
if not next(data.items) then if not next(data.items) then
formspec = formspec.. local msg = ""
"label["..(xoffset - (even_num and 1.5 or 1)).. if data.filter == "" then
",2;No item to show]" msg = "You don't know any crafting recipes yet.\nCollect some items and open the recipe book again."
else
msg = "No crafting recipes found.\nReset the search and try again."
end
formspec = formspec.."label[0,2;"..mt.formspec_escape(msg).."]"
end end
local first_item = (data.pagenum - 1) * ipp local first_item = (data.pagenum - 1) * ipp