From b6413251a866c76538869b84ed1c9b9852f7c507 Mon Sep 17 00:00:00 2001 From: Spartan322 Date: Fri, 22 Dec 2023 23:01:51 -0500 Subject: Apply type hints to menu scripts --- game/src/Game/Autoload/GuiScale.gd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'game/src/Game/Autoload/GuiScale.gd') diff --git a/game/src/Game/Autoload/GuiScale.gd b/game/src/Game/Autoload/GuiScale.gd index d364ff5..b8af59c 100644 --- a/game/src/Game/Autoload/GuiScale.gd +++ b/game/src/Game/Autoload/GuiScale.gd @@ -18,9 +18,9 @@ var _guiscales: Dictionary #Similar to Resolution.gd, but we don't bother checking for strings from files #and we have floats instead of vector2 integers -func _ready(): +func _ready() -> void: assert(minimum_guiscale > 0, "Minimum gui scale must be positive") - for guiscale_value in _starting_guiscales: + for guiscale_value : float in _starting_guiscales: add_guiscale(guiscale_value, _starting_guiscales[guiscale_value]) assert(not _guiscales.is_empty(), "No valid starting gui scales!") @@ -43,7 +43,7 @@ func add_guiscale(guiscale_value: float, guiscale_name: StringName=&"") -> bool: #returns floats func get_guiscale_value_list() -> Array: var list := _guiscales.keys() - list.sort_custom(func(a, b): return a > b) + list.sort_custom(func(a : float, b : float) -> bool: return a > b) return list func get_guiscale_display_name(guiscale_value : float) -> StringName: -- cgit v1.2.3-56-ga3b1