class_name ConsideringIndicator extends Node ## Thin node shim (charter ยง13). While a call is in flight it rotates an authored ## ConsideringPhrases line onto a Label every ROTATE_SECONDS, reframing the wait ## as the GM thinking. The phrase logic is the pure, tested ConsideringPhrases; ## the Timer/tree wiring here is the untested shim (verified by running the ## harness). One instance persists on the harness so the rotation index is not ## reset per call (spec decision 4). const ROTATE_SECONDS := 3.0 var _phrases: ConsideringPhrases var _timer: Timer var _label: Label func _init(phrases: ConsideringPhrases = null) -> void: _phrases = phrases if phrases != null else ConsideringPhrases.new() func _ready() -> void: _timer = Timer.new() _timer.wait_time = ROTATE_SECONDS _timer.one_shot = false _timer.timeout.connect(_advance) add_child(_timer) func start(label: Label) -> void: _label = label _advance() # show a phrase immediately, don't wait ROTATE_SECONDS _timer.start() func stop() -> void: _timer.stop() if _label != null: _label.text = "" _label = null func _advance() -> void: if _label != null: _label.text = _phrases.next()