feat(client): wire CharacterVisualDescriptor into startup IPC (#718)

encode_startup_message() now accepts optional CharacterVisualDescriptor
as third param, serialized via to_dict(). sim_bridge passes the
descriptor from GameState on new game start. apply_snapshot() restores
descriptor from server snapshot on save/load cycle.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-04 23:34:11 +02:00
co-authored by Claude Opus 4.6
parent e8a053080c
commit 4c1e0e9c85
3 changed files with 15 additions and 4 deletions
+8
View File
@@ -362,6 +362,14 @@ func apply_snapshot(snapshot: Dictionary) -> void:
else:
settings_response = null
# #718: character_visual_descriptor — restored from server snapshot on save/load.
# Server persists the descriptor and includes it in ObserverSnapshot after load.
# Only update when field is present (null means no change).
if snapshot.has("character_visual_descriptor") and snapshot.character_visual_descriptor is Dictionary:
var restored := CharacterVisualDescriptor.from_dict(snapshot.character_visual_descriptor)
if restored != null:
character_visual_descriptor = restored
# v14: player_knowledge (#264, D-041) — partial KG dump for journal panel.
# Only update when field is present (null means no change, server sends when KG changes).
if snapshot.has("player_knowledge") and snapshot.player_knowledge is Dictionary: