Add comprehensive civilization evolution tests and enhance civilization state management

- Introduced a new test script for civilization evolution (`test_civilization_evolution.gd`) to validate the evolution mechanics, including population dynamics, ethical transitions, and war impacts.
- Updated `README.md` to include instructions for running the new civilization evolution tests.
- Modified `test_civilization_state.gd` to accommodate changes in civilization rules and ensure proper validation of ethical stages.
- Enhanced `test_descriptions.gd` to check for accurate population counters and state validation.
- Adjusted `test_life.gd` to reflect updates in life version management.
- Improved `civilization_state.gd` to include habitat budget calculations and transition management.
- Added `civilization_evolution.gd` to handle the logic for civilization evolution, including population drift, warfare, and colonization mechanics.
- Updated `owniverse.gd` and `owniverse_entity.gd` to integrate new evolution logic and ensure proper initialization of entities.
This commit is contained in:
Kirill
2026-09-16 19:54:47 +03:00
parent 5ea65a7e9b
commit 26347fca30
14 changed files with 607 additions and 20 deletions
+1 -1
View File
@@ -103,7 +103,7 @@ func run() -> void:
world.state.life_version = 1
world.state.amount["C0.0"] = 40000.0
world.initialize_life_batches()
check(world.state.life_version == 2 and world.state.batches["C0.0"][0].created_from == 123.4, "Previous life saves receive missing civilization cohorts")
check(world.state.life_version == 3 and world.state.batches["C0.0"][0].created_from == 123.4, "Previous life saves receive missing civilization cohorts")
before = world.state.duplicate(true)
world.initialize_life_batches()
check(world.state == before, "Second life migration is idempotent")