]> git.scottworley.com Git - planeteer/blobdiff - planeteer.go
Only warp to planets with their beacons on.
[planeteer] / planeteer.go
index c207c13c1fe05719c3e5fcfdc19f677282fcb63c..9ff2de79976d0f4ef565ff3009c3d59ac50450f1 100644 (file)
@@ -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]