diff --git a/bomb.go b/bomb.go index 1ea91bc..078f5e7 100644 --- a/bomb.go +++ b/bomb.go @@ -54,9 +54,10 @@ type MakeBombState struct { func MakeBomb(s *System) ConnectionState { m := &MakeBombState{System: s} m.CommandSuite = CommandSet{ - BroadcastCommand(s), balCommand, + BroadcastCommand(s), helpCommand, + NearbyCommand(s), playersCommand, } return m diff --git a/colony.go b/colony.go index 25e1fa9..16af87a 100644 --- a/colony.go +++ b/colony.go @@ -14,6 +14,13 @@ func MakeColony(c *Connection, sys *System) { c.money -= options.colonyCost m := &MakeColonyState{ System: sys, + CommandSuite: CommandSet{ + balCommand, + BroadcastCommand(sys), + helpCommand, + NearbyCommand(sys), + playersCommand, + }, } c.SetState(m) } diff --git a/commands.go b/commands.go index c76b576..a02cd00 100644 --- a/commands.go +++ b/commands.go @@ -137,7 +137,7 @@ func NearbyCommand(sys *System) Command { c.Printf("--------------------------------------------------------------------------------\n") for _, neighbor := range neighbors { other := index[neighbor.id] - c.Printf("%-4d %-20s %v\n", other.id, other.name, neighbor.distance) + c.Printf("%-4d %-20s %-5.6v\n", other.id, other.name, neighbor.distance) } c.Printf("--------------------------------------------------------------------------------\n") } diff --git a/idle.go b/idle.go index a2d6993..9f6f6b7 100644 --- a/idle.go +++ b/idle.go @@ -107,6 +107,7 @@ func (i *IdleState) mine(c *Connection, args ...string) { func (i *IdleState) info(c *Connection, args ...string) { c.Printf("Currently idle on system %v\n", i.System) + c.Printf("Space duckets available: %v\n", i.money) } func (i *IdleState) scan(c *Connection, args ...string) { diff --git a/system.go b/system.go index 841ed2f..741668e 100644 --- a/system.go +++ b/system.go @@ -42,8 +42,9 @@ func GetSystem(id string) (*System, error) { } func (s *System) Tick(frame int64) { - if s.colonizedBy != nil { + if s.colonizedBy != nil && s.money > 0 { s.colonizedBy.Deposit(1) + s.money -= 1 } }