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
+16
View File
@@ -65,6 +65,22 @@ func _test_definition_backed_behavior() -> void:
study.preferred_profession_id == SimulationIds.PROFESSION_SCHOLAR,
"Study should reference the stable scholar profession ID"
)
_check(
(
study.completion_cost_resource_id == SimulationIds.RESOURCE_WOOD
and is_equal_approx(study.completion_cost_amount, 1.0)
and study.has_completion_cost()
),
"Study should declare its completion cost through definition metadata"
)
var patrol := SimulationDefinitions.get_action(SimulationIds.ACTION_PATROL)
_check(
(
patrol.completion_cost_resource_id == SimulationIds.RESOURCE_WOOD
and is_equal_approx(patrol.completion_cost_amount, 1.0)
),
"Patrol should share the proven one-wood completion-cost contract"
)
var gather := SimulationDefinitions.get_action(SimulationIds.ACTION_GATHER_FOOD)
_check(
(