aboutsummaryrefslogtreecommitdiff
path: root/internal/game/action_use.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/game/action_use.go')
-rw-r--r--internal/game/action_use.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/internal/game/action_use.go b/internal/game/action_use.go
index ec63723..d953521 100644
--- a/internal/game/action_use.go
+++ b/internal/game/action_use.go
@@ -5,6 +5,7 @@ import (
"math/rand"
"thirdcollapse/internal/action"
+ "thirdcollapse/internal/engine"
"thirdcollapse/internal/net"
"thirdcollapse/internal/object"
"thirdcollapse/internal/player"
@@ -39,7 +40,7 @@ func (g *Game) startUse(sess *net.Session, p *player.Player, obj *object.ObjectD
Type: "use",
TargetID: obj.ID,
TargetName: obj.Name,
- WaitLeft: g.computeTicks(1),
+ WaitLeft: engine.ToTicks(1),
Data: map[string]any{"step": 0, "behavior_id": obj.BehaviorID},
}
@@ -78,7 +79,7 @@ func (g *Game) advanceUse(sess *net.Session, p *player.Player) {
if cfg.FailMsg != "" {
sess.WriteLine(cfg.FailMsg)
}
- p.Action.WaitLeft = g.computeTicks(cfg.Wait)
+ p.Action.WaitLeft = engine.ToTicks(cfg.Wait)
return
}
}
@@ -119,5 +120,5 @@ func (g *Game) advanceUse(sess *net.Session, p *player.Player) {
return
}
- p.Action.WaitLeft = g.computeTicks(cfg.Wait)
+ p.Action.WaitLeft = engine.ToTicks(cfg.Wait)
}