summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-07-22 17:04:41 +0200
committerTor Andersson <tor@ccxvii.net>2022-11-17 13:11:26 +0100
commit90c24bbb0bc3d461a8239f60ca50f1e8eb486d5d (patch)
treedb8c49b416adff60e7a808c6b4703d9bfd52c80b /tools
parentb6b5a40502751ecf66bc3ac00890634df0504ecc (diff)
downloadrommel-in-the-desert-90c24bbb0bc3d461a8239f60ca50f1e8eb486d5d.tar.gz
move to final destination only
Diffstat (limited to 'tools')
-rw-r--r--tools/gendata.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/gendata.js b/tools/gendata.js
index a963248..1af2356 100644
--- a/tools/gendata.js
+++ b/tools/gendata.js
@@ -56,7 +56,8 @@ function def_side(t,a,b) {
function def_road(t, list) {
for (let i = 0; i < list.length; ++i)
- hex_road[list[i]] = t;
+ if (t > hex_road[list[i]])
+ hex_road[list[i]] = t;
for (let i = 1; i < list.length; ++i) {
let s = to_side_id(list[i-1], list[i]);
side_road[s] = t;