cmd: giveaway group
This commit is contained in:
@@ -19,10 +19,12 @@ const (
|
||||
ErrEntityInUse = 5006
|
||||
ErrShipsBusy = 5007
|
||||
ErrShipsNotOnSamePlanet = 5008
|
||||
ErrGiveawayGroupShipsTypeNotEqual = 5009
|
||||
)
|
||||
|
||||
const (
|
||||
ErrInputUnknownRace int = 3000 + iota
|
||||
ErrInputSameRace
|
||||
ErrInputEntityTypeNameInvalid
|
||||
ErrInputEntityTypeNameDuplicate
|
||||
ErrInputEntityTypeNameEquality
|
||||
@@ -50,6 +52,8 @@ func GenericErrorText(code int) string {
|
||||
return "Invalid game state"
|
||||
case ErrInputUnknownRace:
|
||||
return "Race name is unknown to this game"
|
||||
case ErrInputSameRace:
|
||||
return "Race name must be different from your own"
|
||||
case ErrInputEntityTypeNameInvalid:
|
||||
return "Name has invalid length or symbols"
|
||||
case ErrInputEntityTypeNameDuplicate:
|
||||
@@ -98,6 +102,8 @@ func GenericErrorText(code int) string {
|
||||
return "Ships currently not in orbit or free to use"
|
||||
case ErrShipsNotOnSamePlanet:
|
||||
return "Ships not on the same planet"
|
||||
case ErrGiveawayGroupShipsTypeNotEqual:
|
||||
return "Ship type already defined with different specifications"
|
||||
default:
|
||||
return fmt.Sprintf("Undescribed error with code %d", code)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user