feat(daily): add daily rooms, streaks, and profile frames

A deterministic daily room rotates through the 30-level pool and tracks current and best streaks in save version 3. Daily wins are separate from campaign progress. The new Profile screen shows framed Crumb, stats, and selectable frames unlocked by rooms or best streak.
This commit is contained in:
Ratdoku Builder committed 2026-12-02 22:29:32 -06:00
1 parent 77ff5b48de
commit 7e6a338240
11 files changed
+680 -44

No files matched your search

+16
View File
@@ -4,12 +4,14 @@ const HomeScene = preload("res://scenes/Home.tscn")
const GameScene = preload("res://scenes/Game.tscn")
const GuestBookScene = preload("res://scenes/GuestBook.tscn")
const RulebookScene = preload("res://scenes/Rulebook.tscn")
const ProfileScene = preload("res://scenes/Profile.tscn")
const SettingsSheetScene = preload("res://scenes/SettingsSheet.tscn")
var home
var game
var guest_book
var rulebook
var profile
var settings_sheet
var screens := {}
var current := "home"
@@ -29,6 +31,8 @@ func _ready() -> void:
home.guest_book_pressed.connect(func() -> void: show_screen("guest_book"))
home.settings_pressed.connect(func() -> void: open_settings("home"))
home.rules_pressed.connect(func() -> void: show_screen("rules"))
home.daily_pressed.connect(_on_daily)
home.profile_pressed.connect(func() -> void: show_screen("profile"))
game = GameScene.instantiate()
_add_screen(game)
@@ -44,6 +48,10 @@ func _ready() -> void:
_add_screen(rulebook)
rulebook.back_pressed.connect(go_back)
profile = ProfileScene.instantiate()
_add_screen(profile)
profile.back_pressed.connect(go_back)
settings_sheet = SettingsSheetScene.instantiate()
add_child(settings_sheet)
settings_sheet.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
@@ -58,6 +66,7 @@ func _ready() -> void:
"game": game,
"guest_book": guest_book,
"rules": rulebook,
"profile": profile,
}
show_screen("home", false)
@@ -135,3 +144,10 @@ func _on_play() -> void:
var start_index: int = clampi(int(SaveGame.data.get("last_room", 0)), 0, max_index)
show_screen("game")
game.start_level(start_index)
func _on_daily() -> void:
var key := Daily.today_key()
var index := Daily.level_index(game.levels.size(), key)
show_screen("game")
game.start_daily(index, key)