From dc9eb8cf2e4eceb81d050396da1a328f24b566b2 Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Sat, 13 Jun 2020 11:42:28 +0100 Subject: [PATCH] Fix filtering 's from babble names for rovers --- pkg/game/world.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkg/game/world.go b/pkg/game/world.go index af0af11..626a4da 100644 --- a/pkg/game/world.go +++ b/pkg/game/world.go @@ -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),