wip: generate report

This commit is contained in:
Ilia Denisov
2026-02-03 23:41:18 +02:00
parent a567229f8a
commit adbe605783
36 changed files with 1037 additions and 391 deletions
+21 -18
View File
@@ -7,27 +7,30 @@ import (
)
type BattleReport struct {
ID uuid.UUID `json:"id"`
Turn uint `json:"turn"`
Planet uint `json:"planet"`
PlanetName string `json:"planet_name"`
Races map[int]uuid.UUID `json:"races"`
Ships map[int]BattleReportGroup `json:"ships"`
Protocol []BattleActionReport `json:"protocol"`
ID uuid.UUID `json:"id"`
Planet uint `json:"planet"`
PlanetName string `json:"planetName"`
// PlanetOwnedID uuid.UUID `json:"-"` // TODO: need this? for make report: bombings: initial owher of a planet
Races map[int]uuid.UUID `json:"races"`
Ships map[int]BattleReportGroup `json:"ships"`
Protocol []BattleActionReport `json:"protocol"`
}
type BattleReportGroup struct {
OwnerID uuid.UUID `json:"ownerId"`
InBattle bool `json:"inBattle"`
Number uint `json:"num"`
NumberLeft uint `json:"numLeft"`
ClassName string `json:"className"`
LoadType string `json:"loadType"`
LoadQuantity Float `json:"loadQuantity"`
Drive Float `json:"drive"`
Weapons Float `json:"wwapons"`
Shields Float `json:"shields"`
Cargo Float `json:"cargo"`
OwnerID uuid.UUID `json:"-"` // make report: visible ship class
InBattle bool `json:"inBattle"`
Number uint `json:"num"`
NumberLeft uint `json:"numLeft"`
ClassArmament uint `json:"-"` // make report: visible ship class
ClassMass Float `json:"-"` // make report: visible ship class
LoadQuantity Float `json:"loadQuantity"`
DriveTech Float `json:"drive"`
WeaponsTech Float `json:"wwapons"`
ShieldsTech Float `json:"shields"`
CargoTech Float `json:"cargo"`
Race string `json:"race"`
ClassName string `json:"className"`
LoadType string `json:"loadType"`
}
type BattleActionReport struct {