diff options
| author | historia <[not public]> | 2026-06-25 00:44:47 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-06-25 00:44:47 -0400 |
| commit | 94a06fbbe682701ca4d4bd2a70cd74d8df29c932 (patch) | |
| tree | eb49fb1893e61092138164d419e863ee3fe0d1e2 /internal/game/action.go | |
| parent | 15b7e221b799ef107dec44ecdb294026dfd3d059 (diff) | |
| download | thehouseoficarus-94a06fbbe682701ca4d4bd2a70cd74d8df29c932.tar.gz | |
refactor: replaced map[string]any with typed structs for Data
Diffstat (limited to 'internal/game/action.go')
| -rw-r--r-- | internal/game/action.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/internal/game/action.go b/internal/game/action.go index 3146f1a..19e79cf 100644 --- a/internal/game/action.go +++ b/internal/game/action.go @@ -184,14 +184,12 @@ func (g *Game) startAction(sess *net.Session, verb, target string) { func (g *Game) cancelAction(p *player.Player) { p.Action = nil - p.ActionState = nil p.WalkSequence = nil p.ClearMoveState() } func (g *Game) cancelBgAction(p *player.Player) { p.BackgroundAction = nil - p.BackgroundActionState = nil } func (g *Game) AdvanceActions() { @@ -234,7 +232,7 @@ func (g *Game) AdvanceActions() { case "obstacle": g.advanceObstacle(sess, p) default: - if productionActionTypes[p.Action.Type] { + if productionActionTypes[string(p.Action.Type)] { g.advanceProduction(sess, p) } } |
