aboutsummaryrefslogtreecommitdiff
path: root/internal/game/cmd_move.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-09-16 17:05:17 -0400
committerhistoria <[not public]>2026-09-16 17:05:17 -0400
commit1dad15698845d370e998f7cc5feb8aece3fab58f (patch)
tree8d58058782de9f422573e1f8efd5d130ce7d1ce9 /internal/game/cmd_move.go
parenta6cf03a6ae98e4fb675da25046d148e92bcf7206 (diff)
downloadthehouseoficarus-1dad15698845d370e998f7cc5feb8aece3fab58f.tar.gz
refactor: remove dead code, consolidate save/error handling, add lint gate
Diffstat (limited to 'internal/game/cmd_move.go')
-rw-r--r--internal/game/cmd_move.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/game/cmd_move.go b/internal/game/cmd_move.go
index 4772a2c..72c3236 100644
--- a/internal/game/cmd_move.go
+++ b/internal/game/cmd_move.go
@@ -75,7 +75,7 @@ func (g *Game) doMove(sess *net.Session, dir string, isWalk bool) {
// fire in completeMove once the player arrives. ExitDef.Condition (above,
// evaluated by exitDisplayState) gates whether the exit is passable at
// all; each on_traverse entry has its own additional Condition gate.
- p.MovePendingTrigger = g.matchExitTrigger(sess, p, exitDef)
+ p.MovePendingTrigger = g.matchExitTrigger(sess, exitDef)
inCombat := g.Combat.Get(p.Name) != nil
@@ -130,7 +130,7 @@ func (g *Game) doMove(sess *net.Session, dir string, isWalk bool) {
// Condition (and item filter, n/a for traverse) passes for this player, or nil
// if the exit has no matching on_traverse entry. The matched trigger's Steps
// run as a sequence once the player arrives in the target room.
-func (g *Game) matchExitTrigger(sess *net.Session, p *player.Player, exitDef world.ExitDef) *behavior.Trigger {
+func (g *Game) matchExitTrigger(sess *net.Session, exitDef world.ExitDef) *behavior.Trigger {
for i := range exitDef.OnTraverse {
t := &exitDef.OnTraverse[i]
if t.Condition != nil && !g.checkCondition(sess, t.Condition) {
@@ -195,7 +195,7 @@ func (g *Game) completeMove(sess *net.Session, p *player.Player) {
if pendingTrigger != nil {
g.runTrigger(sess, p, []behavior.Trigger{*pendingTrigger}, p.RoomID, nil, false)
}
- g.AccountStore.SaveCharacter(p)
+ g.saveCharacter(p)
g.World.SeedGroundItems(p.RoomID)
g.seedRoomMobs(p.RoomID)