summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-03-17 18:33:34 +0100
committerTor Andersson <tor@ccxvii.net>2024-03-17 18:33:34 +0100
commit8eda31b500eb6ec8778d299daf373a430ad4c98e (patch)
tree554f34bfe7aee1925734e1920a10582b6d5b3189 /tools
parent7b98e9c6efd97470248fb244a20c3dacb2942cd1 (diff)
downloadmaria-8eda31b500eb6ec8778d299daf373a430ad4c98e.tar.gz
Add cities and roads to client.
Diffstat (limited to 'tools')
-rw-r--r--tools/parse-layout.js26
1 files changed, 15 insertions, 11 deletions
diff --git a/tools/parse-layout.js b/tools/parse-layout.js
index e3a76fd..8cf2a9f 100644
--- a/tools/parse-layout.js
+++ b/tools/parse-layout.js
@@ -224,8 +224,8 @@ const BAVARIA = "Bavaria"
const PRUSSIA = "Prussia"
const SAXONY = "Saxony"
const AUSTRIA = "Austria"
-const AUSTRIAN_NETHERLANDS = "Austrian Netherlands"
-const HRE = "Holy Roman Empire"
+const AUSTRIAN_NETHERLANDS = "Austria"
+const HRE = "HRE"
const NETHERLANDS = "Netherlands"
const SILESIA = "Silesia"
const POLAND = "Poland"
@@ -268,7 +268,7 @@ for (let key in points) {
}
else if (find_enclosing_rect(rects.$Austria_W, x, y)) {
map = FLANDERS
- country = AUSTRIA
+ country = AUSTRIAN_NETHERLANDS
}
else if (find_enclosing_rect(rects.$Austria_E, x, y)) {
map = BOHEMIA
@@ -325,16 +325,20 @@ for (let key in points) {
}
cities.sort((a,b) => {
- if (a.map < b.map) return 1
- if (a.map > b.map) return -1
if (a.country < b.country) return -1
if (a.country > b.country) return 1
+
+ if (a.map < b.map) return 1
+ if (a.map > b.map) return -1
+
if (a.suit < b.suit) return -1
if (a.suit > b.suit) return 1
- if (a.type === "major_fortress" && b.type !== "major_fortress") return -1
- if (a.type !== "major_fortress" && b.type === "major_fortress") return 1
- if (a.type === "minor_fortress" && b.type !== "minor_fortress") return -1
- if (a.type !== "minor_fortress" && b.type === "minor_fortress") return 1
+
+ //if (a.type === "major_fortress" && b.type !== "major_fortress") return -1
+ //if (a.type !== "major_fortress" && b.type === "major_fortress") return 1
+ //if (a.type === "minor_fortress" && b.type !== "minor_fortress") return -1
+ //if (a.type !== "minor_fortress" && b.type === "minor_fortress") return 1
+
if (a.name < b.name) return -1
if (a.name > b.name) return 1
return b.y - a.y
@@ -357,7 +361,7 @@ for (let e of edges.road) {
let arrays = {
name: [],
// map: [],
- // country: [],
+ country: [],
// suit: [],
// type: [],
x: [],
@@ -391,7 +395,7 @@ let sets = {
Prussia: [],
Saxony: [],
Silesia: [],
- "Holy Roman Empire": [],
+ HRE: [],
},
}