Commit d88cff0ae7ad757a7a3bd325a6960dfc854743e1

Authored by DarkGod
1 parent b92f80a5

Use https links in ingame tooltips and server requests

... ... @@ -756,7 +756,7 @@ end
756 756
757 757 function _M:registerNewCharacter(module)
758 758 if not self.auth or not self.hash_valid then return end
759   - local dialog = Dialog:simpleWaiter("Registering character", "Character is being registered on http://te4.org/")
  759 + local dialog = Dialog:simpleWaiter("Registering character", "Character is being registered on https://te4.org/")
760 760 core.display.forceRedraw()
761 761
762 762 core.profile.pushOrder(table.serialize{o="RegisterNewCharacter", module=module})
... ...
... ... @@ -38,7 +38,7 @@ function _M:init(t)
38 38 self.custom_calls = t.custom_calls or {}
39 39 if self.allow_login == nil then self.allow_login = true end
40 40
41   - if self.allow_login and self.url:find("^http://te4%.org/") and profile.auth then
  41 + if self.allow_login and (self.url:find("^http://te4%.org/") or self.url:find("^https://te4%.org/")) and profile.auth then
42 42 local param = "_te4ah="..profile.auth.hash.."&_te4ad="..profile.auth.drupid
43 43
44 44 local first = self.url:find("?", 1, 1)
... ... @@ -46,7 +46,7 @@ function _M:init(t)
46 46 else self.url = self.url.."?"..param end
47 47 end
48 48
49   - if self.url:find("^http://te4%.org/") then
  49 + if self.url:find("^http://te4%.org/") or self.url:find("^https://te4%.org/") then
50 50 local param = "_te4"
51 51
52 52 local first = self.url:find("?", 1, 1)
... ... @@ -187,7 +187,7 @@ function _M:onDownload(handlers)
187 187 local Dialog = require "engine.ui.Dialog"
188 188
189 189 handlers.on_download_request = function(downid, url, file, mime)
190   - if mime == "application/t-engine-addon" and self.allow_downloads.addons and url:find("^http://te4%.org/") then
  190 + if mime == "application/t-engine-addon" and self.allow_downloads.addons and (url:find("^http://te4%.org/") or url:find("^https://te4%.org/")) then
191 191 local path = fs.getRealPath("/addons/")
192 192 if path then
193 193 local name = file
... ... @@ -205,7 +205,7 @@ function _M:onDownload(handlers)
205 205 end)
206 206 return
207 207 end
208   - elseif mime == "application/t-engine-module" and self.allow_downloads.modules and url:find("^http://te4%.org/") then
  208 + elseif mime == "application/t-engine-module" and self.allow_downloads.modules and (url:find("^http://te4%.org/") or url:find("^https://te4%.org/")) then
209 209 local path = fs.getRealPath("/modules/")
210 210 if path then
211 211 local name = file
... ...
... ... @@ -101,7 +101,7 @@ end
101 101
102 102 function _M:makeWebtooltip()
103 103 self.webtooltip = require("engine.ui.WebView").new{width=380, height=500, has_frame=true, never_clean=true, allow_popup=true,
104   - 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])
  104 + 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])
