cmd: upgrade group
This commit is contained in:
@@ -20,6 +20,8 @@ const (
|
||||
ErrShipsBusy = 5007
|
||||
ErrShipsNotOnSamePlanet = 5008
|
||||
ErrGiveawayGroupShipsTypeNotEqual = 5009
|
||||
ErrUpgradeGroupNumberNotEnough = 5010
|
||||
ErrUpgradeInsufficientResources = 5011
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -49,6 +51,13 @@ const (
|
||||
ErrInputCargoUnloadEmpty
|
||||
ErrInputCargoUnoadNotEnough
|
||||
ErrInputBreakGroupIllegalNumber
|
||||
ErrInputTechUnknown
|
||||
ErrInputTechInvalidMixing
|
||||
ErrInputUpgradeShipTechNotUsed
|
||||
ErrInputUpgradeParameterNotAllowed
|
||||
ErrInputUpgradeShipsAlreadyUpToDate
|
||||
ErrInputUpgradeGroupBreakNotAllowed
|
||||
ErrInputUpgradeTechLevelInsufficient
|
||||
)
|
||||
|
||||
func GenericErrorText(code int) string {
|
||||
@@ -131,6 +140,24 @@ func GenericErrorText(code int) string {
|
||||
return "Ships not on the same planet"
|
||||
case ErrGiveawayGroupShipsTypeNotEqual:
|
||||
return "Ship type already defined with different specifications"
|
||||
case ErrInputTechUnknown:
|
||||
return "Technology name unknown"
|
||||
case ErrInputTechInvalidMixing:
|
||||
return "Technologies list must containt only specific values"
|
||||
case ErrInputUpgradeShipTechNotUsed:
|
||||
return "Technology is not used with ship class"
|
||||
case ErrInputUpgradeParameterNotAllowed:
|
||||
return "Parameter not allowed for upgrade"
|
||||
case ErrInputUpgradeShipsAlreadyUpToDate:
|
||||
return "Ships already up to date, nothing to upgrade"
|
||||
case ErrUpgradeGroupNumberNotEnough:
|
||||
return "Not enough ships in the group to make an upgrade"
|
||||
case ErrUpgradeInsufficientResources:
|
||||
return "Insufficient planet production capacity"
|
||||
case ErrInputUpgradeGroupBreakNotAllowed:
|
||||
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"
|
||||
default:
|
||||
return fmt.Sprintf("Undescribed error with code %d", code)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user