diff options
Diffstat (limited to 'tools/gendata.js')
-rw-r--r-- | tools/gendata.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/gendata.js b/tools/gendata.js index f0c9c31..555d6a7 100644 --- a/tools/gendata.js +++ b/tools/gendata.js @@ -7,6 +7,10 @@ const fs = require('fs') function cmpnum(a,b) { return a - b } function cmpnum2(a,b) { return a[0] - b[0] } +function clean_name(name) { + return name.toLowerCase().replaceAll("&", "and").replaceAll(" ", "_") +} + // :r !python3 genboxes.py const boxes = { "0": [60,1613,48,48], @@ -1264,6 +1268,10 @@ function vassal(service, name, seat, influence, capability) { vassals.push({service, name, seat, influence, capability }) } +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) |