105 105 }
106 106 if self.webtooltip.unusable then
107 107 self.webtooltip = nil
... ... @@ -153,7 +153,7 @@ function _M:run()
153 153 if not self.news then
154 154 self.news = {
155 155 title = "Welcome to T-Engine and the Tales of Maj'Eyal",
156   - 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/
  156 + 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/
157 157
158 158 When inside a module remember you can press Escape to bring up a menu to change keybindings, resolution and other module specific options.
159 159
... ... @@ -539,7 +539,7 @@ function _M:onQuit()
539 539 end, "Quit", "Continue")
540 540 end
541 541
542   -profile_help_text = [[#LIGHT_GREEN#T-Engine4#LAST# allows you to sync your player profile with the website #LIGHT_BLUE#http://te4.org/#LAST#
  542 +profile_help_text = [[#LIGHT_GREEN#T-Engine4#LAST# allows you to sync your player profile with the website #LIGHT_BLUE#https://te4.org/#LAST#
543 543
544 544 This allows you to:
545 545 * Play from several computers without having to copy unlocks and achievements.
... ... @@ -548,7 +548,7 @@ This allows you to:
548 548 * Cool statistics for each module to help sharpen your gameplay style
549 549 * Help the game developers balance and refine the game
550 550
551   -You will also have a user page on http://te4.org/ where you can show off your achievements to your friends.
  551 +You will also have a user page on https://te4.org/ where you can show off your achievements to your friends.
552 552 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.
553 553 Online profile requires an internet connection, if not available it will wait and sync when it finds one.]]
554 554
... ... @@ -593,7 +593,7 @@ function _M:createProfile(loginItem)
593 593 end
594 594 else
595 595 self.auth_tried = nil
596   - local d = Dialog:simpleWaiter("Registering...", "Registering on http://te4.org/, please wait...") core.display.forceRedraw()
  596 + local d = Dialog:simpleWaiter("Registering...", "Registering on https://te4.org/, please wait...") core.display.forceRedraw()
597 597 local ok, err = profile:newProfile(loginItem.login, loginItem.name, loginItem.pass, loginItem.email, loginItem.news)
598 598 profile:waitFirstAuth()
599 599 d:done()
... ... @@ -601,9 +601,9 @@ function _M:createProfile(loginItem)
601 601 Dialog:simplePopup(self.justlogin and "Logged in!" or "Profile created!", "Your online profile is now active. Have fun!", function() end )
602 602 else
603 603 if err ~= "unknown" and err then
604   - Dialog:simplePopup("Profile creation failed!", "Creation failed: "..err.." (you may also register on http://te4.org/)", function() end )
  604 + Dialog:simplePopup("Profile creation failed!", "Creation failed: "..err.." (you may also register on https://te4.org/)", function() end )
605 605 else
606   - Dialog:simplePopup("Profile creation failed!", "Try again in in a few moments, or try online at http://te4.org/", function() end )
  606 + Dialog:simplePopup("Profile creation failed!", "Try again in in a few moments, or try online at https://te4.org/", function() end )
607 607 end
608 608 end
609 609 end
... ...
... ... @@ -32,11 +32,11 @@ function _M:init()
32 32 Dialog.init(self, "Configure Addons", game.w * 0.8, game.h * 0.8)
33 33
34 34 local webaddonload = function()
35   - local method, d = util.browserOpenUrl("http://te4.org/addons/tome", {steam=true})
  35 + local method, d = util.browserOpenUrl("https://te4.org/addons/tome", {steam=true})
36 36 if method == "webview" and d then d.unload = function() self:regen() end end
37 37 end
38 38 local webdlcload = function()
39   - local method, d = util.browserOpenUrl("http://te4.org/tome/dlc", {steam=true})
  39 + local method, d = util.browserOpenUrl("https://te4.org/tome/dlc", {steam=true})
40 40 if method == "webview" and d then d.unload = function() self:regen() end end
41 41 end
42 42
... ...
... ... @@ -182,11 +182,11 @@ function _M:playSave(ignore_mod_compat)
182 182 Dialog:yesnoLongPopup("Incompatible savefile", [[Due to huge changes in 1.2.0 all previous savefiles will not work with it.
183 183 This savefile requires a game version lower than 1.2.0 and thus can not be loaded.
184 184
185   -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}#.
  185 +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}#.
186 186
187 187 We apologize for the annoyance, most of the time we try to keep compatibility but this once it was simply not possible.]],
188 188 700, function(ret) if ret then
189   - util.browserOpenUrl("http://te4.org/download", {webview=true, steam=true})
  189 + util.browserOpenUrl("https://te4.org/download", {webview=true, steam=true})
190 190 end end, "Go to download in your browser", "Cancel"
191 191 )
192 192 return
... ... @@ -244,17 +244,17 @@ function _M:installOldGame(version_string)
244 244 local dls = {}
245 245 -- Later on we can request the server for a list, but heh
246 246 if version_string == "tome-1.2.5" then
247   - dls[#dls+1] = {url="http://te4.org/dl/modules/tome/tome-1.2.5-gfx.team", name="tome-1.2.5-gfx.team"}
248   - dls[#dls+1] = {url="http://te4.org/dl/modules/tome/tome-1.2.5-music.team", name="tome-1.2.5-music.team"}
249   - dls[#dls+1] = {url="http://te4.org/dl/modules/tome/tome-1.2.5.team", name="tome-1.2.5.team"}
  247 + dls[#dls+1] = {url="https://te4.org/dl/modules/tome/tome-1.2.5-gfx.team", name="tome-1.2.5-gfx.team"}
  248 + dls[#dls+1] = {url="https://te4.org/dl/modules/tome/tome-1.2.5-music.team", name="tome-1.2.5-music.team"}
  249 + dls[#dls+1] = {url="https://te4.org/dl/modules/tome/tome-1.2.5.team", name="tome-1.2.5.team"}
250 250 elseif version_string == "tome-1.3.3" then
251   - dls[#dls+1] = {url="http://te4.org/dl/modules/tome/tome-1.3.3-gfx.team", name="tome-1.3.3-gfx.team"}
252   - dls[#dls+1] = {url="http://te4.org/dl/modules/tome/tome-1.3.3-music.team", name="tome-1.3.3-music.team"}
253   - dls[#dls+1] = {url="http://te4.org/dl/modules/tome/tome-1.3.3.team", name="tome-1.3.3.team"}
  251 + dls[#dls+1] = {url="https://te4.org/dl/modules/tome/tome-1.3.3-gfx.team", name="tome-1.3.3-gfx.team"}
  252 + dls[#dls+1] = {url="https://te4.org/dl/modules/tome/tome-1.3.3-music.team", name="tome-1.3.3-music.team"}
  253 + dls[#dls+1] = {url="https://te4.org/dl/modules/tome/tome-1.3.3.team", name="tome-1.3.3.team"}
254 254 elseif version_string == "tome-1.4.9" then
255   - dls[#dls+1] = {url="http://te4.org/dl/modules/tome/tome-1.4.9-gfx.team", name="tome-1.4.9-gfx.team"}
256   - dls[#dls+1] = {url="http://te4.org/dl/modules/tome/tome-1.4.9-music.team", name="tome-1.4.9-music.team"}
257   - dls[#dls+1] = {url="http://te4.org/dl/modules/tome/tome-1.4.9.team", name="tome-1.4.9.team"}
  255 + dls[#dls+1] = {url="https://te4.org/dl/modules/tome/tome-1.4.9-gfx.team", name="tome-1.4.9-gfx.team"}
  256 + dls[#dls+1] = {url="https://te4.org/dl/modules/tome/tome-1.4.9-music.team", name="tome-1.4.9-music.team"}
  257 + dls[#dls+1] = {url="https://te4.org/dl/modules/tome/tome-1.4.9.team", name="tome-1.4.9.team"}
258 258 end
259 259
260 260 if #dls == 0 then
... ...
... ... @@ -169,7 +169,7 @@ function _M:uiLoginSteam(uis)
169 169 end
170 170
171 171 function _M:uiStats(uis)
172   - self.logged_url = "http://te4.org/users/"..profile.auth.page
  172 + self.logged_url = "https://te4.org/users/"..profile.auth.page
173 173 local str1 = Textzone.new{auto_width=true, auto_height=true, text="#GOLD#Online Profile#WHITE#"}
174 174 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}
175 175
... ...
... ... @@ -36,7 +36,7 @@ function _M:init()
36 36 self.c_switch = Checkbox.new{default=false, width=math.floor(self.iw / 3 - 40), title="Show all versions", on_change=function() self:switch() end}
37 37 self.c_compat = Checkbox.new{default=false, width=math.floor(self.iw / 3 - 40), title="Show incompatible", on_change=function() self:switch() end}
38 38
39   - 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}
  39 + 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}
40 40
41 41 self:generateList()
42 42
... ...
... ... @@ -75,7 +75,7 @@ function _M:okclick()
75 75 return
76 76 end
77 77
78   - local d = self:simpleWaiter("Registering...", "Registering on http://te4.org/, please wait...") core.display.forceRedraw()
  78 + local d = self:simpleWaiter("Registering...", "Registering on https://te4.org/, please wait...") core.display.forceRedraw()
79 79 d:timeout(30, function() Dialog:simplePopup("Steam", "Steam client not found.") end)
80 80 core.steam.sessionTicket(function(ticket)
81 81 if not ticket then
... ...
... ... @@ -128,7 +128,7 @@ function _M:updateAll()
128 128 local fname = ("/tmp-dl/engines/%s-%d.%d.%d.teae"):format(eversion[4], eversion[1], eversion[2], eversion[3])
129 129 local f = fs.open(fname, "w")
130 130
131   - local url = ("http://te4.org/dl/engines/%s-%d.%d.%d.teae"):format(eversion[4], eversion[1], eversion[2], eversion[3])
  131 + local url = ("https://te4.org/dl/engines/%s-%d.%d.%d.teae"):format(eversion[4], eversion[1], eversion[2], eversion[3])
132 132 local d = DownloadDialog.new(("Downloading engine: %s"):format(next.name), url, function(chunk)
133 133 f:write(chunk)
134 134 end, function(di, data)
... ... @@ -141,7 +141,7 @@ function _M:updateAll()
141 141 local fname = ("/tmp-dl/modules/boot-%s-%d.%d.%d.team"):format(eversion[4], eversion[1], eversion[2], eversion[3])
142 142 local f = fs.open(fname, "w")
143 143
144   - local url = ("http://te4.org/dl/engines/boot-%s-%d.%d.%d.team"):format(eversion[4], eversion[1], eversion[2], eversion[3])
  144 + local url = ("https://te4.org/dl/engines/boot-%s-%d.%d.%d.team"):format(eversion[4], eversion[1], eversion[2], eversion[3])
145 145 local d = DownloadDialog.new(("Downloading engine boot menu: %s"):format(next.name), url, function(chunk)
146 146 f:write(chunk)
147 147 end, function(di, data)
... ...
... ... @@ -446,7 +446,7 @@ function _M:drawDialog(kind, actor_to_compare)
446 446 local dur_text = ""
447 447
448 448 if player.__te4_uuid and profile.auth and profile.auth.drupid then
449   - local path = "http://te4.org/characters/"..profile.auth.drupid.."/tome/"..player.__te4_uuid
  449 + local path = "https://te4.org/characters/"..profile.auth.drupid.."/tome/"..player.__te4_uuid
450 450 local LinkTxt = "Online URL: #LIGHT_BLUE##{underline}#"..path.."#{normal}#"
451 451 local Link_w, Link_h = self.font:size(LinkTxt)
452 452 h = self.c_desc.h - Link_h
... ...
... ... @@ -88,7 +88,7 @@ function _M:ok()
88 88
89 89 if not inside then self:simplePopup("Thank you", "Thank you, a paypal page should now open in your browser.") end
90 90
91   - local url = ("http://te4.org/ingame-donate/%s/%s/%s/EUR/%s"):format(self.c_donate.number, self.c_recur.checked and "monthly" or "onetime", (profile.auth and profile.auth.drupid) and profile.auth.drupid or "0", self.donation_source)
  91 + local url = ("https://te4.org/ingame-donate/%s/%s/%s/EUR/%s"):format(self.c_donate.number, self.c_recur.checked and "monthly" or "onetime", (profile.auth and profile.auth.drupid) and profile.auth.drupid or "0", self.donation_source)
92 92
93 93 if inside then util.browserOpenUrl(url, {is_external=true})
94 94 else util.browserOpenUrl(url, {webview=true, is_external=true}) end
... ...
... ... @@ -21,7 +21,7 @@ name = "T.o.M.E"
21 21 long_name = "Tales of Maj'Eyal: Age of Ascendancy"
22 22 short_name = "tome"
23 23 author = { "DarkGod", "darkgod@te4.org" }
24   -homepage = "http://te4.org/"
  24 +homepage = "https://te4.org/"
25 25 version = {1,6,0}
26 26 engine = {1,6,0,"te4"}
27 27 description = [[
... ...