cmd: merge ship types

This commit is contained in:
Ilia Denisov
2025-10-02 23:22:44 +03:00
parent cafdd10bab
commit 33efa86065
5 changed files with 109 additions and 0 deletions
+6
View File
@@ -13,12 +13,14 @@ const (
ErrDeleteShipTypeExistingGroup = 5000
ErrDeleteShipTypePlanetProduction = 5001
ErrDeleteSciencePlanetProduction = 5002
ErrMergeShipTypeNotEqual = 5003
)
const (
ErrInputUnknownRace int = 3000 + iota
ErrInputEntityTypeNameInvalid
ErrInputEntityTypeNameDuplicate
ErrInputEntityTypeNameEquality
ErrInputEntityNotExists
ErrInputEntityNotOwned
ErrInputPlanetNumber
@@ -47,6 +49,8 @@ func GenericErrorText(code int) string {
return "Name has invalid length or symbols"
case ErrInputEntityTypeNameDuplicate:
return "Name already exists"
case ErrInputEntityTypeNameEquality:
return "Names should differ"
case ErrInputEntityNotExists:
return "Entity does not exists"
case ErrInputEntityNotOwned:
@@ -77,6 +81,8 @@ func GenericErrorText(code int) string {
return "Science proportions sum should be equal 1"
case ErrInputProductionInvalid:
return "Invalid Production type"
case ErrMergeShipTypeNotEqual:
return "Source and target ship types are not the same"
default:
return fmt.Sprintf("Undescribed error with code %d", code)
}