Skip to content

Commit

Permalink
Add the ability to lock states, provinces, cultures, and religions: r…
Browse files Browse the repository at this point in the history
…efactoring (#910)

* 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 <[email protected]>
Co-authored-by: Azgaar <[email protected]>
  • Loading branch information
3 people authored Jan 8, 2023
1 parent 4ab0311 commit dada419
Show file tree
Hide file tree
Showing 14 changed files with 497 additions and 281 deletions.
4 changes: 3 additions & 1 deletion index.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
27 changes: 15 additions & 12 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
}
</style>

<link rel="preload" href="index.css?v=1.88.03" as="style" onload="this.onload=null; this.rel='stylesheet'" />
<link rel="preload" href="index.css?v=1.89.00" as="style" onload="this.onload=null; this.rel='stylesheet'" />
<link rel="preload" href="icons.css" as="style" onload="this.onload=null; this.rel='stylesheet'" />
<link rel="preload" href="libs/jquery-ui.css" as="style" onload="this.onload=null; this.rel='stylesheet'" />
</head>
Expand Down Expand Up @@ -2017,11 +2017,14 @@
</button>
<button
id="regenerateStates"
data-tip="Click to select new capitals and regenerate states. Emblems and military forces will be regenerated as well, burgs will remain as they are"
data-tip="Click to select new capitals and regenerate non-locked states. Emblems and military forces will be regenerated as well, burgs will remain as they are"
>
States
</button>
<button id="regenerateProvinces" data-tip="Click to regenerate provinces. States will remain as they are">
<button
id="regenerateProvinces"
data-tip="Click to regenerate non-locked provinces. States will remain as they are"
>
Provinces
</button>
<button
Expand All @@ -2031,16 +2034,16 @@
Burgs
</button>
<button id="regenerateEmblems" data-tip="Click to regenerate all emblems">Emblems</button>
<button id="regenerateReligions" data-tip="Click to regenerate religions">Religions</button>
<button id="regenerateCultures" data-tip="Click to regenerate cultures">Cultures</button>
<button id="regenerateReligions" data-tip="Click to regenerate non-locked religions">Religions</button>
<button id="regenerateCultures" data-tip="Click to regenerate non-locked cultures">Cultures</button>
<button
id="regenerateMilitary"
data-tip="Click to recalculate military forces based on current military options"
>
Military
</button>
<button id="regenerateIce" data-tip="Click to icebergs and glaciers">Ice</button>
<button id="regenerateMarkers" data-tip="Click to regenerate markers">
<button id="regenerateMarkers" data-tip="Click to regenerate unlocked markers">
Markers <i id="configRegenerateMarkers" class="icon-cog" data-tip="Click to set number multiplier"></i>
</button>
<button
Expand Down Expand Up @@ -7842,10 +7845,10 @@
<script src="modules/river-generator.js"></script>
<script src="modules/lakes.js"></script>
<script src="modules/names-generator.js?v=1.87.14"></script>
<script src="modules/cultures-generator.js?v=1.87.14"></script>
<script src="modules/burgs-and-states.js?v=1.87.10"></script>
<script src="modules/cultures-generator.js?v=1.89.00"></script>
<script src="modules/burgs-and-states.js?v=1.89.00"></script>
<script src="modules/routes-generator.js"></script>
<script src="modules/religions-generator.js"></script>
<script src="modules/religions-generator.js?v=1.89.00"></script>
<script src="modules/military-generator.js"></script>
<script src="modules/markers-generator.js?v=1.87.13"></script>
<script src="modules/coa-generator.js"></script>
Expand All @@ -7864,11 +7867,11 @@

<script defer src="modules/relief-icons.js"></script>
<script defer src="modules/ui/style.js"></script>
<script defer src="modules/ui/editors.js?v=1.88.06"></script>
<script defer src="modules/ui/tools.js?v=1.88.05"></script>
<script defer src="modules/ui/editors.js?v=1.87.07"></script>
<script defer src="modules/ui/tools.js?v=1.89.00"></script>
<script defer src="modules/ui/world-configurator.js"></script>
<script defer src="modules/ui/heightmap-editor.js?v=1.88.03"></script>
<script defer src="modules/ui/provinces-editor.js"></script>
<script defer src="modules/ui/provinces-editor.js?v=1.89.00"></script>
<script defer src="modules/ui/biomes-editor.js"></script>
<script defer src="modules/ui/namesbase-editor.js?v=1.87.10"></script>
<script defer src="modules/ui/elevation-profile.js"></script>
Expand Down
Loading

0 comments on commit dada419

Please sign in to comment.