feat: add missing wood opportunities
This commit is contained in:
@@ -235,9 +235,10 @@ func _run() -> void:
|
||||
var old_contributor_visual := contributor_visual
|
||||
_check(
|
||||
simulation_manager.restore_state_from_json(active_need_json),
|
||||
"The visible shortage should survive a valid schema-v8 restore"
|
||||
"The visible shortage should survive a valid schema-v9 restore"
|
||||
)
|
||||
await process_frame
|
||||
contributor = simulation_manager.npcs[contributor.id]
|
||||
contributor_visual = world_view.active_npc_visuals[contributor.id]
|
||||
player_opportunity = simulation_manager.get_active_opportunity()
|
||||
_check(
|
||||
@@ -270,6 +271,42 @@ func _run() -> void:
|
||||
),
|
||||
"Player gathering should resolve the same need and be named from its real event"
|
||||
)
|
||||
|
||||
var woodpile_state: StorageStateRecord = simulation_manager.get_woodpile()
|
||||
woodpile_state.withdraw(
|
||||
SimulationIds.RESOURCE_WOOD, woodpile_state.get_amount(SimulationIds.RESOURCE_WOOD)
|
||||
)
|
||||
simulation_manager.economy.sync_resource(SimulationIds.RESOURCE_WOOD)
|
||||
contributor.set_task(SimulationIds.ACTION_STUDY, 1.0)
|
||||
contributor.start_working()
|
||||
simulation_manager.simulate_tick()
|
||||
village_ui.selected_npc_index = contributor.id
|
||||
village_ui.call("_refresh_npc_inspector")
|
||||
_check(
|
||||
(
|
||||
"◆ Supply wood for blocked work" in village_stats_label.text
|
||||
and "could not finish Study" in village_stats_label.text
|
||||
and "◆ Find wood for Study" in inspector_label.text
|
||||
and not contributor_visual.get_node("OpportunityConcernRoot").visible
|
||||
),
|
||||
"A real missing-wood fact should surface through wood-specific UI without a food cue"
|
||||
)
|
||||
contributor.add_inventory(SimulationIds.RESOURCE_WOOD, 1.0)
|
||||
_check(
|
||||
is_equal_approx(
|
||||
simulation_manager.economy.deposit_inventory(contributor, SimulationIds.RESOURCE_WOOD),
|
||||
1.0
|
||||
),
|
||||
"Runtime opportunity presentation should resolve from a real wood deposit"
|
||||
)
|
||||
village_ui.call("_refresh_npc_inspector")
|
||||
_check(
|
||||
(
|
||||
"Village need" not in village_stats_label.text
|
||||
and "◆ %s supplied the woodpile" % contributor.npc_name in inspector_label.text
|
||||
),
|
||||
"The resolved wood need should name its exact supplier and leave the active summary"
|
||||
)
|
||||
_check(
|
||||
main_scene.has_node("JajceWorld/TerrainRoot/Terrain3D"),
|
||||
"Playable runtime should instance the Jajce Terrain3D world"
|
||||
|
||||
Reference in New Issue
Block a user