diff options
author | Troy Nordine <tdnordine@gmail.com> | 2023-09-19 08:06:02 -0500 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-12-10 18:16:55 +0100 |
commit | e3d722f793e2307bb0be1566c8cf6f35c730479c (patch) | |
tree | 4c18c187160a679e54f2dc370de0ac15adf082ab /tools/gendata.js | |
parent | 351cf02deb5088680c4cc41409e7a1ce1c2f2640 (diff) | |
download | plantagenet-e3d722f793e2307bb0be1566c8cf6f35c730479c.tar.gz |
Vassal Initial implementation
Diffstat (limited to 'tools/gendata.js')
-rw-r--r-- | tools/gendata.js | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/tools/gendata.js b/tools/gendata.js index 38e240d..a05c325 100644 --- a/tools/gendata.js +++ b/tools/gendata.js @@ -804,7 +804,7 @@ locales.forEach(loc => { }) function seats(list) { - return list.split(", ").map(name => locmap[name]).sort(cmpnum) + return list.split(", ").filter(name => name !== "").map(name => locmap[name]).sort(cmpnum) } let lords = [ @@ -1684,26 +1684,26 @@ lords.forEach(lord => { lord.id = "lord_" + clean_name(lord.name) }) -vassal(1, "Norfolk", "Arundel", 0) -vassal(1, "Stanley", "Derby", 0) -vassal(3, "Fauconberg", "Dover", 2) -vassal(2, "Devon", "Exeter", -1) -vassal(3, "Suffolk", "Ipswich", 1) -vassal(1, "Bonville", "Launceston", 1) -vassal(1, "Dudley", "Leicester", 0) -vassal(1, "Beaumont", "Arundel", -2) -vassal(2, "Oxford", "Oxford", 0) -vassal(2, "Shrewsbury", "Shrewsbury", -1) -vassal(1, "Essex", "St Albans", 0) -vassal(3, "Westmoreland", "Appleby", 0) -vassal(3, "Worcester", "Worcester", 0) - -vassal(0, "Trollope", "none", 0, "Andrew Trollope") -vassal(0, "Clifford", "none", 0, "My father's blood") -vassal(0, "Edward", "none", 0, "Edward") -vassal(0, "Thomas Stanley", "none", 0, "Thomas Stanley") -vassal(0, "Montagu", "none", 0, "Alice Montagu") -vassal(0, "Hastings", "none", 0, "Hastings") +vassal(1, "Norfolk", seats("Arundel"), 0) +vassal(1, "Stanley", seats("Derby"), 0) +vassal(3, "Fauconberg", seats("Dover"), 2) +vassal(2, "Devon", seats("Exeter"), -1) +vassal(3, "Suffolk", seats("Ipswich"), 1) +vassal(1, "Bonville", seats("Launceston"), 1) +vassal(1, "Dudley", seats("Leicester"), 0) +vassal(1, "Beaumont", seats("Lincoln"), -2) +vassal(2, "Oxford", seats("Oxford"), 0) +vassal(2, "Shrewsbury", seats("Shrewsbury"), -1) +vassal(1, "Essex", seats("St Albans"), 0) +vassal(3, "Westmoreland", seats("Appleby"), 0) +vassal(3, "Worcester", seats("Worcester"), 0) + +vassal(0, "Trollope", seats(''), 0, "Andrew Trollope") +vassal(0, "Clifford", seats(''), 0, "My father's blood") +vassal(0, "Edward", seats(''), 0, "Edward") +vassal(0, "Thomas Stanley", seats(''), 0, "Thomas Stanley") +vassal(0, "Montagu", seats(''), 0, "Alice Montagu") +vassal(0, "Hastings", seats(''), 0, "Hastings") print("const data = {") print("seaports:" + JSON.stringify(seaports) + ",") |