feat: add simple village simulation of resources

This commit is contained in:
Rijad Zuzo
2026-06-19 10:53:30 +02:00
parent d85fc5a7f9
commit d7022b3f27
3 changed files with 47 additions and 0 deletions
+10
View File
@@ -1,6 +1,10 @@
extends Node
signal npc_task_changed(npc: SimNPC, old_task: String, new_task: String)
signal village_changed(village: SimVillage)
var village := SimVillage.new()
const DEBUG_LOGS := true
var npcs: Array[SimNPC] = []
@@ -68,3 +72,9 @@ func simulate_tick() -> void:
" | energy: ",
round(npc.energy)
)
for npc in npcs:
village.apply_npc_task(npc)
village_changed.emit(village)
if DEBUG_LOGS:
print(village.get_summary())