aboutsummaryrefslogtreecommitdiff
path: root/internal/game/tick.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-06-25 00:44:47 -0400
committerhistoria <[not public]>2026-06-25 00:44:47 -0400
commit94a06fbbe682701ca4d4bd2a70cd74d8df29c932 (patch)
treeeb49fb1893e61092138164d419e863ee3fe0d1e2 /internal/game/tick.go
parent15b7e221b799ef107dec44ecdb294026dfd3d059 (diff)
downloadthehouseoficarus-94a06fbbe682701ca4d4bd2a70cd74d8df29c932.tar.gz
refactor: replaced map[string]any with typed structs for Data
Diffstat (limited to 'internal/game/tick.go')
-rw-r--r--internal/game/tick.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/game/tick.go b/internal/game/tick.go
index 1402b06..6d79964 100644
--- a/internal/game/tick.go
+++ b/internal/game/tick.go
@@ -4,6 +4,7 @@ import (
"fmt"
"math/rand"
+ "thehouseoficarus/internal/action"
"thehouseoficarus/internal/combat"
"thehouseoficarus/internal/player"
"thehouseoficarus/internal/world"
@@ -166,8 +167,8 @@ func (g *Game) SharedDepletionTick() {
if p == nil || p.Action == nil || p.Action.Type != "gather" {
continue
}
- if key, ok := p.Action.Data["instance_key"].(string); ok {
- activeKeys[key] = true
+ if gd, ok := p.Action.Data.(*action.GatherData); ok {
+ activeKeys[gd.InstanceKey] = true
}
}