Singleplay restart button only after 30 seconds

master
stujones11 2019-05-27 21:03:28 +01:00
parent f688f8a61e
commit aef06c30dc
1 changed files with 2 additions and 1 deletions

View File

@ -115,7 +115,8 @@ function ui.update()
else
error_title = fgettext("An error occured:")
end
if core.settings:get("maintab_LAST") == "local" then
if core.settings:get("maintab_LAST") == "local" and
tonumber(core.settings:get("connect_time")) < os.time() - 30 then
restart_btn = "]button[6,4.6;3,0.5;btn_reconnect_no;" .. fgettext("Close") .. "]" ..
"button[3,4.6;3,0.5;btn_reconnect_yes;" .. fgettext("Restart") .. "]"
else