From: Scott Worley Date: Mon, 17 Sep 2012 08:13:33 +0000 (-0700) Subject: Fix a legal-path-not-checked eden warp bug X-Git-Url: http://git.scottworley.com/planeteer/commitdiff_plain/35e3c4244a4558c9b7f4b3942e9b004c55c194d9?ds=sidebyside Fix a legal-path-not-checked eden warp bug You don't need to have a free cargo slot after warping if the hold is empty. --- diff --git a/planeteer.go b/planeteer.go index 6c8f087..1074e92 100644 --- a/planeteer.go +++ b/planeteer.go @@ -399,7 +399,7 @@ func CellValue(data planet_data, dims LogicalIndex, table []State, addr LogicalI } /* Travel here via Eden Warp Unit */ - if addr[Edens]+1 < dims[Edens] && addr[UnusedCargo] > 0 { + if addr[Edens]+1 < dims[Edens] && (addr[Hold] == 0 || addr[UnusedCargo] > 0) { _, available := data.Planets[data.i2p[addr[Location]]].RelativePrices["Eden Warp Units"] if !available { other[Edens] = addr[Edens] + 1