diff options
| author | historia <[not public]> | 2026-07-08 01:22:38 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-07-08 01:22:38 -0400 |
| commit | 71f0f381de64e045f91da19450adacf10fbc7902 (patch) | |
| tree | c567d665eed2e5d61aeae21bd6a75f280118d277 /internal/game/core_production.go | |
| parent | 3682acf24575731deef587a19c940814ad8a9a81 (diff) | |
| download | thehouseoficarus-71f0f381de64e045f91da19450adacf10fbc7902.tar.gz | |
feat: multi-tool gather objects correctly handled. hide more irrelevant fishing fields.
Diffstat (limited to 'internal/game/core_production.go')
| -rw-r--r-- | internal/game/core_production.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/game/core_production.go b/internal/game/core_production.go index e88f512..192f8ec 100644 --- a/internal/game/core_production.go +++ b/internal/game/core_production.go @@ -6,13 +6,13 @@ import ( "thehouseoficarus/internal/player" ) -func (g *Game) findTool(p *player.Player, toolTypes []string) (toolSpeed float64, toolName string, found bool) { +func (g *Game) findTool(p *player.Player, toolTypes []string) (toolSpeed float64, toolName string, toolType string, found bool) { toolSpeed = -1 if itemID, ok := p.Equipment[item.SlotMainHand]; ok { if def, err := g.ItemStore.Load(itemID); err == nil { for _, t := range toolTypes { if def.ToolType() == t { - return def.ToolSpeed(), def.Name, true + return def.ToolSpeed(), def.Name, t, true } } } @@ -28,15 +28,15 @@ func (g *Game) findTool(p *player.Player, toolTypes []string) (toolSpeed float64 } for _, t := range toolTypes { if def.ToolType() == t { - return def.ToolSpeed(), def.Name, true + return def.ToolSpeed(), def.Name, t, true } } } - return -1, "", false + return -1, "", "", false } func (g *Game) hasToolType(p *player.Player, toolType string) bool { - _, _, found := g.findTool(p, []string{toolType}) + _, _, _, found := g.findTool(p, []string{toolType}) return found } |
