From beb45aca52dcfc46c014fc70f2e433bf3cad571f Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Thu, 3 Nov 2011 16:10:48 -0700 Subject: [PATCH] Only warp to planets with their beacons on. --- planeteer.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/planeteer.go b/planeteer.go index c207c13..9ff2de7 100644 --- a/planeteer.go +++ b/planeteer.go @@ -278,7 +278,9 @@ func FillCellByArriving(data planet_data, dims []int, table []State, addr []int) if addr[Fuel]+2 < dims[Fuel] { other[Fuel] = addr[Fuel] + 2 for other[Location] = 0; other[Location] < dims[Location]; other[Location]++ { - UpdateCell(table, my_index, EncodeIndex(dims, other), 0) + if data.Planets[data.i2p[addr[Location]]].BeaconOn { + UpdateCell(table, my_index, EncodeIndex(dims, other), 0) + } } other[Location] = addr[Location] other[Fuel] = addr[Fuel] -- 2.44.1