feat: surface inspected villager's open village need in field notes

This commit is contained in:
Rijad Zuzo
2026-08-10 23:36:47 +02:00
parent 8a7e6b12eb
commit 9ed985d6a3
5 changed files with 154 additions and 3 deletions
+15 -1
View File
@@ -14,6 +14,11 @@ var carried_amounts: Dictionary
var decision_reason: String
var _has_decision_reason: bool
var has_open_need := false
var need_type: StringName
var need_progress: String
var need_response: String
func _init(
inspection_npc_id: int,
@@ -24,7 +29,8 @@ func _init(
inspection_target_id: StringName,
inspection_target_name: String,
inspection_carried_amounts: Dictionary,
inspection_decision_reason := ""
inspection_decision_reason := "",
inspection_need: Dictionary = {}
) -> void:
npc_id = inspection_npc_id
npc_name = inspection_npc_name
@@ -36,6 +42,10 @@ func _init(
carried_amounts = inspection_carried_amounts.duplicate(true)
_has_decision_reason = not inspection_decision_reason.strip_edges().is_empty()
decision_reason = (inspection_decision_reason if _has_decision_reason else AWAITING_REASON)
has_open_need = bool(inspection_need.get("has_open_need", false))
need_type = StringName(inspection_need.get("need_type", &""))
need_progress = String(inspection_need.get("progress", ""))
need_response = String(inspection_need.get("response", ""))
func has_decision_reason() -> bool:
@@ -80,6 +90,10 @@ func cache_key() -> String:
target_name,
",".join(carried_parts),
decision_reason,
str(has_open_need),
String(need_type),
need_progress,
need_response,
]
)
)