Adds a full flashcards system: FSRS-based scheduling, cloze/basic card types, CSV import/export, media storage, and study UI, wired into navigation and the dashboard alongside existing question flows.
24 lines
740 B
GDScript
24 lines
740 B
GDScript
extends SceneTree
|
|
|
|
const NavigationRoutes := preload("res://scripts/ui/navigation_routes.gd")
|
|
|
|
var failures := 0
|
|
|
|
|
|
func _initialize() -> void:
|
|
_assert(NavigationRoutes.key_for_screen("flashcards_hub") == "flashcards",
|
|
"the flashcards library screen should activate the Flashcards nav entry")
|
|
_assert(NavigationRoutes.key_for_screen("flashcards_study") == "flashcards",
|
|
"the flashcards study screen should activate the Flashcards nav entry")
|
|
_assert(NavigationRoutes.key_for_screen("dashboard") == "home",
|
|
"unrelated routes should be unaffected by the new flashcards prefix rule")
|
|
|
|
quit(1 if failures > 0 else 0)
|
|
|
|
|
|
func _assert(condition: bool, message: String) -> void:
|
|
if condition:
|
|
return
|
|
failures += 1
|
|
push_error(message)
|