aboutsummaryrefslogtreecommitdiff
path: root/internal/game/cmd_verbs.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/cmd_verbs.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/cmd_verbs.go')
-rw-r--r--internal/game/cmd_verbs.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/internal/game/cmd_verbs.go b/internal/game/cmd_verbs.go
index e4f1fa1..239f96b 100644
--- a/internal/game/cmd_verbs.go
+++ b/internal/game/cmd_verbs.go
@@ -139,9 +139,14 @@ func (g *Game) executeVerbs(sess *net.Session, args []string, rawInput string) {
if room, err := g.World.LoadRoom(p.RoomID); err == nil {
var exitDirs []string
for _, dir := range world.ExitOrder {
- if _, ok := room.Exits[dir]; ok {
- exitDirs = append(exitDirs, string(dir))
+ ed, ok := room.Exits[dir]
+ if !ok {
+ continue
}
+ if ed.Hidden && !g.exitDiscovered(p, p.RoomID, dir) {
+ continue
+ }
+ exitDirs = append(exitDirs, string(dir))
}
if len(exitDirs) > 0 {
sectionExits = append(sectionExits, strings.Join(exitDirs, ", "))