cmd: break group

This commit is contained in:
Ilia Denisov
2025-12-08 21:33:48 +03:00
parent 4b2b042068
commit 7002f3d299
4 changed files with 113 additions and 3 deletions
+6 -3
View File
@@ -15,9 +15,10 @@ const (
ErrDeleteSciencePlanetProduction = 5002
ErrMergeShipTypeNotEqual = 5003
ErrJoinFleetGroupNumberNotEnough = 5004
ErrEntityInUse = 5005
ErrShipsBusy = 5006
ErrShipsNotOnSamePlanet = 5007
ErrBeakGroupNumberNotEnough = 5005
ErrEntityInUse = 5006
ErrShipsBusy = 5007
ErrShipsNotOnSamePlanet = 5008
)
const (
@@ -91,6 +92,8 @@ func GenericErrorText(code int) string {
return "Source and target ship types are not the same"
case ErrJoinFleetGroupNumberNotEnough:
return "Not enough ships in the group to join a fleet"
case ErrBeakGroupNumberNotEnough:
return "Not enough ships in the group to make a separate group"
case ErrShipsBusy:
return "Ships currently not in orbit or free to use"
case ErrShipsNotOnSamePlanet:
+4
View File
@@ -76,6 +76,10 @@ func NewJoinFleetGroupNumberNotEnoughError(arg ...any) error {
return newGenericError(ErrJoinFleetGroupNumberNotEnough, arg...)
}
func NewBeakGroupNumberNotEnoughError(arg ...any) error {
return newGenericError(ErrBeakGroupNumberNotEnough, arg...)
}
func NewShipsBusyError(arg ...any) error {
return newGenericError(ErrShipsBusy, arg...)
}