Skip to content
Snippets Groups Projects
Commit a508a3e0 authored by DarkGod's avatar DarkGod
Browse files

frell me

parent f3ee1edd
No related branches found
No related tags found
No related merge requests found
......@@ -85,12 +85,20 @@ disable_all_connectivity = true
upload_charsheet = true
upgrades { v1_0_5=true }
]]
local loaded_config_files = {}
for i, file in ipairs(fs.list("/settings/")) do
if file:find(".cfg$") then
config.load("/settings/"..file)
loaded_config_files[file] = true
end
end
-- Keep the same setting when upgrading
-- What a FRELLING MESS
if not loaded_config_files["disable_all_connectivity.cfg"] and not config.settings.firstrun_gdpr then
config.settings.disable_all_connectivity = false
end
if config.settings.disable_all_connectivity then
core.game.disableConnectivity()
local function void(t) for _, k in ipairs(table.keys(t)) do t[k] = nil end end
......
......@@ -559,7 +559,7 @@ You will also have a user page on #LIGHT_BLUE#https://te4.org/#LAST# to show off
This is all optional, you are not forced to use this feature at all, but the developer would thank you if you did as it will make balancing easier.]]
function _M:checkFirstTime()
if not profile.generic.firstrun and not core.steam then
if not profile.generic.firstrun then
local d = require("mod.dialogs.FirstRun").new(profile_help_text)
local mm = self.dialogs[#self.dialogs]
self:unregisterDialog(mm)
......@@ -570,11 +570,18 @@ end
function _M:checkBootLoginRegister()
if __module_extra_info.boot_and_register then
local dialogdef = {}
dialogdef.fct = function(login) self:setPlayerLogin(login) end
dialogdef.name = "creation"
dialogdef.justlogin = false
game:registerDialog(require('mod.dialogs.ProfileLogin').new(dialogdef, game.profile_help_text))
if core.steam then
local mm = self.dialogs[#self.dialogs]
if mm and mm:isClassName("mod.dialogs.MainMenu") then
mm:loginSteam()
end
else
local dialogdef = {}
dialogdef.fct = function(login) self:setPlayerLogin(login) end
dialogdef.name = "creation"
dialogdef.justlogin = false
game:registerDialog(require('mod.dialogs.ProfileLogin').new(dialogdef, game.profile_help_text))
end
end
end
......
......@@ -27,7 +27,7 @@ local Textzone = require "engine.ui.Textzone"
module(..., package.seeall, class.inherit(Dialog))
function _M:init()
Dialog.init(self, "Steam User Account", 500, 400)
Dialog.init(self, "Steam User Account", math.min(800, game.w * 0.9), 400)
self.alpha = 230
self.c_desc = Textzone.new{width=math.floor(self.iw - 10), auto_height=true, text=[[Welcome to #GOLD#Tales of Maj'Eyal#LAST#.
......@@ -43,8 +43,8 @@ Luckily this is very easy to do: you only require a profile name and optionally
self.c_login = Textbox.new{title="Username: ", text="", chars=30, max_len=20, fct=function(text) self:okclick() end}
self.c_email = Textbox.new{title="Email: ", size_title=self.c_login.title, text="", chars=30, max_len=60, fct=function(text) self:okclick() end}
self.c_news = Checkbox.new{title="Accept to receive #{bold}#very infrequent#{normal}# (a few per year) mails", default=false, fct=function() self:okclick() end}
self.c_news2 = Textzone.new{text="about important game events from us.", width=self.iw - 20, auto_height=true}
self.c_news = Checkbox.new{title="Accept to receive #{bold}#very infrequent#{normal}# (a few per year) mails about important game events from us.", default=false, fct=function() self:okclick() end}
self.c_age = Checkbox.new{title="You at least 16 years old, or have parental authorization to play the game.", default=false, fct=function() self:okclick() end}
local ok = require("engine.ui.Button").new{text="Register", fct=function() self:okclick() end}
local cancel = require("engine.ui.Button").new{text="Cancel", fct=function() self:cancelclick() end}
local privacy = require("engine.ui.Button").new{text="Privacy Policy (opens in browser)", fct=function() self:privacypolicy() end}
......@@ -53,7 +53,7 @@ Luckily this is very easy to do: you only require a profile name and optionally
{left=0, top=self.c_desc.h, ui=self.c_login},
{left=0, top=self.c_desc.h+self.c_login.h+5, ui=self.c_email},
{left=0, top=self.c_desc.h+self.c_login.h+self.c_email.h+5, ui=self.c_news},
{left=0, top=self.c_desc.h+self.c_login.h+self.c_email.h+self.c_news.h+5, ui=self.c_news2},
{left=0, top=self.c_desc.h+self.c_login.h+self.c_email.h+self.c_news.h+5, ui=self.c_age},
{left=0, bottom=0, ui=ok},
{right=0, bottom=0, ui=cancel},
{hcenter=0, bottom=0, ui=privacy},
......@@ -76,7 +76,11 @@ function _M:okclick()
self:simplePopup("Email", "Your email does not look right.")
return
end
if not self.c_age.checked then
self:simplePopup("Age Check", "You need to be 16 years old or more or to have parental authorization to play this game.")
return
end
local d = self:simpleWaiter("Registering...", "Registering on https://te4.org/, please wait...") core.display.forceRedraw()
d:timeout(30, function() Dialog:simplePopup("Steam", "Steam client not found.") end)
core.steam.sessionTicket(function(ticket)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment