Skip to content

Conversation

wvpm
Copy link
Contributor

@wvpm wvpm commented Aug 14, 2025

States were never registered to the country instance. Also they stored their owner separately despite it being linked to the capital owner. This has changed. In the gamestate update and State constructor, the state adds itself from the country instance (and/or removes from the old). The owner is no longer stored as a field, instead it is retrieved via the capital province.

Countries can recruit regiments. Regiments can have cultural limitations (all cultures, all accepted or primary only). The country stores a field containing the most permissive cultural limitation based on the unlocked unit types. This was never updates.
Now it is updated whenever a regiment type is locked or unlocked.

The console output was flooded by messages saying that the buildings registry was locked. This caused Godot to error due to being flooded. The IdentifierRegistry has a constructor overload that takes a bool indicating whether or not to log upon locking. For province buildings, this is now set to not log when locking.

In the InstanceManager, the order of execution when loading a bookmark is changed:
First map_instance.initialise_for_new_game(*this); and then country_instance_manager.update_gamestate(*this); instead of the other way around. This ensures that the states, provinces and pops have their state updated before we aggregate it in the countries. Note it now mimics the order in InstanceManager::update_gamestate().

@wvpm wvpm added bug Something isn't working enhancement New feature or request labels Aug 14, 2025
@wvpm wvpm added this to the 0.9.0 milestone Aug 14, 2025
@Spartan322 Spartan322 added topic:map enhancement New feature or request topic:military and removed enhancement New feature or request labels Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request topic:map topic:military
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants