feat: give the player a real carried inventory and deposit transactions

This commit is contained in:
2026-08-08 23:59:19 +02:00
parent 9678526c5a
commit 5e6c963d23
12 changed files with 565 additions and 65 deletions
+13 -2
View File
@@ -298,17 +298,28 @@ func _run() -> void:
opportunity_bush_state.set_amount_remaining(1.0)
player.global_position = opportunity_bush.interaction_point.global_position
player.call("try_interact")
var carried_after_gather: float = simulation_manager.get_player_state().get_inventory_amount(
SimulationIds.RESOURCE_FOOD
)
var pantry_position: Vector3 = (
main_scene
. get_node("JajceWorld/WorldObjects/StorageSites/VillagePantry")
. get_interaction_position()
)
player.global_position = pantry_position
player.call("try_interact")
village_ui.selected_npc_index = contributor.id
village_ui.call("_refresh_npc_inspector")
_check(
(
player_opportunity.get_status() == OpportunityStateRecord.STATUS_RESOLVED
is_equal_approx(carried_after_gather, 1.0)
and player_opportunity.get_status() == OpportunityStateRecord.STATUS_RESOLVED
and "Resolved village need" in inspector_label.text
and "◆ Player restocked the pantry" in inspector_label.text
and whisper_kicker.text == "NEED MET"
and "The player restocked the pantry" in whisper_message.text
),
"Player gathering should resolve the restored need in debug detail and transient HUD"
"Player gathering and depositing should resolve the restored need in debug detail and transient HUD"
)
var woodpile_state: StorageStateRecord = simulation_manager.get_woodpile()