Fix filtering 's from babble names for rovers

This commit is contained in:
Marc Di Luzio 2020-06-13 11:42:28 +01:00
parent 914eef05c0
commit dc9eb8cf2e

View file

@ -71,13 +71,10 @@ func (w *World) SpawnRover() (uuid.UUID, error) {
Range: 5.0,
// Set the name randomly
Name: babble.NewBabbler().Babble(),
Name: strings.ReplaceAll(babble.NewBabbler().Babble(), "'s", ""),
},
}
// Dictionaries tend to include the possesive
strings.ReplaceAll(rover.Attributes.Name, "'s", "")
// Spawn in a random place near the origin
rover.Attributes.Pos = vector.Vector{
X: w.Atlas.ChunkSize/2 - rand.Intn(w.Atlas.ChunkSize),