feat: define action completion costs
This commit is contained in:
@@ -63,7 +63,8 @@ func _run() -> void:
|
||||
SimulationIds.ACTION_GATHER_FOOD,
|
||||
-1.0,
|
||||
"Test shortage reason",
|
||||
{SimulationIds.ACTION_GATHER_FOOD: 4.5}
|
||||
{SimulationIds.ACTION_GATHER_FOOD: 4.5, SimulationIds.ACTION_PATROL: -1000000.0},
|
||||
{SimulationIds.ACTION_PATROL: "Needs 1 Wood (0.5 available)"}
|
||||
)
|
||||
manager.latest_decisions[npc.id] = test_decision
|
||||
manager.emit_signal("npc_decision_recorded", npc, test_decision)
|
||||
@@ -75,6 +76,14 @@ func _run() -> void:
|
||||
and npc.npc_name in inspector_label.text,
|
||||
"NPC inspector should show the selected villager's real decision reason"
|
||||
)
|
||||
_check(
|
||||
(
|
||||
"Unavailable" in inspector_label.text
|
||||
and "Patrol — Needs 1 Wood" in inspector_label.text
|
||||
and "-1000000" not in inspector_label.text
|
||||
),
|
||||
"NPC inspector should explain rejected actions without sentinel utility scores"
|
||||
)
|
||||
var carried_food: MeshInstance3D = visual.get_node("CarriedFood")
|
||||
_check(not carried_food.visible, "NPC should begin without a carried-food prop")
|
||||
npc.add_inventory(SimulationIds.RESOURCE_FOOD, 1.0)
|
||||
|
||||
Reference in New Issue
Block a user