summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-07-18 13:30:33 +0200
committerTor Andersson <tor@ccxvii.net>2022-11-17 13:11:25 +0100
commitae66c6ac3ed4f2cfff6e41121161cd83a9c5289b (patch)
tree0b7ce18a58833704dda09cd729d7dd9972170bf3 /tools
parent107df9df212cc7d67791618e1b8c34ebbf97aeaa (diff)
downloadrommel-in-the-desert-ae66c6ac3ed4f2cfff6e41121161cd83a9c5289b.tar.gz
Cleanups.
Diffstat (limited to 'tools')
-rw-r--r--tools/gendata.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/gendata.js b/tools/gendata.js
index a4fb97c..a963248 100644
--- a/tools/gendata.js
+++ b/tools/gendata.js
@@ -571,6 +571,9 @@ def_block("allied", "armor", 18, 3, 1, 77, "Sher/A");
def_block("allied", "mot. a/t", 18, 4, 0, 78, "6#/B");
def_block("allied", "mot. inf.", 18, 4, 0, 79, "51H/154");
+let all_hexes = hex_exists.map((x,i) => x ? i : 0).filter(x => x > 0)
+
+console.log("const all_hexes = " + JSON.stringify(all_hexes));
console.log("const hex_exists = " + JSON.stringify(hex_exists));
console.log("const hex_road = " + JSON.stringify(hex_road));
console.log("const side_road = " + JSON.stringify(side_road));
@@ -578,4 +581,4 @@ console.log("const side_limit = " + JSON.stringify(side_limit));
console.log("const hex_name = " + JSON.stringify(hex_name));
console.log("const regions = " + JSON.stringify(regions));
console.log("const units = " + JSON.stringify(units));
-console.log("if (typeof module !== 'undefined') module.exports = { hex_exists, hex_name, hex_road, side_road, side_limit, regions, units }");
+console.log("if (typeof module !== 'undefined') module.exports = { all_hexes, hex_exists, hex_name, hex_road, side_road, side_limit, regions, units }");