Add core game retry flow and question stats
This commit is contained in:
@@ -26,8 +26,8 @@ func _ready() -> void:
|
||||
|
||||
var row := HBoxContainer.new()
|
||||
var back := Button.new()
|
||||
back.text = "Back to Menu"
|
||||
back.pressed.connect(func(): main.show_screen("menu"))
|
||||
back.text = "Dashboard"
|
||||
back.pressed.connect(func(): main.show_screen("dashboard"))
|
||||
row.add_child(back)
|
||||
|
||||
var reset := Button.new()
|
||||
@@ -44,13 +44,16 @@ func _ready() -> void:
|
||||
func on_show(_payload: Variant = null) -> void:
|
||||
var profile := ProfileService.get_profile()
|
||||
var xp_into := ProgressionService.xp_into_level(int(profile["xp"]))
|
||||
var text := "[b]Level %d[/b]\n%d total XP (%d/%d to next level)\nCurrent streak: %d\nBest streak: %d\n\n[b]Badges[/b]\n" % [
|
||||
var text := "[b]Level %d[/b]\n%d total XP (%d/%d to next level)\nCurrent streak: %d\nBest streak: %d\nToday: %d/%d questions, +%d XP\n\n[b]Badges[/b]\n" % [
|
||||
profile["level"],
|
||||
profile["xp"],
|
||||
xp_into,
|
||||
ProgressionService.XP_PER_LEVEL,
|
||||
profile["current_streak"],
|
||||
profile["best_streak"]
|
||||
profile["best_streak"],
|
||||
profile.get("daily_questions_answered", 0),
|
||||
profile.get("daily_goal_questions", 10),
|
||||
profile.get("daily_xp_earned", 0)
|
||||
]
|
||||
if profile["badges"].is_empty():
|
||||
text += "No badges yet.\n"
|
||||
|
||||
Reference in New Issue
Block a user