diff options
Diffstat (limited to 'internal/game/cmd_craft.go')
| -rw-r--r-- | internal/game/cmd_craft.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/internal/game/cmd_craft.go b/internal/game/cmd_craft.go index fe52511..a1e0c38 100644 --- a/internal/game/cmd_craft.go +++ b/internal/game/cmd_craft.go @@ -40,7 +40,7 @@ func (g *Game) doStationSkill(sess *net.Session, input string, recipeType string } if input != "" { - g.doWithInput(sess, p, filtered, input, skill, flagKey, label, verbCap) + g.doWithInput(sess, p, filtered, input, recipeType, skill, flagKey, label, verbCap) return } @@ -76,7 +76,7 @@ func (g *Game) doStationSkill(sess *net.Session, input string, recipeType string g.showProductionTable(sess, p, available, label, recipeType, flagKey, verbCap, false) } -func (g *Game) doWithInput(sess *net.Session, p *player.Player, items []*item.ItemDef, input string, skill player.SkillName, flagKey, label, verbCap string) { +func (g *Game) doWithInput(sess *net.Session, p *player.Player, items []*item.ItemDef, input, recipeType string, skill player.SkillName, flagKey, label, verbCap string) { qty, productName := parseQty(input) productName = strings.TrimSpace(productName) @@ -109,7 +109,11 @@ func (g *Game) doWithInput(sess *net.Session, p *player.Player, items []*item.It return } - g.showProductionTable(sess, p, available, label, label, flagKey, verbCap, false) + // The menu stores its skill as PendingSkill and handleProductChoice + // looks it up with player.SkillName: pass the recipe type ("crafting", + // "pharmacy", "construction"), exactly like the no-input path, never the + // capitalised display label (a map miss that resolves to level 1). + g.showProductionTable(sess, p, available, label, recipeType, flagKey, verbCap, false) } func (g *Game) itemVisible(p *player.Player, def *item.ItemDef) bool { |
