0.6.1: Emberwild is now Cinderwild (the old name's taken on Steam). Saves, identity and settings are copied across from the Emberwild folder on first start; the site moves to cinderwild.psbailey.uk; same protocol (18), so 0.6.0 and 0.6.1 play together
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
extends Node
|
||||
## The update check (docs/ROADMAP.md, M4 "Updates", first step): is there a
|
||||
## newer Emberwild than this one? Asked once at start-up, of the feed in
|
||||
## Project Settings (`emberwild/updates/feed`). The feed is either
|
||||
## newer Cinderwild than this one? Asked once at start-up, of the feed in
|
||||
## Project Settings (`cinderwild/updates/feed`). The feed is either
|
||||
## - a release API answer (Gitea, Forgejo or GitHub `releases/latest`): its
|
||||
## `version.json` asset is fetched next, and its other assets are the
|
||||
## downloads, by file name; or
|
||||
## - a `version.json` itself:
|
||||
## {"version": "0.2.0", "protocol": 13, "notes": "...", "page": "https://...",
|
||||
## "downloads": {"macos": {"file": "Emberwild-0.2.0-macos.zip", "sha256": "...",
|
||||
## "downloads": {"macos": {"file": "Cinderwild-0.2.0-macos.zip", "sha256": "...",
|
||||
## "size": 61164958, "url": "(optional; else the asset)"},
|
||||
## "windows": {...}}}
|
||||
## tools/export.sh writes that file next to the zips, for the release.
|
||||
@@ -22,7 +22,7 @@ signal checked(state: String)
|
||||
const TIMEOUT := 10.0
|
||||
|
||||
var version: String = String(ProjectSettings.get_setting("application/config/version", "0.0.0"))
|
||||
var feed: String = String(ProjectSettings.get_setting("emberwild/updates/feed", ""))
|
||||
var feed: String = String(ProjectSettings.get_setting("cinderwild/updates/feed", ""))
|
||||
var prefs_path := "user://updates.json"
|
||||
var enabled := true
|
||||
## idle | off | checking | current | available | failed
|
||||
@@ -101,7 +101,7 @@ func _finish(s: String) -> void:
|
||||
if s == "failed":
|
||||
print("[updates] couldn't check for updates: ", error)
|
||||
elif s == "available":
|
||||
print("[updates] Emberwild %s is out (this is %s)" % [latest_version(), version])
|
||||
print("[updates] Cinderwild %s is out (this is %s)" % [latest_version(), version])
|
||||
checked.emit(s)
|
||||
|
||||
func _get_json(url: String) -> Variant:
|
||||
@@ -112,7 +112,7 @@ func _get_json(url: String) -> Variant:
|
||||
var http := HTTPRequest.new()
|
||||
http.timeout = TIMEOUT
|
||||
add_child(http)
|
||||
var err := http.request(url, ["Accept: application/json", "User-Agent: Emberwild/" + version])
|
||||
var err := http.request(url, ["Accept: application/json", "User-Agent: Cinderwild/" + version])
|
||||
if err != OK:
|
||||
http.queue_free()
|
||||
error = "couldn't ask %s (%d)" % [url, err]
|
||||
|
||||
Reference in New Issue
Block a user