aboutsummaryrefslogtreecommitdiff
path: root/internal/game/cmd_smelt.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-06-19 18:20:26 -0400
committerhistoria <[not public]>2026-06-19 18:20:26 -0400
commit0ea4eec5dd2122c6704216971eb1249276297867 (patch)
tree430fbbef04e837820f1d031c190f52ecd6112e25 /internal/game/cmd_smelt.go
parent3a58125d14bb307f861b38c6c5b0a63babde7e08 (diff)
downloadthehouseoficarus-0ea4eec5dd2122c6704216971eb1249276297867.tar.gz
shop fixes, 'toggle' completely removed, movement speed increased
Diffstat (limited to 'internal/game/cmd_smelt.go')
-rw-r--r--internal/game/cmd_smelt.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/internal/game/cmd_smelt.go b/internal/game/cmd_smelt.go
index 46f2607..53ff426 100644
--- a/internal/game/cmd_smelt.go
+++ b/internal/game/cmd_smelt.go
@@ -9,8 +9,8 @@ import (
)
func (g *Game) doSmelt(sess *net.Session, input string) {
- p := sess.Player.(*player.Player)
- g.CancelAction(p)
+ p := sess.Player
+ g.cancelAction(p)
stationDefID, stationName := g.findStation(p.RoomID, []string{"furnace"})
if stationDefID == "" {
@@ -64,7 +64,7 @@ func (g *Game) doSmelt(sess *net.Session, input string) {
return
}
- sess.PendingMenu = recipeMenuData(recipes)
+ sess.PendingMenu = recipeMenuData(recipeDefIDs(recipes))
sess.State = net.StateRecipeChoice
var names []string
for _, r := range recipes {
@@ -108,5 +108,9 @@ func (g *Game) showSmeltMenu(sess *net.Session, p *player.Player, allRecipes []a
names = append(names, e.ItemName)
}
g.showMenuTable(sess, "What would you like to smelt?", names)
- sess.PendingMenu = entryMenuData(entries)
+ ids := make([]string, len(entries))
+ for i, e := range entries {
+ ids[i] = e.Recipe.ID
+ }
+ sess.PendingMenu = recipeMenuData(ids)
}