Commit Graph

11 Commits

Author SHA1 Message Date
admin 4463e524aa style: apply gdformat formatting across the entire project
Auto-format all GDScript files using gdformat from gdtoolkit.
This is a baseline formatting pass to ensure consistent style:

- Normalizes indentation and spacing
- Wraps long lines to 100 characters
- Removes trailing whitespace
- Standardizes blank lines between functions

68 files reformatted, 8 files left unchanged (3rd-party addon files
with parse errors excluded).
2026-07-05 23:06:23 +02:00
admin 6dbb395bd6 feat: add location-based food storage loop 2026-07-05 17:57:24 +02:00
admin f816f3976a feat: add simulation action definitions 2026-07-05 13:35:33 +02:00
admin 37610242bf feat: add deterministic simulation foundation
Replace implicit randomness with seeded per-NPC RandomNumberGenerator
streams so the same seed always produces the same scenario outcome.

- Add SimulationClock (RefCounted): explicit fixed-step clock that
  converts frame delta into simulation ticks while preserving sub-tick
  remainder; replaces raw _process tick_timer accumulation
- Add simulation_seed export (int=1337) to SimulationManager; drive
  per-NPC RNG streams via seed + npc_id + stream_id derivation
  (stream 0=init, stream 1=wander)
- Add get_wander_offset(npc_id) to SimulationManager so wander targets
  are deterministic per seed; WorldViewManager calls it instead of
  local randf_range()
- Add get_state_snapshot() and get_state_checksum() to SimulationManager
  for headless verification and future save/load
- Convert SimNPC/SimVillage const DEBUG_LOGS to instance var debug_logs
  so headless tests can silence output without recompilation
- Pass RandomNumberGenerator through SimNPC._init() instead of using
  global randf_range() for hunger/energy/position/scoring noise
- Remove obsolete farm_zone and forest_zone exports from
  WorldViewManager and their marker/tree scene children from main.tscn;
  NPC gather tasks use ResourceNode exclusively
- Rename TaskZone container to ActivityMarkers in main.tscn and update
  all scene paths (player, WVM, tests) to match
- Add headless deterministic_simulation_test.gd: verifies clock
  accuracy, same-seed equality, different-seed divergence, and
  24-tick scenario checksum without loading main.tscn
2026-07-05 11:23:12 +02:00
admin c6033b63fb feat: authoritative extraction from ResourceNode on task completion
Phase 3 of ResourceNode migration:
- Add apply_resource_delta to SimVillage for clean resource changes
- Extract from reserved ResourceNode on task completion instead of
  hard-coded apply_npc_task for gather_food/gather_wood
- Detect depleted/unavailable targets on arrival and replan
2026-07-03 18:32:34 +02:00
Rijad Zuzo b5e2493c2a feat: add proper death from starvation and survival tasks urgency 2026-06-21 23:37:58 +02:00
Rijad Zuzo eef2068747 feat: add better priorities setting 2026-06-21 14:41:19 +02:00
Rijad Zuzo 852d10f7ae feat: add initial starvation consequence 2026-06-20 18:18:00 +02:00
Rijad Zuzo d185dcacf3 feat: add consequence with modifiers for properties 2026-06-20 17:12:10 +02:00
Rijad Zuzo fbe3487b56 feat: add actions based on village resources and profession 2026-06-19 16:16:47 +02:00
Rijad Zuzo d7022b3f27 feat: add simple village simulation of resources 2026-06-19 10:53:30 +02:00