aboutsummaryrefslogtreecommitdiff
path: root/internal/game/cmd_verbs.go
diff options
context:
space:
mode:
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, ", "))