feat: let the player live as a citizen with needs and carried inventory

This commit is contained in:
Rijad Zuzo
2026-08-11 00:18:39 +02:00
parent f72aa659d2
commit 37f262fb84
20 changed files with 746 additions and 90 deletions
@@ -537,6 +537,8 @@ static func _is_valid_supply(
var event_type := StringName(event.data["event_type"])
var actor_id := int(event.data["actor_id"])
if event_type == SimulationIds.EVENT_STORAGE_DEPOSITED:
if actor_id == SimulationIds.PLAYER_ACTOR_ID:
return StringName(event.data["source_id"]) == SimulationIds.PLAYER_INVENTORY_ID
return (
_find_npc(actor_id, npcs) != null
and StringName(event.data["source_id"]) == SimulationIds.npc_inventory_id(actor_id)