From db7c7d96e8f864791103838fbcb2ba36a06a6e80 Mon Sep 17 00:00:00 2001 From: Noah Date: Fri, 28 Oct 2022 13:05:40 -0500 Subject: [PATCH] Renamed newest_local_version -> local_version --- Main_menu.gd | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/Main_menu.gd b/Main_menu.gd index 69dec53..627d24a 100644 --- a/Main_menu.gd +++ b/Main_menu.gd @@ -1,16 +1,17 @@ extends Control -var newest_version -var newest_version_data -var newest_local_version -var os_name -var suffix +# Define variables +var newest_version # The newest version available online +var newest_version_data # The data about the newest version online +var local_version # The version installed on this computer +var os_name # The simplified name of the OS (linux, or windows) +var suffix # func _process(delta): if newest_version != null: - newest_local_version = Versions.get_version() - if newest_local_version: - if newest_version > newest_local_version : + local_version = Versions.get_version() + if local_version: + if newest_version > local_version : $Panel/Play_button.text = "Update" else: $Panel/Play_button.text = "Play" @@ -48,14 +49,14 @@ func _download_request_completed(result, response_code, headers, body): dl_file.store_buffer(body) dl_file.close() - newest_local_version = newest_version_data.tag_name - Store.write_store("current_version", newest_local_version) + local_version = newest_version_data.tag_name + Store.write_store("current_version", local_version) if os_name == "linux": OS.execute("chmod", ["+x", OS.get_config_dir()+"/UltraFlare/current/UltraFlare-"+os_name+"-x86_64"]) func _on_Play_button_pressed(): - if not newest_local_version or newest_version > newest_local_version: + if not local_version or newest_version > local_version: var download = HTTPRequest.new() var url