feat: add structured economic events
This commit is contained in:
@@ -18,6 +18,24 @@ func _run() -> void:
|
||||
var npc: SimNPC = manager.npcs[0]
|
||||
var visual: Node3D = view.active_npc_visuals[npc.id]
|
||||
visual.set_physics_process(false)
|
||||
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)
|
||||
manager.emit_signal(
|
||||
"npc_inventory_changed",
|
||||
npc,
|
||||
SimulationIds.RESOURCE_FOOD,
|
||||
1.0
|
||||
)
|
||||
_check(carried_food.visible, "Carried food should be visible on the NPC")
|
||||
npc.remove_inventory(SimulationIds.RESOURCE_FOOD, 1.0)
|
||||
manager.emit_signal(
|
||||
"npc_inventory_changed",
|
||||
npc,
|
||||
SimulationIds.RESOURCE_FOOD,
|
||||
0.0
|
||||
)
|
||||
_check(not carried_food.visible, "Deposited or eaten food should be hidden")
|
||||
|
||||
var resource_state: ResourceStateRecord = manager.get_resource_state(
|
||||
&"berry_bush_01"
|
||||
|
||||
Reference in New Issue
Block a user