Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • amagad/t-engine4
  • HirumaKai/t-engine4
  • Hogulus/t-engine4
  • Inkie/t-engine4
  • Liberty/t-engine4
  • Lokean/t-engine4
  • Mawootad/t-engine4
  • Michelle/t-engine4
  • MrFrog/t-engine4
  • Nagyhal/t-engine4
  • Recaiden/t-engine4
  • RootOfAllThings/t-engine4
  • Sebsebeleb/t-engine4
  • Sheila/t-engine4
  • Shibari/t-engine4
  • Stof/t-engine4
  • Umbral/t-engine4
  • tome/t-engine4
  • 0player/t-engine4
  • BreezyIdiot/t-engine4
  • Bunny/t-engine4
  • Effigy/t-engine4
  • Hachem_Muche/t-engine4
  • razakai/t-engine4
  • Zireael/t-engine4
  • cinornu/t-engine4
  • edge2054/t-engine4
  • gordaxx727/t-engine4
  • grayswandir/t-engine4
  • helminthauge/t-engine4
  • housepet/t-engine4
  • minqmay/t-engine4
  • nsrr/t-engine4
  • orange/t-engine4
  • otowakotori/t-engine4
  • purequestion/t-engine4
  • rexorcorum/t-engine4
  • rgeens/t-engine4
  • sageacrin/t-engine4
  • stuntofthelitter/t-engine4
  • tiger_eye/t-engine4
  • xelivous/t-engine4
  • yutio888/t-engine4
43 results
Show changes
Commits on Source (56)
Showing
with 85 additions and 47 deletions
game/engines/default/data/gfx/background/tome-logo.png

197 KiB | W: 0px | H: 0px

game/engines/default/data/gfx/background/tome-logo.png

211 KiB | W: 0px | H: 0px

