aboutsummaryrefslogtreecommitdiff
path: root/internal/game/look_room.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-07-06 23:05:04 -0400
committerhistoria <[not public]>2026-07-06 23:05:04 -0400
commit9292634f2f8d71a53879ff07e1330c671b207d51 (patch)
treedcffadf7f697e8ad0705d787d8f599bdeeedb812 /internal/game/look_room.go
parent911aae15f4e869c93239ef7c630c61e1d9d4ef3f (diff)
downloadthehouseoficarus-9292634f2f8d71a53879ff07e1330c671b207d51.tar.gz
feat: split the concept of hidden and impassable exits. add player_flag for discovered hidden exits.
Diffstat (limited to 'internal/game/look_room.go')
-rw-r--r--internal/game/look_room.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/internal/game/look_room.go b/internal/game/look_room.go
index 887bb1d..8bd85be 100644
--- a/internal/game/look_room.go
+++ b/internal/game/look_room.go
@@ -88,7 +88,7 @@ func (g *Game) showRoomExits(sess *net.Session, p *player.Player, room *world.Ro
if !ok {
continue
}
- if exitDef.Hidden && !p.GodMode {
+ if exitDef.Hidden && !g.exitDiscovered(p, room.ID, dir) {
continue
}
coloredDir := g.colorize(sess, "exit_direction", string(dir))
@@ -97,11 +97,14 @@ func (g *Game) showRoomExits(sess *net.Session, p *player.Player, room *world.Ro
if err == nil {
targetName = g.colorize(sess, "exit_name", targetRoom.Name)
}
+ if exitDef.AlwaysBlocked {
+ targetName += " (impassable)"
+ }
if exitDef.Condition != nil && !g.checkCondition(sess, exitDef.Condition) {
targetName += " (blocked)"
}
if exitDef.Hidden {
- targetName += " (hidden)"
+ targetName += " (HIDDEN)"
}
lines = append(lines, exitLine{coloredDir, targetName})
if visibleLen(coloredDir) > maxDirLen {
@@ -117,7 +120,7 @@ func (g *Game) showRoomExits(sess *net.Session, p *player.Player, room *world.Ro
first := true
for _, dir := range world.ExitOrder {
exitDef, ok := room.Exits[dir]
- if !ok || (exitDef.Hidden && !p.GodMode) {
+ if !ok || (exitDef.Hidden && !g.exitDiscovered(p, room.ID, dir)) {
continue
}
if !first {