feat: add deterministic goat routine

This commit is contained in:
Rijad Zuzo
2026-07-26 23:52:56 +02:00
parent f79c2bb630
commit e3aa3440a2
61 changed files with 1393 additions and 1057 deletions
+3 -3
View File
@@ -2,7 +2,7 @@ extends Node
const SimulationEventLogScript := preload("res://simulation/events/SimulationEventLog.gd")
const VillageEconomyScript := preload("res://simulation/economy/VillageEconomy.gd")
const AnimalCareSystemScript := preload("res://simulation/animals/AnimalCareSystem.gd")
const AnimalCareSystemScript := preload("res://simulation/animals/animal_care_system.gd")
const RelationshipSystemScript := preload("res://simulation/relationships/RelationshipSystem.gd")
const EventKnowledgeSystemScript := preload("res://simulation/knowledge/EventKnowledgeSystem.gd")
@@ -162,7 +162,7 @@ func simulate_tick() -> void:
tick_count += 1
if debug_logs:
print("--- Tick ", tick_count, " ---")
animal_care.advance()
animal_care.advance(tick_count)
var village_was_changed := false
_population_view.rebuild(npcs)
for npc in npcs:
@@ -1192,7 +1192,7 @@ func restore_state(record: SimulationStateRecord) -> bool:
for resource_record in record.resources:
resource_states[resource_record.get_node_id()] = resource_record
register_loaded_resource_nodes()
animal_care.restore_state_records(record.animals)
animal_care.restore_state_records(record.animals, tick_count)
village_changed.emit(village)
state_restored.emit()
return true