Refactor accounts to store a data map rather than just a rover ID
This commit is contained in:
parent
7749854eb7
commit
8f25f55658
4 changed files with 33 additions and 31 deletions
|
@ -289,7 +289,7 @@ func (s *Server) SpawnRoverForAccount(account string) (game.RoverAttributes, uui
|
|||
return game.RoverAttributes{}, uuid.UUID{}, fmt.Errorf("No attributes found for created rover: %s", err)
|
||||
|
||||
} else {
|
||||
if err := s.accountant.AssignRover(account, inst); err != nil {
|
||||
if err := s.accountant.AssignData(account, "rover", inst.String()); err != nil {
|
||||
// Try and clear up the rover
|
||||
if err := s.world.DestroyRover(inst); err != nil {
|
||||
fmt.Printf("Failed to destroy rover after failed rover assign: %s", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue