feat: more validators
This commit is contained in:
@@ -407,7 +407,6 @@ func (c *Cache) shipGroupTransfer(ri, riAccept int, groupID uuid.UUID, quantity
|
||||
}
|
||||
|
||||
if quantity == 0 || quantity == sg.Number {
|
||||
// FIXME: remove fleet & invalidate cache?
|
||||
c.unsafeDeleteShipGroup(sgi)
|
||||
} else {
|
||||
newGroup.Number = quantity
|
||||
@@ -437,6 +436,7 @@ func (c *Cache) ShipGroupBreak(ri int, groupID uuid.UUID, quantity uint) error {
|
||||
if quantity == 0 || quantity == c.ShipGroup(sgi).Number {
|
||||
c.internalShipGroupJoinFleet(sgi, nil)
|
||||
} else {
|
||||
// TODO: which group stays in fleet?
|
||||
if _, err := c.breakGroup(ri, groupID, quantity); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user