* Add the ability to lock states, provinces, cultures, and religions (#902)
* Add the basis for locking everything, code and test the culture locking
* Got the religion generator working, but not the tree. There are cycles being generated
* Religions work now, including the tree view
* Got the states and provinces working as well, all good and ready
* Refresh the province editor when regenerating
* Implement the versioning steps
* Fix the state naming and color changing even when locked
* The fix did not work with loaded maps, fix that too
* Fix a few more bugs and address the PR feedback
* Fix the state expanding event when they're locked bug
* Implement some logic to ignore state being locked when regenerating provinces directly.
* refactor(#902): start with states regenertion
* refactor(#902): locked states cells to be assigned on start
* refactor(#902): lock state - keep label
* refactor(#902): lock provinces
* refactor(#902): regenerate states - update provinces
* refactor(#902): regenerate cultures
* refactor(#902): regenerate religions
Co-authored-by: Guillaume St-Pierre <gstpierre01@gmail.com>
Co-authored-by: Azgaar <maxganiev@yandex.com>
Sorted the lists, arrays and weighted arrays of items in alphabetical order. Some remain in the order assigned by weighted random.
I think this helps people spot missing items on the list if they check by name.
The number of items is the same, they just got reordered.
* Add the ability to regenerate cultures
- Added a button to the tools menu for regeneration.
- Regeneration button will handle initial generation of cultures and expansion afterwards.
- Pressing regenerate will warn the user.
- Small cleanup of trailing whitespace.
* Refreshing cultures editor updates culture centers
* Regenerating cultures refreshes the culture editor
* Added a function to refresh all open editors
* Reset burg and state cultures after regeneration
* Address the problem of potential data loss
Any errors while iterating the states or burgs could potentially lose the index 0 metadata stored in the arrays. This will instead track the index and ignore the 0th result.
* Religions update cultures on culture regeneration
Updated function names to be more similar and more descriptive