From 80b8bc89a16f40ec3f9df7d34fdfbdb392299b6d Mon Sep 17 00:00:00 2001 From: Guillaume St-Pierre Date: Thu, 15 Dec 2022 15:32:49 -0500 Subject: [PATCH] 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. --- index.css | 4 +- index.html | 22 +- modules/burgs-and-states.js | 284 +++++++++++++++++++- modules/cultures-generator.js | 46 +++- modules/dynamic/editors/cultures-editor.js | 15 ++ modules/dynamic/editors/religions-editor.js | 18 ++ modules/dynamic/editors/states-editor.js | 10 + modules/religions-generator.js | 145 +++++++++- modules/ui/provinces-editor.js | 10 + modules/ui/tools.js | 92 +------ versioning.js | 3 +- 11 files changed, 522 insertions(+), 127 deletions(-) diff --git a/index.css b/index.css index ae603566..bfd1ed67 100644 --- a/index.css +++ b/index.css @@ -1437,7 +1437,9 @@ div.states .icon-trash-empty, div.states .icon-eye, div.states .icon-pin, div.states .icon-flag-empty, -div.states .icon-cw { +div.states .icon-cw, +div.states .icon-lock, +div.states .icon-lock-open { cursor: pointer; } diff --git a/index.html b/index.html index f4472f74..e05c060e 100644 --- a/index.html +++ b/index.html @@ -108,7 +108,7 @@ } - + @@ -2017,11 +2017,11 @@ - - - + + -