feat(m4c): shell consumes an injected character (seed stays the F6 fallback)

This commit is contained in:
2026-07-15 04:06:44 -05:00
parent e169885d90
commit 8d963e8030
2 changed files with 41 additions and 2 deletions

View File

@@ -19,6 +19,8 @@ extends Control
const HttpTransport = preload("res://scripts/net/http_transport.gd")
var service: DmService = null # injection seam; real HttpTransport built if null
var injected_log: CanonLog = null # injection seam; _build_seed_log() if null (F6/standalone)
var injected_state: GameState = null # injection seam; ShellState.seed() if null
var _state: ShellState
var _log: CanonLog
@@ -40,8 +42,10 @@ func _ready() -> void:
_fit_to_viewport()
get_viewport().size_changed.connect(_fit_to_viewport)
_state = ShellState.seed()
_log = _build_seed_log()
# The injected character wins; the seed calls are the F6/standalone fallback —
# same shape as `service == null` building a real transport below.
_state = ShellState.for_character(injected_state, injected_log) if injected_state != null else ShellState.seed()
_log = injected_log if injected_log != null else _build_seed_log()
_bind_state()
if service == null: