Translations
This commit is contained in:
parent
4c3e35d1fc
commit
b79e87c7ca
30 changed files with 279 additions and 101 deletions
|
|
@ -18,22 +18,22 @@ func _ready() -> void:
|
|||
patch_request.download_file = exec_dir.path_join("chelimbalo.pck")
|
||||
patch_request.request_completed.connect(patch_downloaded)
|
||||
|
||||
update_version_text.emit("Подгружаем данные с сервера...")
|
||||
update_version_text.emit(tr("au_loading"))
|
||||
|
||||
request("https://2ndbeam.ru/durenije/chelimbalo/release/deploy_data")
|
||||
|
||||
func on_request_completed(result: int, _response_code: int, _headers: PackedStringArray, body: PackedByteArray):
|
||||
if result != OK:
|
||||
update_version_text.emit("[color=red]Ошибка загрузки данных:" + str(result) +"[/color]")
|
||||
update_version_text.emit("[color=red]" + tr("au_err_load") + str(result) +"[/color]")
|
||||
return
|
||||
|
||||
|
||||
var ver_hash = body.get_string_from_ascii().split("\n")[1]
|
||||
if ver_hash != load("res://version.tres").version:
|
||||
update_version_text.emit("Доступна новая версия!")
|
||||
update_version_text.emit(tr("au_new_version"))
|
||||
popup.popup_centered()
|
||||
else:
|
||||
update_version_text.emit("[color=green]У вас самая актуальная версия игры![/color]")
|
||||
update_version_text.emit("[color=green]"+tr("au_current_version")+"[/color]")
|
||||
|
||||
func download_button_pressed() -> void:
|
||||
popup.get_node("HTTPRequest").request("https://2ndbeam.ru/durenije/chelimbalo/release/chelimbalo.pck")
|
||||
|
|
@ -43,4 +43,4 @@ func patch_downloaded(result: int, _response_code: int, _headers: PackedStringAr
|
|||
OS.create_process(OS.get_executable_path(),OS.get_cmdline_args())
|
||||
get_tree().quit()
|
||||
else:
|
||||
update_version_text.emit("[color=red]Ошибка загрузки новой версии:" + str(result) +"[/color]")
|
||||
update_version_text.emit("[color=red]" + tr("au_err_install") + str(result) +"[/color]")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue