mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
Prevent generating cyclical heirarchy (#930)
* Prevent generating cyclical heirarchy * Update versioning.js * update version hash
This commit is contained in:
parent
5c0254afd8
commit
87e1a1cee6
3 changed files with 5 additions and 5 deletions
|
|
@ -7863,7 +7863,7 @@
|
|||
<script src="modules/cultures-generator.js?v=1.89.10"></script>
|
||||
<script src="modules/burgs-and-states.js?v=1.89.07"></script>
|
||||
<script src="modules/routes-generator.js"></script>
|
||||
<script src="modules/religions-generator.js?v=1.89.10"></script>
|
||||
<script src="modules/religions-generator.js?v=1.89.15"></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>
|
||||
|
|
|
|||
|
|
@ -597,7 +597,7 @@ window.Religions = (function () {
|
|||
checked[neibId] = true;
|
||||
|
||||
const neibReligion = religionIds[neibId];
|
||||
if (neibReligion && neibReligion !== religionId) foundReligions.add(neibReligion);
|
||||
if (neibReligion && neibReligion < religionId) foundReligions.add(neibReligion);
|
||||
if (foundReligions.size >= maxReligions) return [...foundReligions];
|
||||
queue.push(neibId);
|
||||
}
|
||||
|
|
@ -714,6 +714,7 @@ window.Religions = (function () {
|
|||
const add = function (center) {
|
||||
const {cells, cultures, religions} = pack;
|
||||
const religionId = cells.religion[center];
|
||||
const i = religions.length;
|
||||
|
||||
const cultureId = cells.culture[center];
|
||||
const missingFolk =
|
||||
|
|
@ -741,10 +742,9 @@ window.Religions = (function () {
|
|||
name,
|
||||
religions.map(r => r.code)
|
||||
);
|
||||
const influences = getReligionsInRadius(cells.c, center, cells.religion, 0, 25, 3, 0);
|
||||
const influences = getReligionsInRadius(cells.c, center, cells.religion, i, 25, 3, 0);
|
||||
const origins = type === "Folk" ? [0] : influences;
|
||||
|
||||
const i = religions.length;
|
||||
religions.push({
|
||||
i,
|
||||
name,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
// version and caching control
|
||||
const version = "1.89.14"; // generator version, update each time
|
||||
const version = "1.89.15"; // generator version, update each time
|
||||
|
||||
{
|
||||
document.title += " v" + version;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue