diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/gendata.js | 139 |
1 files changed, 67 insertions, 72 deletions
diff --git a/tools/gendata.js b/tools/gendata.js index ec0f905..3c4bcb0 100644 --- a/tools/gendata.js +++ b/tools/gendata.js @@ -316,18 +316,14 @@ var vassalbox = [] const scale = 1 - let strongholds = [] - -function defloc(region, stronghold, type, name) { +function defloc(region, type, name) { let [x, y, w, h] = boxes[name] x = Math.floor(x) y = Math.floor(y) w = Math.ceil(w) h = Math.ceil(h) locmap[name] = locales.length - if (stronghold > 0) - strongholds.push(locales.length) - locales.push({ name, type, stronghold, region, ways: [], box: { x, y, w, h } }) + locales.push({ name, type, ways: [], box: { x, y, w, h } }) } function defdepleted(name) { @@ -394,71 +390,71 @@ function path(locs) { return defway('path', locs.split(", ")) } // LOCALES -defloc("North", 1, "fortress", "Bamburgh") -defloc("North", 1, "city", "Newcastle") -defloc("North", 1, "town", "Appleby") -defloc("North", 1, "town", "Hexham") -defloc("North", 1, "town", "Carlisle") - - -defloc("Wales", 1, "harlech", "Harlech") -defloc("Wales", 1, "fortress", "Pembroke") -defloc("Wales", 1, "city", "Cardiff") -defloc("Wales", 1, "city", "Hereford") -defloc("Wales", 1, "fortress", "Ludlow") -defloc("Wales", 1, "city", "Shrewsbury") - -defloc("South", 1, "city", "Salisbury") -defloc("South", 1, "city", "Winchester") -defloc("South", 1, "city", "Guildford") -defloc("South", 1, "town", "Arundel") -defloc("South", 1, "town", "Southampton") -defloc("South", 1, "city", "Rochester") -defloc("South", 1, "town", "Dover") -defloc("South", 1, "city", "Canterbury") -defloc("South", 1, "town", "Hastings") - -defloc("England", 1, "town", "Dorchester") -defloc("England", 1, "city", "Exeter") -defloc("England", 1, "town", "Plymouth") -defloc("England", 1, "city", "Launceston") -defloc("England", 1, "town", "Truro") -defloc("England", 1, "city", "Wells") -defloc("England", 1, "city", "Bristol") -defloc("England", 1, "city", "Gloucester") -defloc("England", 1, "city", "Oxford") -defloc("England", 1, "town", "Newbury") -defloc("England", 1, "london", "London") -defloc("England", 1, "town", "St Albans") -defloc("England", 1, "town", "Bedford") -defloc("England", 1, "town", "Cambridge") -defloc("England", 1, "town", "Bury St Edmunds") -defloc("England", 1, "town", "Ipswich") -defloc("England", 1, "city", "Norwich") -defloc("England", 1, "fortress", "Lynn") -defloc("England", 1, "city", "Ely") -defloc("England", 1, "city", "Peterborough") -defloc("England", 1, "town", "Northampton") -defloc("England", 1, "city", "Coventry") -defloc("England", 1, "town", "Leicester") -defloc("England", 1, "city", "Lichfield") -defloc("England", 1, "town", "Derby") -defloc("England", 1, "town", "Nottingham") -defloc("England", 1, "city", "Worcester") -defloc("England", 1, "city", "Chester") -defloc("England", 1, "town", "Lancaster") -defloc("England", 1, "city", "Lincoln") -defloc("England", 1, "city", "York") -defloc("England", 1, "calais", "Calais") -defloc("England", 1, "exile", "France") -defloc("England", 1, "exile", "Scotland") -defloc("England", 1, "exile", "Ireland") -defloc("England", 1, "exile", "Burgundy") -defloc("North", 1, "town", "Scarborough") -defloc("England", 1, "fortress", "Ravenspur") -defloc("England", 1, "sea", "English Channel") -defloc("England", 1, "sea", "Irish Sea") -defloc("England", 1, "sea", "North Sea") +defloc("North", "fortress", "Bamburgh") +defloc("North", "city", "Newcastle") +defloc("North", "town", "Appleby") +defloc("North", "town", "Hexham") +defloc("North", "town", "Carlisle") + + +defloc("Wales", "harlech", "Harlech") +defloc("Wales", "fortress", "Pembroke") +defloc("Wales", "city", "Cardiff") +defloc("Wales", "city", "Hereford") +defloc("Wales", "fortress", "Ludlow") +defloc("Wales", "city", "Shrewsbury") + +defloc("South", "city", "Salisbury") +defloc("South", "city", "Winchester") +defloc("South", "city", "Guildford") +defloc("South", "town", "Arundel") +defloc("South", "town", "Southampton") +defloc("South", "city", "Rochester") +defloc("South", "town", "Dover") +defloc("South", "city", "Canterbury") +defloc("South", "town", "Hastings") + +defloc("England", "town", "Dorchester") +defloc("England", "city", "Exeter") +defloc("England", "town", "Plymouth") +defloc("England", "city", "Launceston") +defloc("England", "town", "Truro") +defloc("England", "city", "Wells") +defloc("England", "city", "Bristol") +defloc("England", "city", "Gloucester") +defloc("England", "city", "Oxford") +defloc("England", "town", "Newbury") +defloc("England", "london", "London") +defloc("England", "town", "St Albans") +defloc("England", "town", "Bedford") +defloc("England", "town", "Cambridge") +defloc("England", "town", "Bury St Edmunds") +defloc("England", "town", "Ipswich") +defloc("England", "city", "Norwich") +defloc("England", "fortress", "Lynn") +defloc("England", "city", "Ely") +defloc("England", "city", "Peterborough") +defloc("England", "town", "Northampton") +defloc("England", "city", "Coventry") +defloc("England", "town", "Leicester") +defloc("England", "city", "Lichfield") +defloc("England", "town", "Derby") +defloc("England", "town", "Nottingham") +defloc("England", "city", "Worcester") +defloc("England", "city", "Chester") +defloc("England", "town", "Lancaster") +defloc("England", "city", "Lincoln") +defloc("England", "city", "York") +defloc("England", "calais", "Calais") +defloc("England", "exile", "France") +defloc("England", "exile", "Scotland") +defloc("England", "exile", "Ireland") +defloc("England", "exile", "Burgundy") +defloc("North", "town", "Scarborough") +defloc("England", "fortress", "Ravenspur") +defloc("England", "sea", "English Channel") +defloc("England", "sea", "Irish Sea") +defloc("England", "sea", "North Sea") // LOCALE DEPLETION @@ -1723,7 +1719,6 @@ print("way_sea_3:" + JSON.stringify(way_sea_3) + ",") print("way_port_1:" + JSON.stringify(way_port_1) + ",") print("way_port_2:" + JSON.stringify(way_port_2) + ",") print("way_port_3:" + JSON.stringify(way_port_3) + ",") -print("strongholds:" + JSON.stringify(strongholds) + ",") dumplist("locales", locales) dumplist("ways", ways) dumplist("lords", lords) |