diff options
| author | historia <[not public]> | 2026-06-19 18:20:26 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-06-19 18:20:26 -0400 |
| commit | 0ea4eec5dd2122c6704216971eb1249276297867 (patch) | |
| tree | 430fbbef04e837820f1d031c190f52ecd6112e25 /internal/game/cmd_cook.go | |
| parent | 3a58125d14bb307f861b38c6c5b0a63babde7e08 (diff) | |
| download | thehouseoficarus-0ea4eec5dd2122c6704216971eb1249276297867.tar.gz | |
shop fixes, 'toggle' completely removed, movement speed increased
Diffstat (limited to 'internal/game/cmd_cook.go')
| -rw-r--r-- | internal/game/cmd_cook.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/internal/game/cmd_cook.go b/internal/game/cmd_cook.go index 9b76a84..5b78745 100644 --- a/internal/game/cmd_cook.go +++ b/internal/game/cmd_cook.go @@ -9,8 +9,8 @@ import ( ) func (g *Game) doCook(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{"fire", "cooking_range"}) if stationDefID == "" { @@ -66,7 +66,7 @@ func (g *Game) doCook(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 { @@ -116,7 +116,11 @@ func (g *Game) showCookMenu(sess *net.Session, p *player.Player, allRecipes []ac names = append(names, e.ItemName) } g.showMenuTable(sess, fmt.Sprintf("What would you like to cook on the %s?", stationName), names) - sess.PendingMenu = entryMenuData(entries) + ids := make([]string, len(entries)) + for i, e := range entries { + ids[i] = e.Recipe.ID + } + sess.PendingMenu = recipeMenuData(ids) } func (g *Game) recipeName(sess *net.Session, r *action.RecipeDef) string { |
