aboutsummaryrefslogtreecommitdiff
path: root/internal/game/cmd_move.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-06-16 01:59:27 -0400
committerhistoria <[not public]>2026-06-16 01:59:27 -0400
commit43f21aabae8924f35c12c8485e690aeefe0089fb (patch)
treeb5fbadb89df3cf4ffec86503bb8e2d7e52b27454 /internal/game/cmd_move.go
parent4cc1ddcd185509080b4b3e15d1646567edd51c9d (diff)
downloadthehouseoficarus-43f21aabae8924f35c12c8485e690aeefe0089fb.tar.gz
feat: overhauled ansi color, added prompt options
Diffstat (limited to 'internal/game/cmd_move.go')
-rw-r--r--internal/game/cmd_move.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/internal/game/cmd_move.go b/internal/game/cmd_move.go
index 65a2875..11aa17e 100644
--- a/internal/game/cmd_move.go
+++ b/internal/game/cmd_move.go
@@ -3,7 +3,6 @@ package game
import (
"fmt"
- "thirdcollapse/internal/color"
"thirdcollapse/internal/combat"
"thirdcollapse/internal/net"
"thirdcollapse/internal/player"
@@ -65,8 +64,6 @@ func (g *Game) doMove(sess *net.Session, dir string) {
g.seedRoomMobs(p.RoomID)
g.seedRoomObjects(p.RoomID)
- mode := g.colorMode(sess)
-
if g.Hub != nil {
for _, other := range g.Hub.PlayersInRoom(oldRoom) {
if other != sess {
@@ -81,14 +78,14 @@ func (g *Game) doMove(sess *net.Session, dir string) {
}
}
- sess.WriteLine(fmt.Sprintf("\nYou walk %s.", color.Wrap(mode, "cyan", string(exitDir))))
+ sess.WriteLine(fmt.Sprintf("\nYou walk %s.", g.colorize(sess, "direction", string(exitDir))))
p.ActionState = &ActionState{Type: ActionMoving, Direction: string(exitDir)}
if p.OptionBool("description") {
g.doLook(sess)
} else {
targetRoom, _ := g.World.LoadRoom(targetID)
if targetRoom != nil {
- sess.WriteLine(color.Wrap(mode, "cyan", targetRoom.Name))
+ sess.WriteLine(g.colorize(sess, "room_name", targetRoom.Name))
}
}