Skip to content

Commit

Permalink
Don't consider non-trading destinations from getDestinations
Browse files Browse the repository at this point in the history
  • Loading branch information
kfsone committed Nov 19, 2014
1 parent 9e1e010 commit 400559f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tradecalc.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,15 +431,14 @@ def getBestHops(self, routes, restrictTo=None):
maxJumps=maxJumpsPer,
maxLyPer=maxLyPer,
avoidPlaces=avoidPlaces,
trading=True,
):
tdenv.DEBUG2("destSys {}, destStn {}, jumps {}, distLy {}",
dest.system.dbname,
dest.station.dbname,
"->".join([jump.str() for jump in dest.via]),
dest.distLy)
if not dest.station in src.tradingWith:
tdenv.DEBUG3("{} is not in my station list", dest.station.name())
continue
assert dest.station in src.tradingWith
if restrictTo:
if not dest.station in restrictTo and not dest.system in restrictTo:
tdenv.DEBUG3("{} doesn't match restrict {}",
Expand Down

0 comments on commit 400559f

Please sign in to comment.