game generation process
This commit is contained in:
@@ -3,26 +3,27 @@ package game
|
||||
type PlanetProduction string
|
||||
|
||||
const (
|
||||
ProductionNone PlanetProduction = "NONE"
|
||||
ProductionMaterial PlanetProduction = "MAT"
|
||||
ProductionCapital PlanetProduction = "CAP"
|
||||
ProductionDrive PlanetProduction = "DRIVE"
|
||||
ProductionWeapons PlanetProduction = "WEAPONS"
|
||||
ProductionShields PlanetProduction = "SHIELDS"
|
||||
ProductionCargo PlanetProduction = "CARGO"
|
||||
ProductionNone PlanetProduction = "-"
|
||||
ProductionMaterial PlanetProduction = "MAT" // Сырьё
|
||||
ProductionCapital PlanetProduction = "CAP" // Промышленность
|
||||
|
||||
ProductionScience PlanetProduction = "SCIENCE"
|
||||
ProductionShip PlanetProduction = "SHIP"
|
||||
ResearchDrive PlanetProduction = "DRIVE"
|
||||
ResearchWeapons PlanetProduction = "WEAPONS"
|
||||
ResearchShields PlanetProduction = "SHIELDS"
|
||||
ResearchCargo PlanetProduction = "CARGO"
|
||||
|
||||
ResearchScience PlanetProduction = "SCIENCE"
|
||||
ProductionShip PlanetProduction = "SHIP"
|
||||
)
|
||||
|
||||
type ProductionType struct {
|
||||
Production PlanetProduction
|
||||
SubjectName string
|
||||
SubjectName string // TODO: change to UUID
|
||||
}
|
||||
|
||||
func (p PlanetProduction) AsType(subject string) ProductionType {
|
||||
switch p {
|
||||
case ProductionScience, ProductionShip:
|
||||
case ResearchScience, ProductionShip:
|
||||
return ProductionType{Production: p, SubjectName: subject}
|
||||
default:
|
||||
return ProductionType{Production: p}
|
||||
|
||||
Reference in New Issue
Block a user