cmd: send group
This commit is contained in:
@@ -22,6 +22,8 @@ const (
|
||||
ErrGiveawayGroupShipsTypeNotEqual = 5009
|
||||
ErrUpgradeGroupNumberNotEnough = 5010
|
||||
ErrUpgradeInsufficientResources = 5011
|
||||
ErrSendShipHasNoDrives = 5012
|
||||
ErrSendUnreachableDestination = 5013
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -158,6 +160,10 @@ func GenericErrorText(code int) string {
|
||||
return "The Group is already in upgrade state and can't be divided to a smaller group"
|
||||
case ErrInputUpgradeTechLevelInsufficient:
|
||||
return "Insifficient Tech level for requested upgrade"
|
||||
case ErrSendShipHasNoDrives:
|
||||
return "One or more ships are not equipped with hyperdrive and cannot be moved"
|
||||
case ErrSendUnreachableDestination:
|
||||
return "Destination planet is too far for current Drive level"
|
||||
default:
|
||||
return fmt.Sprintf("Undescribed error with code %d", code)
|
||||
}
|
||||
|
||||
@@ -167,3 +167,11 @@ func NewUpgradeGroupBreakNotAllowedError(arg ...any) error {
|
||||
func NewUpgradeTechLevelInsufficientError(arg ...any) error {
|
||||
return newGenericError(ErrInputUpgradeTechLevelInsufficient, arg...)
|
||||
}
|
||||
|
||||
func NewSendShipHasNoDrivesError(arg ...any) error {
|
||||
return newGenericError(ErrSendShipHasNoDrives, arg...)
|
||||
}
|
||||
|
||||
func NewSendUnreachableDestinationError(arg ...any) error {
|
||||
return newGenericError(ErrSendUnreachableDestination, arg...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user