feat: guest stories, accessibility and cozy events

v0.9.0-alpha local build. Adds per-guest story vignettes, a scrollable Guest Book story section, live text scaling, Android haptics, a difficulty picker with descriptions, six repeating cosmetic hotel events, and isolated free play using verified symmetry variants. Save format v7 with automatic migration. QA is 9/9 including the free-play uniqueness suite.
This commit is contained in:
Ratdoku Builder committed 2026-12-05 16:44:39 -06:00
1 parent e0fd33c25e
commit 9e2776f7c4
27 files changed
+1559 -99

No files matched your search

+41 -3
View File
@@ -21,6 +21,7 @@ var detail_meta: Label
var detail_bio: Label
var detail_snack: Label
var detail_status: Label
var detail_story_box: VBoxContainer
var crumb_frame_holder: CenterContainer
var crumb_frame_id := ""
@@ -296,13 +297,19 @@ func _build_detail() -> void:
detail_layer.add_child(center)
var panel := UI.panel(Palette.CREAM, 24, 16)
panel.custom_minimum_size = Vector2(320, 0)
var view_size := get_viewport_rect().size
panel.custom_minimum_size = Vector2(320, max(320, min(560, int(view_size.y) - 80)))
panel.mouse_filter = Control.MOUSE_FILTER_STOP
center.add_child(panel)
var detail_scroll := ScrollContainer.new()
detail_scroll.horizontal_scroll_mode = ScrollContainer.SCROLL_MODE_DISABLED
detail_scroll.size_flags_vertical = Control.SIZE_EXPAND_FILL
panel.add_child(detail_scroll)
var box := VBoxContainer.new()
box.add_theme_constant_override("separation", 4)
panel.add_child(box)
box.size_flags_horizontal = Control.SIZE_EXPAND_FILL
detail_scroll.add_child(box)
detail_portrait = TextureRect.new()
detail_portrait.custom_minimum_size = Vector2(180, 180)
@@ -326,10 +333,17 @@ func _build_detail() -> void:
detail_status = UI.label("", 10, Palette.MUTED)
box.add_child(detail_status)
box.add_child(UI.heading("Story", 16))
detail_story_box = VBoxContainer.new()
detail_story_box.add_theme_constant_override("separation", 6)
box.add_child(detail_story_box)
UI.pass_scroll_input(detail_story_box)
var close := UI.button("Close", false, 44)
close.add_theme_font_size_override("font_size", 16)
UI.set_font_size(close, 16)
close.pressed.connect(_try_close_detail)
box.add_child(close)
UI.pass_scroll_input(box)
func _show_detail(guest: Dictionary) -> void:
@@ -345,6 +359,30 @@ func _show_detail(guest: Dictionary) -> void:
detail_status.text = "Checked in · Room %d" % int(guest.get("unlock_room", 0))
if int(guest.get("unlock_room", 0)) == 0:
detail_status.text = "Resident · always in"
for child in detail_story_box.get_children():
child.queue_free()
var stories: Array = guest.get("stories", [])
if not SaveGame.is_guest_unlocked(id):
var hidden_line := UI.label("??? — check in from Room %d to hear their story." % int(guest.get("unlock_room", 0)), 11, Palette.MUTED)
hidden_line.horizontal_alignment = HORIZONTAL_ALIGNMENT_LEFT
detail_story_box.add_child(hidden_line)
else:
var visits := SaveGame.guest_visits(id)
detail_status.text += " · %d %s" % [visits, "visit" if visits == 1 else "visits"]
var count := SaveGame.story_line_count(id)
var needs := [0, 3, 7]
for i in range(stories.size()):
if i < count:
var line := UI.label(str(stories[i]), 11)
line.horizontal_alignment = HORIZONTAL_ALIGNMENT_LEFT
detail_story_box.add_child(line)
else:
var need := int(needs[clampi(i, 0, needs.size() - 1)])
var teaser := UI.label("??? · Unlocks after %d visits" % need, 10, Palette.MUTED)
teaser.horizontal_alignment = HORIZONTAL_ALIGNMENT_LEFT
detail_story_box.add_child(teaser)
_detail_opened_at = Time.get_ticks_msec()
detail_layer.visible = true
detail_layer.move_to_front()