aboutsummaryrefslogtreecommitdiff
path: root/internal/game/core_production.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/game/core_production.go')
-rw-r--r--internal/game/core_production.go10
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
}