well, fuck...

This commit is contained in:
Ilia Denisov
2025-09-28 09:17:17 +03:00
parent 66eeefc65d
commit 6510676237
8 changed files with 203 additions and 62 deletions
+28 -14
View File
@@ -6,26 +6,40 @@ import (
"github.com/google/uuid"
)
type Planet struct {
X float64 `json:"x"`
Y float64 `json:"y"`
Size float64 `json:"size"`
Name string `json:"name"`
Number uint `json:"number"`
Owner uuid.UUID `json:"owner"`
Production ProductionType `json:"production"`
Population float64 `json:"population"` // P - Население
Industry float64 `json:"industry"` // I - Промышленность
Resources float64 `json:"resources"` // R - Ресурсы / сырьё
type UnidentifiedPlanet struct {
X float64 `json:"x"`
Y float64 `json:"y"`
Number uint `json:"number"`
}
type UninhabitedPlanet struct {
UnidentifiedPlanet
Size float64 `json:"size"`
Name string `json:"name"`
Resources float64 `json:"resources"` // R - Ресурсы / сырьё
Capital float64 `json:"capital"` // CAP $ - Запасы промышленности
Material float64 `json:"material"` // MAT M - Запасы ресурсов / сырья
Colonists float64 `json:"colonists"` // COL C - Количество колонистов
}
type PlanetReport struct {
UninhabitedPlanet
Industry float64 `json:"industry"` // I - Промышленность
Population float64 `json:"population"` // P - Население
Colonists float64 `json:"colonists"` // COL C - Количество колонистов
Production ProductionType `json:"production"` // TODO: internal/report format
// Параметр "L" - Свободный производственный потенциал
}
type Planet struct {
Owner uuid.UUID `json:"owner"`
PlanetReport
}
type PlanetReportForeign struct {
RaceName string
PlanetReport
}
// Свободный производственный потенциал (L)
// промышленность * 0.75 + население * 0.25
// TODO: за вычетом затрат, расходуемых в течение хода на модернизацию кораблей