aboutsummaryrefslogtreecommitdiff
path: root/internal/game/cmd_move.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-06-15 02:57:35 -0400
committerhistoria <[not public]>2026-06-15 02:58:50 -0400
commit4cc1ddcd185509080b4b3e15d1646567edd51c9d (patch)
tree2a564846ad4fd159a2d7e55451bfa9569fe8c0b8 /internal/game/cmd_move.go
parent445c4612cc5cf2c226f85894b6ad1e2419a374e2 (diff)
downloadthehouseoficarus-4cc1ddcd185509080b4b3e15d1646567edd51c9d.tar.gz
removed game speed for being broken and an antifeature anyway. added color support.
Diffstat (limited to 'internal/game/cmd_move.go')
-rw-r--r--internal/game/cmd_move.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/internal/game/cmd_move.go b/internal/game/cmd_move.go
index 0b6571e..65a2875 100644
--- a/internal/game/cmd_move.go
+++ b/internal/game/cmd_move.go
@@ -3,6 +3,7 @@ package game
import (
"fmt"
+ "thirdcollapse/internal/color"
"thirdcollapse/internal/combat"
"thirdcollapse/internal/net"
"thirdcollapse/internal/player"
@@ -64,6 +65,8 @@ 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 {
@@ -78,14 +81,14 @@ func (g *Game) doMove(sess *net.Session, dir string) {
}
}
- sess.WriteLine(fmt.Sprintf("\nYou walk %s.", exitDir))
+ sess.WriteLine(fmt.Sprintf("\nYou walk %s.", color.Wrap(mode, "cyan", 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(targetRoom.Name)
+ sess.WriteLine(color.Wrap(mode, "cyan", targetRoom.Name))
}
}