cmd: join fleets

This commit is contained in:
Ilia Denisov
2025-12-07 21:39:17 +03:00
parent 92ad81b2a2
commit 4b2b042068
5 changed files with 157 additions and 22 deletions
+6 -4
View File
@@ -24,8 +24,8 @@ type ShipGroup struct {
Index uint `json:"index"` // Group index (ordered)
OwnerID uuid.UUID `json:"ownerId"` // Race link
TypeID uuid.UUID `json:"typeId"` // ShipType link
FleetID *uuid.UUID `json:"fleetId,omitempty"` // ShipType link
Number uint `json:"number"` // Number (quantity) ships of Type
FleetID *uuid.UUID `json:"fleetId,omitempty"` // Fleet link
Number uint `json:"number"` // Number (quantity) ships of specific ShipType
State string `json:"state"` // TODO: kinda enum: In_Orbit, In_Space, Transfer_State, Upgrade
CargoType *CargoType `json:"loadType,omitempty"`
@@ -36,8 +36,10 @@ type ShipGroup struct {
Shields float64 `json:"shields"`
Cargo float64 `json:"cargo"`
// TODO: append AND TEST: Destination, Origin, Range
Destination uint `json:"destination"`
// TODO: TEST: Destination, Origin, Range
Destination uint `json:"destination"`
Origin *uint `json:"origin,omitempty"`
Range *float64 `json:"range,omitempty"`
}
func (sg ShipGroup) Equal(other ShipGroup) bool {