[golang] implement systems and waypoints lookups
This commit is contained in:
parent
d97985a694
commit
66466e161f
10 changed files with 205 additions and 0 deletions
|
@ -23,6 +23,7 @@ type State int
|
|||
|
||||
const (
|
||||
start_running_contracts_with_the_command_ship = iota
|
||||
visit_all_shipyards
|
||||
)
|
||||
|
||||
func Run(
|
||||
|
@ -54,6 +55,11 @@ func Run(
|
|||
agent.wg.Add(1)
|
||||
go agent.autoContracting(&agent.ships[0])
|
||||
state++
|
||||
case visit_all_shipyards:
|
||||
if err := agent.visitAllShipyards(&agent.ships[1]); err != nil {
|
||||
agent.sendShipError(fmt.Errorf("agent runner returned an error on state %d: %w", state, err), &agent.ships[1])
|
||||
}
|
||||
state++
|
||||
return
|
||||
default:
|
||||
agent.sendShipError(fmt.Errorf("agent runner reach an unknown state: %d", state), nil)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue