aboutsummaryrefslogtreecommitdiff
path: root/internal/game/cmd_use.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-09-16 17:05:17 -0400
committerhistoria <[not public]>2026-09-16 17:05:17 -0400
commit1dad15698845d370e998f7cc5feb8aece3fab58f (patch)
tree8d58058782de9f422573e1f8efd5d130ce7d1ce9 /internal/game/cmd_use.go
parenta6cf03a6ae98e4fb675da25046d148e92bcf7206 (diff)
downloadthehouseoficarus-1dad15698845d370e998f7cc5feb8aece3fab58f.tar.gz
refactor: remove dead code, consolidate save/error handling, add lint gate
Diffstat (limited to 'internal/game/cmd_use.go')
-rw-r--r--internal/game/cmd_use.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/game/cmd_use.go b/internal/game/cmd_use.go
index 12dbc73..b975469 100644
--- a/internal/game/cmd_use.go
+++ b/internal/game/cmd_use.go
@@ -82,7 +82,7 @@ func (g *Game) useRoomObject(sess *net.Session, p *player.Player, input string)
}
recipes := g.stationRecipes(p, objSt.DefID)
if len(recipes) > 0 {
- g.showRecipeMenu(sess, p, recipes, def.Name)
+ g.showRecipeMenu(sess, recipes, def.Name)
return true
}
bt := def.BehaviorType()
@@ -140,7 +140,7 @@ func craftLabel(c *item.CraftDef) string {
return "combine"
}
-func (g *Game) showRecipeMenu(sess *net.Session, p *player.Player, items []*item.ItemDef, stationName string) {
+func (g *Game) showRecipeMenu(sess *net.Session, items []*item.ItemDef, stationName string) {
if len(items) == 0 {
sess.WriteLine(fmt.Sprintf("You don't have anything you can make at the %s.", stationName))
return
@@ -299,8 +299,8 @@ func (g *Game) doUseItemOnTarget(sess *net.Session, p *player.Player, itemAName,
itemBID := matchesB[0].ID
- craftItems := g.findCraftItems(p, itemAID, itemBID)
- fletchItems := g.findFletchItems(p, itemAID, itemBID)
+ craftItems := g.findCraftItems(itemAID, itemBID)
+ fletchItems := g.findFletchItems(itemAID, itemBID)
if len(craftItems) > 0 && len(fletchItems) > 0 {
var menu []map[string]string