Renamed newest_local_version -> local_version

This commit is contained in:
Noah 2022-10-28 13:05:40 -05:00
parent 989742955b
commit db7c7d96e8

View File

@ -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