update network
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
extends Node
|
||||
class_name VersionChecker
|
||||
|
||||
const Config = preload("config.gd")
|
||||
## Handles checking for game updates from the version manifest
|
||||
|
||||
signal version_check_started
|
||||
@@ -96,7 +98,7 @@ func _get_changelog_since(since_version: String) -> Array:
|
||||
|
||||
func get_download_info() -> Dictionary:
|
||||
## Returns info needed to download the latest version (platform-specific)
|
||||
var platform := Config.get_platform_name() # "windows", "linux", or "macos"
|
||||
var platform := Config.get_platform_name() # "windows", "linux", or "macos"
|
||||
var releases: Array = manifest_data.get("releases", [])
|
||||
|
||||
for release in releases:
|
||||
@@ -108,7 +110,7 @@ func get_download_info() -> Dictionary:
|
||||
var checksum_sha256: String = ""
|
||||
|
||||
# Check for platform-specific fields
|
||||
var platform_key := "pck_" + platform # e.g., "pck_windows", "pck_linux", "pck_macos"
|
||||
var platform_key := "pck_" + platform # e.g., "pck_windows", "pck_linux", "pck_macos"
|
||||
if release.has(platform_key):
|
||||
var platform_data: Dictionary = release.get(platform_key, {})
|
||||
pck_url = platform_data.get("url", "")
|
||||
|
||||
Reference in New Issue
Block a user