diff options
Diffstat (limited to 'internal/game/cmd_dig.go')
| -rw-r--r-- | internal/game/cmd_dig.go | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/internal/game/cmd_dig.go b/internal/game/cmd_dig.go index ff33490..9ca5f10 100644 --- a/internal/game/cmd_dig.go +++ b/internal/game/cmd_dig.go @@ -86,20 +86,7 @@ func (g *Game) executeDig(sess *net.Session, args []string, rawInput string) { sess.WriteLine(fmt.Sprintf("That spot is already occupied by %s. Created a two-way link instead.", conflictName)) oldRoom := p.RoomID - p.ClearMoveState() - if g.Combat.Get(p.Name) != nil { - g.stopCombat(p.Name) - } - p.Action = nil - g.cancelRest(p.Name) - g.cancelSequences(p.Name) - if ss, ok := g.safespot.Get(p.Name); ok { - g.forceLeaveSafespot(sess, p, &ss, "") - } - - p.RoomID = conflictID - p.HazardTimer = 0 - p.Stats.RecordRoomVisit(conflictID) + g.relocatePlayer(sess, p, conflictID) g.saveCharacter(p) g.World.SeedGroundItems(conflictID) @@ -182,20 +169,7 @@ func (g *Game) executeDig(sess *net.Session, args []string, rawInput string) { } oldRoom := p.RoomID - p.ClearMoveState() - if g.Combat.Get(p.Name) != nil { - g.stopCombat(p.Name) - } - p.Action = nil - g.cancelRest(p.Name) - g.cancelSequences(p.Name) - if ss, ok := g.safespot.Get(p.Name); ok { - g.forceLeaveSafespot(sess, p, &ss, "") - } - - p.RoomID = newID - p.HazardTimer = 0 - p.Stats.RecordRoomVisit(newID) + g.relocatePlayer(sess, p, newID) g.saveCharacter(p) g.World.SeedGroundItems(newID) |
