fixed addon plugin not loading - began drafting an update checker function

This commit is contained in:
Jaap Marsman 2022-11-06 16:22:55 +08:00
parent d01d32582c
commit bbf9742334
5 changed files with 9 additions and 1 deletions

View File

@ -7,7 +7,7 @@ onready var global_ints = $"/root/GlobalInts"
func _ready(): func _ready():
pass pass
func _process(delta): func _process(_delta):
# $"%SaveReport".visible = true # $"%SaveReport".visible = true
# $"%BackMainMenu".visible = true # $"%BackMainMenu".visible = true
pass pass

View File

@ -11,6 +11,13 @@ onready var date_time_display = $"%CurrentTime"
onready var global_ints = $"/root/GlobalInts" onready var global_ints = $"/root/GlobalInts"
onready var minute_label = $"StartScreen/InstructionPanel/MinuteBox/MinuteLabel" onready var minute_label = $"StartScreen/InstructionPanel/MinuteBox/MinuteLabel"
func check_for_updates():
var os_check : String
os_check = OS.get_name()
print(os_check)
if os_check == "X11" and "Windows" and "Mac":
print("We're on desktop. So let's check for updates!")
func refresh_descriptors(): func refresh_descriptors():
$"%1Acronym".text = global_ints.one_acronym $"%1Acronym".text = global_ints.one_acronym
$"%1AcronymE".text = $"%1Acronym".text $"%1AcronymE".text = $"%1Acronym".text
@ -58,6 +65,7 @@ func _ready():
global_ints.date = OS.get_date() global_ints.date = OS.get_date()
global_ints.ddmmyyyy = str(global_ints.date.day, "-", global_ints.date.month, "-", global_ints.date.year) global_ints.ddmmyyyy = str(global_ints.date.day, "-", global_ints.date.month, "-", global_ints.date.year)
check_for_updates()
func _process(_delta): func _process(_delta):
check_time_var += 1 check_time_var += 1