summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js18
1 files changed, 7 insertions, 11 deletions
diff --git a/rules.js b/rules.js
index 1c64aac..a436101 100644
--- a/rules.js
+++ b/rules.js
@@ -1179,8 +1179,8 @@ function is_supply_line_blocked(here, next, side) {
const TRACE_HIGHWAY = 0
const TRACE_TRACK_1 = 1
-const TRACE_TRACK_2 = 2
-const TRACE_TRAIL_1 = 3
+const TRACE_TRAIL_1 = 2
+const TRACE_TRACK_2 = 3
const TRACE_STOP = 7
const TRACE_ABORT = 8
@@ -1241,12 +1241,9 @@ function trace_supply_network_1(start)
if (next_move === TRACE_ABORT)
continue
- if (side_road[side] === HIGHWAY)
- supply_line[side] = 1
- else
- supply_line[side] = 1
+ supply_line[side] = 1
- // already seen
+ // already seen (at same or better)
if (next_move >= supply_visited[next])
continue
@@ -1255,10 +1252,8 @@ function trace_supply_network_1(start)
next_move = TRACE_HIGHWAY
supply_visited[next] = next_move
- if (side_road[side] === HIGHWAY)
- supply_net[next] = 1
- else
- supply_net[next] = 1
+
+ supply_net[next] = 1
if (next_move !== TRACE_STOP)
queue.push((next << 3) | next_move)
@@ -1483,6 +1478,7 @@ function trace_supply_network(start) {
}
trace_supply_network_3()
+
supply_net[start] = 1
}