feat: 实现下载检查功能

This commit is contained in:
2026-01-21 11:50:43 +08:00
parent faee13c220
commit c8f27cb4c9
2 changed files with 10 additions and 1 deletions
+6 -1
View File
@@ -7,11 +7,16 @@ func download_file(server_path: String, local_path: String) -> void:
func download_from_origin() -> int:
var origin = GameManager.data_origin
var http = HTTPRequest.new()
if origin.substr(0, 4) != "http":
return 1
if http.request(origin) != OK:
return 2
if origin[-1] != "/":
origin = origin + "/"
return 0