Fix the names including apostrophes
This commit is contained in:
parent
43588c0e4b
commit
066df58705
1 changed files with 4 additions and 1 deletions
|
@ -3,6 +3,7 @@ package game
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
|
@ -58,11 +59,13 @@ func (w *World) SpawnRover() (uuid.UUID, error) {
|
||||||
Range: 5.0,
|
Range: 5.0,
|
||||||
|
|
||||||
// Set the name randomly
|
// Set the name randomly
|
||||||
// TODO: Fix the stupid "'s"
|
|
||||||
Name: babble.NewBabbler().Babble(),
|
Name: babble.NewBabbler().Babble(),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Dictionaries tend to include the possesive
|
||||||
|
strings.ReplaceAll(rover.Attributes.Name, "'s", "")
|
||||||
|
|
||||||
// Spawn in a random place near the origin
|
// Spawn in a random place near the origin
|
||||||
rover.Attributes.Pos = Vector{
|
rover.Attributes.Pos = Vector{
|
||||||
w.Atlas.ChunkSize - (rand.Int() % (w.Atlas.ChunkSize * 2)),
|
w.Atlas.ChunkSize - (rand.Int() % (w.Atlas.ChunkSize * 2)),
|
||||||
|
|
Loading…
Add table
Reference in a new issue