diff options
| author | historia <[not public]> | 2026-06-25 15:40:48 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-06-25 15:40:48 -0400 |
| commit | abd612c15799f604e671e83dc7c410ed2b44185f (patch) | |
| tree | 0597ca92350de73aac2a7cf26b2f2d6595dac0cc /internal/game/cmd_smith.go | |
| parent | 2725e2927a1595c7b100d942d1f14146252adeb7 (diff) | |
| download | thehouseoficarus-abd612c15799f604e671e83dc7c410ed2b44185f.tar.gz | |
slop refactor
Diffstat (limited to 'internal/game/cmd_smith.go')
| -rw-r--r-- | internal/game/cmd_smith.go | 12 |
1 files changed, 6 insertions, 6 deletions
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() |
