Add notice when only minimal is installed

This commit is contained in:
rubenwardy 2014-10-16 19:23:02 +01:00 committed by kwolekr
parent 4a3592ff9a
commit 9bb6648f26
2 changed files with 11 additions and 1 deletions

@ -63,6 +63,16 @@ local function create_world_formspec(dialogdata)
"button[5,5.5;2.6,0.5;world_create_confirm;" .. fgettext("Create") .. "]" .. "button[5,5.5;2.6,0.5;world_create_confirm;" .. fgettext("Create") .. "]" ..
"button[7.5,5.5;2.8,0.5;world_create_cancel;" .. fgettext("Cancel") .. "]" "button[7.5,5.5;2.8,0.5;world_create_cancel;" .. fgettext("Cancel") .. "]"
if #gamemgr.games == 0 then
retval = retval .. "box[2,4;8,1;#ff8800]label[2.25,4;" ..
fgettext("You have no subgames installed.") .. "]label[2.25,4.4;" ..
fgettext("Download one from minetest.net") .. "]"
elseif #gamemgr.games == 1 and gamemgr.games[1].id == "minimal" then
retval = retval .. "box[1.75,4;8.7,1;#ff8800]label[2,4;" ..
fgettext("Warning: The minimal development test is meant for developers.") .. "]label[2,4.4;" ..
fgettext("Download a subgame, such as minetest_game, from minetest.net") .. "]"
end
return retval return retval
end end

@ -68,7 +68,7 @@ end
function gamemgr.gamelist() function gamemgr.gamelist()
local retval = "" local retval = ""
if #gamemgr.games > 0 then if #gamemgr.games > 0 then
retval = retval .. gamemgr.games[1].id retval = retval .. gamemgr.games[1].name
for i=2,#gamemgr.games,1 do for i=2,#gamemgr.games,1 do
retval = retval .. "," .. gamemgr.games[i].name retval = retval .. "," .. gamemgr.games[i].name