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
+9
View File
@@ -15,6 +15,9 @@ const (
ErrDeleteSciencePlanetProduction = 5002
ErrMergeShipTypeNotEqual = 5003
ErrJoinFleetGroupNumberNotEnough = 5004
ErrEntityInUse = 5005
ErrShipsBusy = 5006
ErrShipsNotOnSamePlanet = 5007
)
const (
@@ -56,6 +59,8 @@ func GenericErrorText(code int) string {
return "Entity does not exists"
case ErrInputEntityNotOwned:
return "Entity is not owned"
case ErrEntityInUse:
return "Entity currently in use"
case ErrInputPlanetNumber:
return "Invalid Planet number"
case ErrInputDriveValue:
@@ -86,6 +91,10 @@ 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 ErrShipsBusy:
return "Ships currently not in orbit or free to use"
case ErrShipsNotOnSamePlanet:
return "Ships not on the same planet"
default:
return fmt.Sprintf("Undescribed error with code %d", code)
}