fix: production with free P.I.
This commit is contained in:
@@ -3,6 +3,7 @@ package controller
|
||||
import (
|
||||
"math"
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
e "github.com/iliadenisov/galaxy/internal/error"
|
||||
"github.com/iliadenisov/galaxy/internal/model/game"
|
||||
@@ -35,14 +36,14 @@ func (c *Cache) UpgradeGroup(ri int, groupIndex uint, techInput string, limitShi
|
||||
}
|
||||
|
||||
upgradeValidTech := map[string]game.Tech{
|
||||
game.TechDrive.String(): game.TechDrive,
|
||||
game.TechWeapons.String(): game.TechWeapons,
|
||||
game.TechShields.String(): game.TechShields,
|
||||
game.TechCargo.String(): game.TechCargo,
|
||||
game.TechAll.String(): game.TechAll,
|
||||
strings.ToLower(game.TechDrive.String()): game.TechDrive,
|
||||
strings.ToLower(game.TechWeapons.String()): game.TechWeapons,
|
||||
strings.ToLower(game.TechShields.String()): game.TechShields,
|
||||
strings.ToLower(game.TechCargo.String()): game.TechCargo,
|
||||
strings.ToLower(game.TechAll.String()): game.TechAll,
|
||||
}
|
||||
|
||||
techRequest, ok := upgradeValidTech[techInput]
|
||||
techRequest, ok := upgradeValidTech[strings.ToLower(techInput)]
|
||||
if !ok {
|
||||
return e.NewTechUnknownError(techInput)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user