Files
code_of_conquest_dnd/client/scripts/net/npc_result.gd

28 lines
828 B
GDScript

# 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)