diff options
| author | historia <[not public]> | 2026-06-16 04:17:43 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-06-16 04:17:43 -0400 |
| commit | 085e728d22a3369bd110b77409914cfbe9ebe611 (patch) | |
| tree | eeb88cb1ceb91cc9ea2b5a1877c3c66328fab503 /internal/game/tick.go | |
| parent | 43f21aabae8924f35c12c8485e690aeefe0089fb (diff) | |
| download | thehouseoficarus-085e728d22a3369bd110b77409914cfbe9ebe611.tar.gz | |
feat: recipe system, combining items, cooking skill
Diffstat (limited to 'internal/game/tick.go')
| -rw-r--r-- | internal/game/tick.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/internal/game/tick.go b/internal/game/tick.go index f326ad8..7567ca7 100644 --- a/internal/game/tick.go +++ b/internal/game/tick.go @@ -198,3 +198,18 @@ func (g *Game) legalMobExits(inst *world.MobInstance) []int { } return legal } + +func (g *Game) ConsumeTick() { + if g.Hub == nil { + return + } + for _, sess := range g.Hub.AllSessions() { + p, ok := sess.Player.(*player.Player) + if !ok || p == nil { + continue + } + if p.ConsumeCooldown > 0 { + p.ConsumeCooldown-- + } + } +} |
