summaryrefslogtreecommitdiff
path: root/tools/gendata.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-06-04 00:04:51 +0200
committerTor Andersson <tor@ccxvii.net>2023-12-10 18:16:54 +0100
commit1dcac0dae908846d392f0e07e33ebff3c1432f5c (patch)
tree52705744f8cedb6bda59dbf5db30d01eec1f293a /tools/gendata.js
parent44a5fe4d1a1876e23aab1bd963e5b523943b44a9 (diff)
downloadplantagenet-1dcac0dae908846d392f0e07e33ebff3c1432f5c.tar.gz
More image renaming.
Diffstat (limited to 'tools/gendata.js')
-rw-r--r--tools/gendata.js8
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)