From 797391f853ed1af8da9f37d9367edf3e162203b7 Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Thu, 3 Nov 2011 13:56:46 -0700 Subject: [PATCH] Buy from the right cell (no UnusedCargo when empty) --- planeteer.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/planeteer.go b/planeteer.go index 1de4687..6f6f7b7 100644 --- a/planeteer.go +++ b/planeteer.go @@ -354,7 +354,10 @@ func FillCellByBuying(data planet_data, dims []int, table []State, addr []int) { quantity := *hold - (addr[UnusedCargo] + addr[Cloaks] + addr[Edens]) total_price := quantity * absolute_price other[Hold] = 0 + other[UnusedCargo] = 0 UpdateCell(table, my_index, EncodeIndex(dims, other), -total_price) + other[UnusedCargo] = addr[UnusedCargo] + other[Hold] = addr[Hold] } func FillCellByMisc(data planet_data, dims []int, table []State, addr []int) { -- 2.44.1