From ae66c6ac3ed4f2cfff6e41121161cd83a9c5289b Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 18 Jul 2022 13:30:33 +0200 Subject: Cleanups. --- tools/gendata.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tools') 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 }"); -- cgit v1.2.3