feat: define action completion costs

This commit is contained in:
Rijad Zuzo
2026-07-10 10:36:08 +02:00
parent 39989002ca
commit 0f7b12080e
19 changed files with 213 additions and 45 deletions
+10
View File
@@ -204,6 +204,16 @@ func _test_wood_work_requires_material() -> void:
),
"Patrol should not consume partial wood or create safety when its full cost cannot be paid"
)
var blocked_events: Array[EconomicEventRecord] = manager.get_npc_events(npc.id, 2)
_check(
(
not blocked_events.is_empty()
and StringName(blocked_events[0].data["event_type"])
== SimulationIds.EVENT_TASK_BLOCKED
and "needs 1 Wood" in String(blocked_events[0].data.get("action_name", ""))
),
"An unpaid completion cost should create a readable blocked-task fact"
)
manager.add_wood(1.5)
_check(