mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-18 02:01:22 +01:00
Merge branch 'master' of https://github.com/Azgaar/Fantasy-Map-Generator into refactor-path-detection
This commit is contained in:
commit
966fac8643
5 changed files with 25 additions and 22 deletions
|
|
@ -8050,8 +8050,8 @@
|
|||
<script src="modules/routes-generator.js?v=1.99.04"></script>
|
||||
<script src="modules/religions-generator.js?v=1.99.05"></script>
|
||||
<script src="modules/military-generator.js?v=1.104.0"></script>
|
||||
<script src="modules/markers-generator.js?v=1.99.00"></script>
|
||||
<script src="modules/zones-generator.js?v=1.100.00"></script>
|
||||
<script src="modules/markers-generator.js?v=1.104.0"></script>
|
||||
<script src="modules/zones-generator.js?v=1.104.0"></script>
|
||||
<script src="modules/coa-generator.js?v=1.99.00"></script>
|
||||
<script src="modules/submap.js?v=1.104.0"></script>
|
||||
<script src="libs/alea.min.js"></script>
|
||||
|
|
@ -8080,7 +8080,7 @@
|
|||
<script defer src="modules/ui/temperature-graph.js?v=1.99.00"></script>
|
||||
<script defer src="modules/ui/routes-editor.js?v=1.99.02"></script>
|
||||
<script defer src="modules/ui/routes-creator.js?v=1.99.02"></script>
|
||||
<script defer src="modules/ui/route-group-editor.js?v=1.99.00"></script>
|
||||
<script defer src="modules/ui/route-group-editor.js?v=1.103.8"></script>
|
||||
<script defer src="modules/ui/ice-editor.js?v=1.99.00"></script>
|
||||
<script defer src="modules/ui/lakes-editor.js?v=1.99.00"></script>
|
||||
<script defer src="modules/ui/coastline-editor.js?v=1.99.00"></script>
|
||||
|
|
|
|||
|
|
@ -725,10 +725,7 @@ window.Routes = (function () {
|
|||
}
|
||||
|
||||
pack.routes = pack.routes.filter(r => r.i !== route.i);
|
||||
viewbox
|
||||
.select("#routes")
|
||||
.select("#route" + route.i)
|
||||
.remove();
|
||||
viewbox.select("#route" + route.i).remove();
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ function editRouteGroups() {
|
|||
// add listeners
|
||||
byId("routeGroupsEditorAdd").addEventListener("click", addGroup);
|
||||
byId("routeGroupsEditorBody").on("click", ev => {
|
||||
const group = ev.target.parentNode.dataset.id;
|
||||
const group = ev.target.closest(".states")?.dataset.id;
|
||||
if (ev.target.classList.contains("editStyle")) editStyle("routes", group);
|
||||
else if (ev.target.classList.contains("removeGroup")) removeGroup(group);
|
||||
});
|
||||
|
|
@ -72,12 +72,11 @@ function editRouteGroups() {
|
|||
confirmationDialog({
|
||||
title: "Remove route group",
|
||||
message:
|
||||
"Are you sure you want to remove the entire route group? All routes in this group will be removed. This action can't be reverted.",
|
||||
"Are you sure you want to remove the entire route group? All routes in this group will be removed.<br>This action can't be reverted",
|
||||
confirm: "Remove",
|
||||
onConfirm: () => {
|
||||
const routes = pack.routes.filter(r => r.group === group);
|
||||
routes.forEach(r => Routes.remove(r));
|
||||
if (DEFAULT_GROUPS.includes(group)) routes.select(`#${group}`).remove();
|
||||
pack.routes.filter(r => r.group === group).forEach(Routes.remove);
|
||||
if (!DEFAULT_GROUPS.includes(group)) routes.select(`#${group}`).remove();
|
||||
addLines();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -50,14 +50,14 @@ window.Zones = (function () {
|
|||
const startCell = ra(borderCells);
|
||||
if (startCell === undefined) return;
|
||||
|
||||
const invationCells = [];
|
||||
const invasionCells = [];
|
||||
const queue = [startCell];
|
||||
const maxCells = rand(5, 30);
|
||||
|
||||
while (queue.length) {
|
||||
const cellId = P(0.4) ? queue.shift() : queue.pop();
|
||||
invationCells.push(cellId);
|
||||
if (invationCells.length >= maxCells) break;
|
||||
invasionCells.push(cellId);
|
||||
if (invasionCells.length >= maxCells) break;
|
||||
|
||||
cells.c[cellId].forEach(neibCellId => {
|
||||
if (usedCells[neibCellId]) return;
|
||||
|
|
@ -73,15 +73,19 @@ window.Zones = (function () {
|
|||
Conquest: 3,
|
||||
Incursion: 2,
|
||||
Intervention: 2,
|
||||
Subjugation: 1,
|
||||
Assault: 1,
|
||||
Foray: 1,
|
||||
Skirmishes: 1,
|
||||
Intrusion: 1,
|
||||
Irruption: 1,
|
||||
Offensive: 1,
|
||||
Pillaging: 1,
|
||||
Raid: 1
|
||||
Plunder: 1,
|
||||
Raid: 1,
|
||||
Skirmishes: 1
|
||||
});
|
||||
const name = getAdjective(states[attacker].name) + " " + subtype;
|
||||
|
||||
pack.zones.push({i: pack.zones.length, name, type: "Invasion", cells: invationCells, color: "url(#hatch1)"});
|
||||
pack.zones.push({i: pack.zones.length, name, type: "Invasion", cells: invasionCells, color: "url(#hatch1)"});
|
||||
}
|
||||
|
||||
function addRebels(usedCells) {
|
||||
|
|
@ -120,10 +124,13 @@ window.Zones = (function () {
|
|||
Insurrection: 2,
|
||||
Mutineers: 1,
|
||||
Insurgents: 1,
|
||||
Rebellion: 1,
|
||||
Renegades: 1,
|
||||
Revolters: 1,
|
||||
Revolutionaries: 1,
|
||||
Rioters: 1,
|
||||
Separatists: 1,
|
||||
Secessionists: 1,
|
||||
Rebellion: 1,
|
||||
Conspiracy: 1
|
||||
});
|
||||
|
||||
|
|
@ -226,7 +233,7 @@ window.Zones = (function () {
|
|||
const name = `${(() => {
|
||||
const model = rw({color: 2, animal: 1, adjective: 1});
|
||||
if (model === "color") return ra(["Amber", "Azure", "Black", "Blue", "Brown", "Crimson", "Emerald", "Golden", "Green", "Grey", "Orange", "Pink", "Purple", "Red", "Ruby", "Scarlet", "Silver", "Violet", "White", "Yellow"]);
|
||||
if (model === "animal") return ra(["Ape", "Bear", "Bird", "Boar", "Cat", "Cow", "Dog", "Fox", "Horse", "Lion", "Pig", "Rat", "Raven", "Sheep", "Spider", "Tiger", "Viper", "Wolf", "Worm", "Wyrm"]);
|
||||
if (model === "animal") return ra(["Ape", "Bear", "Bird", "Boar", "Cat", "Cow", "Deer", "Dog", "Fox", "Goat", "Horse", "Lion", "Pig", "Rat", "Raven", "Sheep", "Spider", "Tiger", "Viper", "Wolf", "Worm", "Wyrm"]);
|
||||
if (model === "adjective") return ra(["Blind", "Bloody", "Brutal", "Burning", "Deadly", "Fatal", "Furious", "Great", "Grim", "Horrible", "Invisible", "Lethal", "Loud", "Mortal", "Savage", "Severe", "Silent", "Unknown", "Venomous", "Vicious"]);
|
||||
})()} ${rw({Fever: 5, Plague: 3, Cough: 3, Flu: 2, Pox: 2, Cholera: 2, Typhoid: 2, Leprosy: 1, Smallpox: 1, Pestilence: 1, Consumption: 1, Malaria: 1, Dropsy: 1})}`;
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
*
|
||||
* Example: 1.102.2 -> Major version 1, Minor version 102, Patch version 2
|
||||
*/
|
||||
const VERSION = "1.103.5";
|
||||
const VERSION = "1.103.8";
|
||||
if (parseMapVersion(VERSION) !== VERSION) alert("versioning.js: Invalid format or parsing function");
|
||||
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue