From abd612c15799f604e671e83dc7c410ed2b44185f Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Thu, 25 Jun 2026 15:40:48 -0400 Subject: slop refactor --- internal/game/cmd_smith.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'internal/game/cmd_smith.go') diff --git a/internal/game/cmd_smith.go b/internal/game/cmd_smith.go index 712c03c..9722896 100644 --- a/internal/game/cmd_smith.go +++ b/internal/game/cmd_smith.go @@ -5,8 +5,8 @@ import ( "sort" "strings" + "thehouseoficarus/internal/item" "thehouseoficarus/internal/net" - "thehouseoficarus/internal/object" "thehouseoficarus/internal/player" ) @@ -90,7 +90,7 @@ func (g *Game) showSmithTable(sess *net.Session, p *player.Player, barID string) } allItems := g.CraftIndex.ByType("smithing") - var recipes []*object.ItemDef + var recipes []*item.ItemDef for _, item := range allItems { if craftMatchesEntry(item.FirstCraft(), barID) { recipes = append(recipes, item) @@ -106,7 +106,7 @@ func (g *Game) showSmithTable(sess *net.Session, p *player.Player, barID string) g.showProductionTable(sess, p, recipes, titleCase(barName)+" Smithing", "smithing", lastFlag, "Produce", false) } -func hasSmithingItems(items []*object.ItemDef, barID string) bool { +func hasSmithingItems(items []*item.ItemDef, barID string) bool { for _, item := range items { if craftMatchesEntry(item.FirstCraft(), barID) { return true @@ -115,7 +115,7 @@ func hasSmithingItems(items []*object.ItemDef, barID string) bool { return false } -func findSmithableBars(items []*object.ItemDef, p *player.Player) []string { +func findSmithableBars(items []*item.ItemDef, p *player.Player) []string { barSet := make(map[string]bool) for _, item := range items { for _, e := range item.FirstCraft().Consume { @@ -142,8 +142,8 @@ func barMenuData(barIDs []string) []map[string]string { return out } -func (g *Game) findSmithItem(p *player.Player, barID string, items []*object.ItemDef) *object.ItemDef { - var makeable []*object.ItemDef +func (g *Game) findSmithItem(p *player.Player, barID string, items []*item.ItemDef) *item.ItemDef { + var makeable []*item.ItemDef skillLevel := p.Level(player.Smithing) for _, item := range items { c := item.FirstCraft() -- cgit v1.2.3