Add message if no teleports nearby

master
Wuzzy 2020-09-08 19:44:32 +02:00
parent af08f7a1ad
commit 4c99a34881
1 changed files with 8 additions and 1 deletions

View File

@ -122,8 +122,15 @@ teleports.set_formspec = function(pos)
y = y + 1
end
local label
if buttons == "" then
label = S("No teleport in range!")
else
label = S("Go to available teleports! Use mossy cobblestone as fuel!")
end
meta:set_string("formspec", "size[8,9;]"
.."label[0,0;" .. F(S("Go to available teleports! Use mossy cobblestone as fuel!")) .. "]"
.."label[0,0;"..F(label).."]"
.."list[current_name;price;0,1;1,1;]"
..buttons
.."button_exit[1,4;2,0.5;cancel;"..F(S("Cancel")).."]"