fix: sorting function was not according to spec
This commit is contained in:
parent
c736c60cd1
commit
d44336241c
|
|
@ -50,12 +50,7 @@ func _load_games():
|
|||
|
||||
func _sort_saves() -> void:
|
||||
saves.sort_custom(func(a: SaveGame, b: SaveGame) -> int:
|
||||
if a.last_saved > b.last_saved:
|
||||
return -1
|
||||
elif a.last_saved < b.last_saved:
|
||||
return 1
|
||||
else:
|
||||
return 0
|
||||
return a.last_saved < b.last_saved
|
||||
)
|
||||
|
||||
func _rebuild_buttons() -> void:
|
||||
|
|
|
|||
Loading…
Reference in New Issue