Files
galaxy-game/pkg/model/game/production.go
T
2025-09-25 02:13:16 +03:00

32 lines
843 B
Go

package game
type PlanetProduction string
const (
ProductionNone PlanetProduction = "-"
ProductionMaterial PlanetProduction = "MAT" // Сырьё
ProductionCapital PlanetProduction = "CAP" // Промышленность
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 // TODO: change to UUID
}
func (p PlanetProduction) AsType(subject string) ProductionType {
switch p {
case ResearchScience, ProductionShip:
return ProductionType{Production: p, SubjectName: subject}
default:
return ProductionType{Production: p}
}
}