From 25354888d43bdb340e9a277b6a45dadd7c6f2d19 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 13 Jul 2023 18:03:37 +0200 Subject: Optimize own supply line search. --- rules.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rules.js b/rules.js index 316d2ac..686dcdb 100644 --- a/rules.js +++ b/rules.js @@ -1591,6 +1591,10 @@ function search_own_supply_line_rec(path, here, ssrc, sline, sdist) { let side = to_side(here, next, s) + // must move closer (because we only search supply line for withdrawal purposes) + if (sdist[next] > sdist[here] && side !== BARDIA_FT_CAPUZZO) + continue + // must follow supply line if (sline[side] === 0) continue -- cgit v1.2.3