diff options
Diffstat (limited to 'tools/parse-layout.js')
-rw-r--r-- | tools/parse-layout.js | 26 |
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: [], }, } |