feat(client): NpcResult model

This commit is contained in:
2026-07-10 12:45:23 -05:00
parent 4c0b4e41c3
commit a2100f802f
2 changed files with 37 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
# client/scripts/net/npc_result.gd
class_name NpcResult
extends RefCounted
## The game-meaningful result of one /npc/speak call. The caller applies
## valid_moves (via MoveApplier) and harvests facts — state writes stay explicit
## (§2). dropped_moves are kept only so the caller can log the §6 drops.
var display_text: String
var facts: Array
var valid_moves: Array
var dropped_moves: Array
var ends_conversation: bool
var degraded: bool
func _init(p_display_text := "", p_facts := [], p_valid := [], p_dropped := [],
p_ends := false, p_degraded := false) -> void:
display_text = p_display_text
facts = p_facts
valid_moves = p_valid
dropped_moves = p_dropped
ends_conversation = p_ends
degraded = p_degraded
static func fallback(line: String) -> NpcResult:
return NpcResult.new(line, [], [], [], false, true)