diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-06-04 21:52:04 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-06-04 22:16:11 +0200 |
commit | 329248efeb8681cac69c7db451c4601301d40049 (patch) | |
tree | 2baf5f2bdf46e21436677ed926643bd8c481b084 /tools | |
parent | 7680628caef500413c8041fce62cd6e7ddc42029 (diff) | |
download | friedrich-329248efeb8681cac69c7db451c4601301d40049.tar.gz |
Brief movement line in log + movement path on mouse-over.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/layout.svg | 18 | ||||
-rw-r--r-- | tools/parse-layout.js | 10 |
2 files changed, 14 insertions, 14 deletions
diff --git a/tools/layout.svg b/tools/layout.svg index 3e7c511..c075e05 100644 --- a/tools/layout.svg +++ b/tools/layout.svg @@ -40,10 +40,10 @@ inkscape:window-height="480" id="namedview6" showgrid="false" - inkscape:zoom="1.3492621" + inkscape:zoom="1.1602604" inkscape:cx="417.73716" inkscape:cy="1363.1515" - inkscape:current-layer="g2856" + inkscape:current-layer="svg4" inkscape:document-rotation="0" showguides="false"> <inkscape:grid @@ -53,13 +53,13 @@ <image sodipodi:absref="/home/tor/src/rally/public/friedrich/Fried.Gameboard.075.png" xlink:href="../Fried.Gameboard.075.png" - style="display:inline" - id="image2" - sodipodi:insensitive="true" - height="1654" - width="2485" + x="0" y="0" - x="0" /> + width="2485" + height="1654" + sodipodi:insensitive="true" + id="image2" + style="display:inline" /> <g id="g3080" inkscape:label="city" @@ -11152,7 +11152,7 @@ </g> <g id="g2271" - inkscape:label="major_road" + inkscape:label="main_road" style="display:none;stroke:#808080" sodipodi:insensitive="true"> <path diff --git a/tools/parse-layout.js b/tools/parse-layout.js index 3e6cf0f..e327867 100644 --- a/tools/parse-layout.js +++ b/tools/parse-layout.js @@ -309,7 +309,7 @@ for (let key in points) { x: Math.round(x), y: Math.round(y), adjacent: [], - major_roads: [], + main_roads: [], roads: [], }) } else { @@ -345,11 +345,11 @@ cities.sort((a,b) => { return b.y - a.y }) -for (let e of edges.major_road) { +for (let e of edges.main_road) { let a = find_closest_city(e.x1, e.y1) let b = find_closest_city(e.x2, e.y2) - set_add(cities[a].major_roads, b) - set_add(cities[b].major_roads, a) + set_add(cities[a].main_roads, b) + set_add(cities[b].main_roads, a) set_add(cities[a].adjacent, b) set_add(cities[b].adjacent, a) } @@ -371,7 +371,7 @@ let arrays = { x: [], y: [], adjacent: [], - major_roads: [], + main_roads: [], roads: [], } |