]> git.scottworley.com Git - planeteer/commitdiff
Only warp to planets with their beacons on.
authorScott Worley <sworley@chkno.net>
Thu, 3 Nov 2011 23:10:48 +0000 (16:10 -0700)
committerScott Worley <sworley@chkno.net>
Thu, 3 Nov 2011 23:10:48 +0000 (16:10 -0700)
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]