Save The Tree implementation and acceptance work in progress

Preserve production code, regression fixtures, audio assets and provenance, test infrastructure, and the original-completion plan and progress ledger. Final game and Windows acceptance remain pending; excluded local artifacts and native experiments are not part of this snapshot.
This commit is contained in:
Takeshi
2026-10-11 15:58:00 +09:00
parent 39f6068461
commit b84bade045
235 changed files with 495831 additions and 312 deletions
+10 -3
View File
@@ -66,7 +66,14 @@ func _process(delta: float) -> void:
_elapsed = 0
refresh()
func refresh() -> void:
## Clear optional saved presentation while rebuilding the actual loaded roster.
## Opening or polling the visible observer retains the normal first-row choice.
func clear_selection() -> void:
selected_guest_id = &""
_elapsed = 0.0
refresh(false)
func refresh(select_first_if_empty: bool = true) -> void:
if guests == null or _runtime == null:
return
var service: Variant = _runtime.get(&"guest_service")
@@ -80,7 +87,7 @@ func refresh() -> void:
for id: StringName in _ids:
guests.add_item(String(id))
guests.set_item_metadata(guests.item_count-1, id)
if not _ids.has(selected_guest_id):
if not _ids.has(selected_guest_id) and (not selected_guest_id.is_empty() or select_first_if_empty):
selected_guest_id = _ids[0] if not _ids.is_empty() else &""
guests.disabled = _ids.is_empty()
if not _ids.is_empty(): guests.select(_ids.find(selected_guest_id))
@@ -88,7 +95,7 @@ func refresh() -> void:
for need: StringName in bars:
bars[need].value = report.get(&"needs", {}).get(need, 0)
if report.is_empty():
details.text = "現在、来客はいません。"
details.text = "現在、来客はいません。" if _ids.is_empty() else "来客を選択してください。"
priority_label.text = ""
decision_label.text = ""
return