feat(client): NpcResult model
This commit is contained in:
27
client/scripts/net/npc_result.gd
Normal file
27
client/scripts/net/npc_result.gd
Normal 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)
|
||||
Reference in New Issue
Block a user