game/engines/default/data/gfx/background/tome-logo.png
game/engines/default/data/gfx/background/tome-logo.png
game/engines/default/data/gfx/background/tome-logo.png
game/engines/default/data/gfx/background/tome-logo.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -386,10 +386,11 @@ function _M:performlogin(login, pass)
end
end
function _M:performloginSteam(token, name, email)
function _M:performloginSteam(token, name, email, news)
self.steam_token = token
self.steam_token_name = name
if email then self.steam_token_email = email end
if news ~= nil then self.steam_token_news = news end
print("[ONLINE PROFILE] attempting log in steam", token)
self.auth_tried = nil
self:tryAuth()
......@@ -579,7 +580,7 @@ function _M:tryAuth()
print("[ONLINE PROFILE] auth")
self.auth_last_error = nil
if self.steam_token then
core.profile.pushOrder(table.serialize{o="SteamLogin", token=self.steam_token, name=self.steam_token_name, email=self.steam_token_email})
core.profile.pushOrder(table.serialize{o="SteamLogin", token=self.steam_token, name=self.steam_token_name, email=self.steam_token_email, news=self.steam_token_news})
else
core.profile.pushOrder(table.serialize{o="Login", l=self.login, p=self.pass})
end
......@@ -755,7 +756,7 @@ end
function _M:registerNewCharacter(module)
if not self.auth or not self.hash_valid then return end
local dialog = Dialog:simpleWaiter("Registering character", "Character is being registered on http://te4.org/")
local dialog = Dialog:simpleWaiter("Registering character", "Character is being registered on https://te4.org/")
core.display.forceRedraw()
core.profile.pushOrder(table.serialize{o="RegisterNewCharacter", module=module})
......@@ -861,10 +862,10 @@ function _M:currentCharacter(module, title, uuid)
print("[ONLINE PROFILE] current character ", title)
end
function _M:newProfile(Login, Name, Password, Email)
print("[ONLINE PROFILE] profile options ", Login, Email, Name)
function _M:newProfile(Login, Name, Password, Email, Newsletter)
print("[ONLINE PROFILE] profile options ", Login, Email, Name, Newsletter)
core.profile.pushOrder(table.serialize{o="NewProfile2", login=Login, email=Email, name=Name, pass=Password})
core.profile.pushOrder(table.serialize{o="NewProfile2", login=Login, email=Email, name=Name, pass=Password, newsletter=Newsletter and 'yes' or 'no'})
local id = nil
local reason = nil
self:waitEvent("NewProfile2", function(e) id = e.uid reason = e.reason end)
......
......@@ -123,6 +123,11 @@ function _M:getFragment(name)
code[#code+1] = l
end
f:close()
-- if config.settings.cheat then
-- print("====== FRAG")
-- local nb = 1 for line in table.concat(code):gmatch("([^\n]*)\n") do print(nb, line) nb = nb + 1 end
-- print("======")
-- end
self.frags[name] = core.shader.newShader(table.concat(code))
print("[SHADER] created fragment shader from /data/gfx/shaders/"..name..".frag")
return self.frags[name]
......@@ -139,6 +144,11 @@ function _M:getVertex(name)
code[#code+1] = l
end
f:close()
-- if config.settings.cheat then
-- print("====== VERT")
-- local nb = 1 for line in table.concat(code):gmatch("([^\n]*)\n") do print(nb, line) nb = nb + 1 end
-- print("======")
-- end
self.verts[name] = core.shader.newShader(table.concat(code), true)
print("[SHADER] created vertex shader from /data/gfx/shaders/"..name..".vert")
return self.verts[name]
......
......@@ -1107,6 +1107,9 @@ function _M:newLevel(level_data, lev, old_lev, game)
-- Delete the room_map if it's no longer needed
if not self._retain_level_room_map then map.room_map = nil end
-- Call a "post" finisher
if level_data.post_process_end then level_data.post_process_end(level, self) end
return level
end
......
......@@ -36,6 +36,7 @@ function _M:init(chat, id, width)
self.chat = chat
self.npc = chat.npc
self.player = chat.player
self.no_offscreen = "bottom"
Dialog.init(self, self.npc.name, width or 500, 400)
local xoff = 0
......
......@@ -36,7 +36,7 @@ function _M:init(t)
if fs.exists(self.dest) then
self.dest = fs.getRealPath(self.dest)
else
local _, _, dir, name = self.dest:find("(.+)/([^/]+)$")
local _, _, dir, name = self.dest:find("(.+/)([^/]+)$")
if dir then
self.dest = fs.getRealPath(dir)..fs.getPathSeparator()..name
end
......
......@@ -191,7 +191,6 @@ function _M:generate(lev, old_lev)
break
end
end
local r = self:roomAlloc(rroom, #rooms+1, lev, old_lev)
if r then nb_room = nb_room -1 end
tries = tries - 1
......
......@@ -576,7 +576,7 @@ function _M:roomCheck(room, zone, level, map)
end
end
if room.roomcheck then
local check, failure = room.roomcheck(room, zone, level, map)
local check, failure = room.roomcheck(room, zone, level, map, self)
if not check then
print("[RoomsLoader:roomCheck] ", room.name, " rejected by roomcheck function:", failure)
return false, failure or "roomcheck function"
......@@ -669,7 +669,7 @@ function _M:roomPlace(room, id, x, y)
self.map.room_map.rooms[#self.map.room_map.rooms+1] = ret -- update the rooms list
if room.onplace then -- perform any post placement actions
room.onplace(room, self.zone, self.level, self.map, ret)
room.onplace(room, self.zone, self.level, self.map, ret, self)
end
return ret
......
......@@ -815,6 +815,9 @@ function _M:updateTalentTypeMastery(tt)
end
end
end
if self.talents_types_def[tt] and self.talents_types_def[tt].on_mastery_change then
self.talents_types_def[tt].on_mastery_change(self, self:getTalentTypeMastery(tt), tt)
end
end
--- Return talent definition from id
......@@ -891,7 +894,7 @@ end
--- Is talent in cooldown?
function _M:isTalentCoolingDown(t)
t = self:getTalentFromId(t)
if not t.cooldown then return false end
if not t or not t.cooldown then return false end
if self.talents_cd[t.id] and self.talents_cd[t.id] > 0 then return self.talents_cd[t.id] else return false end
end
......
......@@ -524,11 +524,13 @@ function _M:loadUI(t)
end
function _M:setupUI(resizex, resizey, on_resize, addmw, addmh)
local gamew, gameh = core.display.size()
local mw, mh = nil, nil
local padding = 3 -- to not glue stuff to each other
-- resizex, resizey = true, true
local nw, nh
if resizex or resizey then
mw, mh = 0, 0
local addw, addh = 0, 0
......@@ -560,11 +562,20 @@ function _M:setupUI(resizex, resizey, on_resize, addmw, addmh)
mh = mh + addh + 5 + 22 + 3 + (addmh or 0) + th + padding
if on_resize then on_resize(resizex and mw or self.w, resizey and mh or self.h) end
self:resize(resizex and mw or self.w, resizey and mh or self.h)
nw, nh = resizex and mw or self.w, resizey and mh or self.h
else
if on_resize then on_resize(self.w, self.h) end
self:resize(self.w, self.h)
nw, nh = self.w, self.h
end
local disx = math.floor(self.force_x or (gamew - nw) / 2)
local disy = math.floor(self.force_y or (gameh - nh) / 2)
if self.no_offscreen == "bottom" then if disy + nh >= gameh then self.force_y = gameh - nh end
elseif self.no_offscreen == "top" then if disy + nh < 0 then self.force_y = 0 end
elseif self.no_offscreen == "right" then if disx + nw >= gamew then self.force_x = gamew - nw end
elseif self.no_offscreen == "left" then if disx + nw < 0 then self.force_x = 0 end
end
self:resize(nw, nh)
for i, ui in ipairs(self.uis) do
local ux, uy
......
......@@ -38,7 +38,7 @@ function _M:init(t)
self.custom_calls = t.custom_calls or {}
if self.allow_login == nil then self.allow_login = true end
if self.allow_login and self.url:find("^http://te4%.org/") and profile.auth then
if self.allow_login and (self.url:find("^http://te4%.org/") or self.url:find("^https://te4%.org/")) and profile.auth then
local param = "_te4ah="..profile.auth.hash.."&_te4ad="..profile.auth.drupid
local first = self.url:find("?", 1, 1)
......@@ -46,7 +46,7 @@ function _M:init(t)
else self.url = self.url.."?"..param end
end
if self.url:find("^http://te4%.org/") then
if self.url:find("^http://te4%.org/") or self.url:find("^https://te4%.org/") then
local param = "_te4"
local first = self.url:find("?", 1, 1)
......@@ -187,7 +187,7 @@ function _M:onDownload(handlers)
local Dialog = require "engine.ui.Dialog"
handlers.on_download_request = function(downid, url, file, mime)
if mime == "application/t-engine-addon" and self.allow_downloads.addons and url:find("^http://te4%.org/") then
if mime == "application/t-engine-addon" and self.allow_downloads.addons and (url:find("^http://te4%.org/") or url:find("^https://te4%.org/")) then
local path = fs.getRealPath("/addons/")
if path then
local name = file
......@@ -205,7 +205,7 @@ function _M:onDownload(handlers)
end)
return
end
elseif mime == "application/t-engine-module" and self.allow_downloads.modules and url:find("^http://te4%.org/") then
elseif mime == "application/t-engine-module" and self.allow_downloads.modules and (url:find("^http://te4%.org/") or url:find("^https://te4%.org/")) then
local path = fs.getRealPath("/modules/")
if path then
local name = file
......
......@@ -21,7 +21,7 @@
-- Where values are {major, minor, patch, engine_name, c_core}
-- @script engine.version
engine.version = {1,5,0,"te4",17}
engine.version = {1,5,3,"te4",17}
engine.require_c_core = engine.version[5]
engine.version_id = ("%s-%d_%d.%d.%d"):format(engine.version[4], engine.require_c_core, engine.version[1], engine.version[2], engine.version[3])
......
......@@ -101,7 +101,7 @@ end
function _M:makeWebtooltip()
self.webtooltip = require("engine.ui.WebView").new{width=380, height=500, has_frame=true, never_clean=true, allow_popup=true,
url = ("http://te4.org/tooltip-ingame?steam=%d&vM=%d&vm=%d&vp=%d"):format(core.steam and 1 or 0, engine.version[1], engine.version[2], engine.version[3])
url = ("https://te4.org/tooltip-ingame?steam=%d&vM=%d&vm=%d&vp=%d"):format(core.steam and 1 or 0, engine.version[1], engine.version[2], engine.version[3])
}
if self.webtooltip.unusable then
self.webtooltip = nil
......@@ -153,7 +153,7 @@ function _M:run()
if not self.news then
self.news = {
title = "Welcome to T-Engine and the Tales of Maj'Eyal",
text = [[#GOLD#"Tales of Maj'Eyal"#WHITE# is the main game, you can also install more addons or modules by by going to http://te4.org/
text = [[#GOLD#"Tales of Maj'Eyal"#WHITE# is the main game, you can also install more addons or modules by by going to https://te4.org/
When inside a module remember you can press Escape to bring up a menu to change keybindings, resolution and other module specific options.
......@@ -281,7 +281,7 @@ function _M:grabAddons()
local ok = d:start()
if ok then
local wdir = fs.getWritePath()
local _, _, dir, name = add.file:find("(.+)/([^/]+)$")
local _, _, dir, name = add.file:find("(.+/)([^/]+)$")
if dir then
fs.setWritePath(fs.getRealPath(dir))
fs.delete(name)
......@@ -539,7 +539,7 @@ function _M:onQuit()
end, "Quit", "Continue")
end
profile_help_text = [[#LIGHT_GREEN#T-Engine4#LAST# allows you to sync your player profile with the website #LIGHT_BLUE#http://te4.org/#LAST#
profile_help_text = [[#LIGHT_GREEN#T-Engine4#LAST# allows you to sync your player profile with the website #LIGHT_BLUE#https://te4.org/#LAST#
This allows you to:
* Play from several computers without having to copy unlocks and achievements.
......@@ -548,7 +548,7 @@ This allows you to:
* Cool statistics for each module to help sharpen your gameplay style
* Help the game developers balance and refine the game
You will also have a user page on http://te4.org/ where you can show off your achievements to your friends.
You will also have a user page on https://te4.org/ where you can show off your achievements to your friends.
This is all optional, you are not forced to use this feature at all, but the developers would thank you if you did as it will make balancing easier.
Online profile requires an internet connection, if not available it will wait and sync when it finds one.]]
......@@ -593,17 +593,17 @@ function _M:createProfile(loginItem)
end
else
self.auth_tried = nil
local d = Dialog:simpleWaiter("Registering...", "Registering on http://te4.org/, please wait...") core.display.forceRedraw()
local ok, err = profile:newProfile(loginItem.login, loginItem.name, loginItem.pass, loginItem.email)
local d = Dialog:simpleWaiter("Registering...", "Registering on https://te4.org/, please wait...") core.display.forceRedraw()
local ok, err = profile:newProfile(loginItem.login, loginItem.name, loginItem.pass, loginItem.email, loginItem.news)
profile:waitFirstAuth()
d:done()
if profile.auth then
Dialog:simplePopup(self.justlogin and "Logged in!" or "Profile created!", "Your online profile is now active. Have fun!", function() end )
else
if err ~= "unknown" and err then
Dialog:simplePopup("Profile creation failed!", "Creation failed: "..err.." (you may also register on http://te4.org/)", function() end )
Dialog:simplePopup("Profile creation failed!", "Creation failed: "..err.." (you may also register on https://te4.org/)", function() end )
else
Dialog:simplePopup("Profile creation failed!", "Try again in in a few moments, or try online at http://te4.org/", function() end )
Dialog:simplePopup("Profile creation failed!", "Try again in in a few moments, or try online at https://te4.org/", function() end )
end
end
end
......
......@@ -32,11 +32,11 @@ function _M:init()
Dialog.init(self, "Configure Addons", game.w * 0.8, game.h * 0.8)
local webaddonload = function()
local method, d = util.browserOpenUrl("http://te4.org/addons/tome", {steam=true})
local method, d = util.browserOpenUrl("https://te4.org/addons/tome", {steam=true})
if method == "webview" and d then d.unload = function() self:regen() end end
end
local webdlcload = function()
local method, d = util.browserOpenUrl("http://te4.org/tome/dlc", {steam=true})
local method, d = util.browserOpenUrl("https://te4.org/tome/dlc", {steam=true})
if method == "webview" and d then d.unload = function() self:regen() end end
end
......
......@@ -182,11 +182,11 @@ function _M:playSave(ignore_mod_compat)
Dialog:yesnoLongPopup("Incompatible savefile", [[Due to huge changes in 1.2.0 all previous savefiles will not work with it.
This savefile requires a game version lower than 1.2.0 and thus can not be loaded.
But despair not, if you wish to finish it you can simply download the old version corresponding to the savefile on #{italic}##LIGHT_BLUE#http://te4.org/download#WHITE##{normal}#.
But despair not, if you wish to finish it you can simply download the old version corresponding to the savefile on #{italic}##LIGHT_BLUE#https://te4.org/download#WHITE##{normal}#.
We apologize for the annoyance, most of the time we try to keep compatibility but this once it was simply not possible.]],
700, function(ret) if ret then
util.browserOpenUrl("http://te4.org/download", {webview=true, steam=true})
util.browserOpenUrl("https://te4.org/download", {webview=true, steam=true})
end end, "Go to download in your browser", "Cancel"
)
return
......@@ -244,17 +244,17 @@ function _M:installOldGame(version_string)
local dls = {}
-- Later on we can request the server for a list, but heh
if version_string == "tome-1.2.5" then
dls[#dls+1] = {url="http://te4.org/dl/modules/tome/tome-1.2.5-gfx.team", name="tome-1.2.5-gfx.team"}
dls[#dls+1] = {url="http://te4.org/dl/modules/tome/tome-1.2.5-music.team", name="tome-1.2.5-music.team"}
dls[#dls+1] = {url="http://te4.org/dl/modules/tome/tome-1.2.5.team", name="tome-1.2.5.team"}
dls[#dls+1] = {url="https://te4.org/dl/modules/tome/tome-1.2.5-gfx.team", name="tome-1.2.5-gfx.team"}
dls[#dls+1] = {url="https://te4.org/dl/modules/tome/tome-1.2.5-music.team", name="tome-1.2.5-music.team"}
dls[#dls+1] = {url="https://te4.org/dl/modules/tome/tome-1.2.5.team", name="tome-1.2.5.team"}
elseif version_string == "tome-1.3.3" then
dls[#dls+1] = {url="http://te4.org/dl/modules/tome/tome-1.3.3-gfx.team", name="tome-1.3.3-gfx.team"}
dls[#dls+1] = {url="http://te4.org/dl/modules/tome/tome-1.3.3-music.team", name="tome-1.3.3-music.team"}
dls[#dls+1] = {url="http://te4.org/dl/modules/tome/tome-1.3.3.team", name="tome-1.3.3.team"}
dls[#dls+1] = {url="https://te4.org/dl/modules/tome/tome-1.3.3-gfx.team", name="tome-1.3.3-gfx.team"}
dls[#dls+1] = {url="https://te4.org/dl/modules/tome/tome-1.3.3-music.team", name="tome-1.3.3-music.team"}
dls[#dls+1] = {url="https://te4.org/dl/modules/tome/tome-1.3.3.team", name="tome-1.3.3.team"}
elseif version_string == "tome-1.4.9" then
dls[#dls+1] = {url="http://te4.org/dl/modules/tome/tome-1.4.9-gfx.team", name="tome-1.4.9-gfx.team"}
dls[#dls+1] = {url="http://te4.org/dl/modules/tome/tome-1.4.9-music.team", name="tome-1.4.9-music.team"}
dls[#dls+1] = {url="http://te4.org/dl/modules/tome/tome-1.4.9.team", name="tome-1.4.9.team"}
dls[#dls+1] = {url="https://te4.org/dl/modules/tome/tome-1.4.9-gfx.team", name="tome-1.4.9-gfx.team"}
dls[#dls+1] = {url="https://te4.org/dl/modules/tome/tome-1.4.9-music.team", name="tome-1.4.9-music.team"}
dls[#dls+1] = {url="https://te4.org/dl/modules/tome/tome-1.4.9.team", name="tome-1.4.9.team"}
end
if #dls == 0 then
......
......@@ -169,7 +169,7 @@ function _M:uiLoginSteam(uis)
end
function _M:uiStats(uis)
self.logged_url = "http://te4.org/users/"..profile.auth.page
self.logged_url = "https://te4.org/users/"..profile.auth.page
local str1 = Textzone.new{auto_width=true, auto_height=true, text="#GOLD#Online Profile#WHITE#"}
local str2 = Textzone.new{auto_width=true, auto_height=true, text="#LIGHT_BLUE##{underline}#"..self.logged_url.."#LAST##{normal}#", fct=function() util.browserOpenUrl(self.logged_url, {is_external=true}) end}
......
......@@ -36,7 +36,7 @@ function _M:init()
self.c_switch = Checkbox.new{default=false, width=math.floor(self.iw / 3 - 40), title="Show all versions", on_change=function() self:switch() end}
self.c_compat = Checkbox.new{default=false, width=math.floor(self.iw / 3 - 40), title="Show incompatible", on_change=function() self:switch() end}
local url = Textzone.new{text="You can get new games at\n#LIGHT_BLUE##{underline}#http://te4.org/games#{normal}#", auto_height=true, auto_width=true, fct=function() util.browserOpenUrl("http://te4.org/games") end}
local url = Textzone.new{text="You can get new games at\n#LIGHT_BLUE##{underline}#https://te4.org/games#{normal}#", auto_height=true, auto_width=true, fct=function() util.browserOpenUrl("https://te4.org/games") end}
self:generateList()
......
......@@ -20,6 +20,7 @@
require "engine.class"
local Dialog = require "engine.ui.Dialog"
local Button = require "engine.ui.Button"
local Checkbox = require "engine.ui.Checkbox"
local Textbox = require "engine.ui.Textbox"
local Textzone = require "engine.ui.Textzone"
......@@ -64,6 +65,8 @@ function _M:init(dialogdef, profile_help_text)
self.c_pass = Textbox.new{title="Password: ", size_title=pwa, text="", chars=30, max_len=20, hide=true, filter=pass_filter, fct=function(text) self:okclick() end}
self.c_pass2 = Textbox.new{title=pwa, text="", size_title=pwa, chars=30, max_len=20, hide=true, filter=pass_filter, fct=function(text) self:okclick() end}
self.c_email = Textbox.new{title="Email: ", size_title=pwa, text="", chars=30, max_len=60, filter=pass_filter, 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=true, fct=function() self:okclick() end}
self.c_news2 = Textzone.new{text="about important game events from us.", width=self.iw - 20, auto_height=true}
local ok = require("engine.ui.Button").new{text="Create", fct=function() self:okclick() end}
local cancel = require("engine.ui.Button").new{text="Cancel", fct=function() self:cancelclick() end}
......@@ -73,6 +76,8 @@ function _M:init(dialogdef, profile_help_text)
{left=0, top=self.c_desc.h+self.c_login.h+5, ui=self.c_pass},
{left=0, top=self.c_desc.h+self.c_login.h+self.c_pass.h+5, ui=self.c_pass2},
{left=0, top=self.c_desc.h+self.c_login.h+self.c_pass.h+self.c_pass2.h+10, ui=self.c_email},
{left=0, top=self.c_desc.h+self.c_login.h+self.c_pass.h+self.c_pass2.h+self.c_email.h+10, ui=self.c_news},
{left=0, top=self.c_desc.h+self.c_login.h+self.c_pass.h+self.c_pass2.h+self.c_email.h+self.c_news2.h+10, ui=self.c_news2},
{left=0, bottom=0, ui=ok},
{right=0, bottom=0, ui=cancel},
}
......@@ -105,7 +110,7 @@ function _M:okclick()
end
game:unregisterDialog(self)
game:createProfile({create=self.c_email and true or false, login=self.c_login.text, pass=self.c_pass.text, email=self.c_email and self.c_email.text})
game:createProfile({create=self.c_email and true or false, login=self.c_login.text, pass=self.c_pass.text, email=self.c_email and self.c_email.text, news=self.c_news.checked})
end
function _M:cancelclick()
......
......@@ -20,6 +20,7 @@
require "engine.class"
local Dialog = require "engine.ui.Dialog"
local Button = require "engine.ui.Button"
local Checkbox = require "engine.ui.Checkbox"
local Textbox = require "engine.ui.Textbox"
local Textzone = require "engine.ui.Textzone"
......@@ -42,12 +43,16 @@ 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=true, fct=function() self:okclick() end}
self.c_news2 = Textzone.new{text="about important game events from us.", width=self.iw - 20, auto_height=true}
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}
self:loadUI{
{left=0, top=0, ui=self.c_desc},
{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, bottom=0, ui=ok},
{right=0, bottom=0, ui=cancel},
}
......@@ -70,7 +75,7 @@ function _M:okclick()
return
end
local d = self:simpleWaiter("Registering...", "Registering on http://te4.org/, please wait...") core.display.forceRedraw()
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)
if not ticket then
......@@ -78,7 +83,7 @@ function _M:okclick()
return
end
profile:performloginSteam(ticket:toHex(), self.c_login.text, self.c_email.text ~= "" and self.c_email.text)
profile:performloginSteam(ticket:toHex(), self.c_login.text, self.c_email.text ~= "" and self.c_email.text, self.c_news.checked)
profile:waitFirstAuth()
d:done()
if not profile.auth and profile.auth_last_error then
......
......@@ -128,7 +128,7 @@ function _M:updateAll()
local fname = ("/tmp-dl/engines/%s-%d.%d.%d.teae"):format(eversion[4], eversion[1], eversion[2], eversion[3])
local f = fs.open(fname, "w")
local url = ("http://te4.org/dl/engines/%s-%d.%d.%d.teae"):format(eversion[4], eversion[1], eversion[2], eversion[3])
local url = ("https://te4.org/dl/engines/%s-%d.%d.%d.teae"):format(eversion[4], eversion[1], eversion[2], eversion[3])
local d = DownloadDialog.new(("Downloading engine: %s"):format(next.name), url, function(chunk)
f:write(chunk)
end, function(di, data)
......@@ -141,7 +141,7 @@ function _M:updateAll()
local fname = ("/tmp-dl/modules/boot-%s-%d.%d.%d.team"):format(eversion[4], eversion[1], eversion[2], eversion[3])
local f = fs.open(fname, "w")
local url = ("http://te4.org/dl/engines/boot-%s-%d.%d.%d.team"):format(eversion[4], eversion[1], eversion[2], eversion[3])
local url = ("https://te4.org/dl/engines/boot-%s-%d.%d.%d.team"):format(eversion[4], eversion[1], eversion[2], eversion[3])
local d = DownloadDialog.new(("Downloading engine boot menu: %s"):format(next.name), url, function(chunk)
f:write(chunk)
end, function(di, data)
......