From 8063f3b9ba28d439cad6c8317d3b58796d5a5ddb Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sun, 12 Nov 2023 03:04:36 +0100 Subject: Show road limits. Use maps instead of objects for road_limit, last_used and main_road. --- tools/makeroads.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 tools/makeroads.js (limited to 'tools/makeroads.js') diff --git a/tools/makeroads.js b/tools/makeroads.js new file mode 100644 index 0000000..edff0b9 --- /dev/null +++ b/tools/makeroads.js @@ -0,0 +1,30 @@ +const print = console.log + +const data = require("../data.js") + +var w = 1275 +var h = 2475 +var m = "../map75.png" + +print(` + +`) + +for (let id in data.ROADS) { + id = id | 0 + let a = (id / 100) | 0 + let b = id % 100 + let x = (data.TOWNS[a].layout.x + data.TOWNS[b].layout.x) >> 1 + let y = (data.TOWNS[a].layout.y + data.TOWNS[b].layout.y) >> 1 + let label = data.TOWNS[a].name + " / " + data.TOWNS[b].name + print(``) +} + +print(``) -- cgit v1.2.3