cmd: join ship groups
This commit is contained in:
@@ -65,7 +65,7 @@ func buildGameOnMap(races []string, m generator.Map) (*game.Game, error) {
|
||||
Shields: 1,
|
||||
Cargo: 1,
|
||||
}
|
||||
gameMap.Planet = append(gameMap.Planet, newPlanet(
|
||||
gameMap.Planet = append(gameMap.Planet, NewPlanet(
|
||||
planetCount,
|
||||
m.HomePlanets[i].HW.RandomName(),
|
||||
raceID,
|
||||
@@ -79,7 +79,7 @@ func buildGameOnMap(races []string, m generator.Map) (*game.Game, error) {
|
||||
))
|
||||
planetCount++
|
||||
for dw := range m.HomePlanets[i].DW {
|
||||
gameMap.Planet = append(gameMap.Planet, newPlanet(
|
||||
gameMap.Planet = append(gameMap.Planet, NewPlanet(
|
||||
planetCount,
|
||||
m.HomePlanets[i].DW[dw].RandomName(),
|
||||
raceID,
|
||||
@@ -101,7 +101,7 @@ func buildGameOnMap(races []string, m generator.Map) (*game.Game, error) {
|
||||
}
|
||||
|
||||
for i := range m.FreePlanets {
|
||||
gameMap.Planet = append(gameMap.Planet, newPlanet(
|
||||
gameMap.Planet = append(gameMap.Planet, NewPlanet(
|
||||
planetCount,
|
||||
m.FreePlanets[i].RandomName(),
|
||||
uuid.Nil,
|
||||
@@ -125,7 +125,7 @@ func buildGameOnMap(races []string, m generator.Map) (*game.Game, error) {
|
||||
return g, nil
|
||||
}
|
||||
|
||||
func newPlanet(num uint, name string, owner uuid.UUID, x, y, size, pop, ind, res float64, prod game.ProductionType) game.Planet {
|
||||
func NewPlanet(num uint, name string, owner uuid.UUID, x, y, size, pop, ind, res float64, prod game.ProductionType) game.Planet {
|
||||
return game.Planet{
|
||||
Owner: owner,
|
||||
PlanetReport: game.PlanetReport{
|
||||
|
||||
Reference in New Issue
Block a user