about summary refs log tree commit diff
path: root/users/glittershark/xanthous/src/Xanthous/App.hs
diff options
context:
space:
mode:
authorGriffin Smith <grfn@gws.fyi>2020-07-03T17·40-0400
committerglittershark <grfn@gws.fyi>2020-07-03T17·47+0000
commit26bb34823d884a619985cf91262f180e0ad4d207 (patch)
tree714606f889f87d7f9db3c8c1627933d5386388f8 /users/glittershark/xanthous/src/Xanthous/App.hs
parent361ffd42d7d0f6a3ab1c6a2345b2784b9381cb4d (diff)
fix(xan): Don't allow looking at invisible things r/1198
Extract the conditional we're using to decide whether or not to render a
given entity at a position, and use that when getting the list of
entities to describe as a result of the "Look" command.

Change-Id: I1ec86211c2fcbd984dd52338fb5631667c22c723
Reviewed-on: https://cl.tvl.fyi/c/depot/+/903
Reviewed-by: glittershark <grfn@gws.fyi>
Reviewed-by: BuildkiteCI
Tested-by: BuildkiteCI
Diffstat (limited to 'users/glittershark/xanthous/src/Xanthous/App.hs')
-rw-r--r--users/glittershark/xanthous/src/Xanthous/App.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/users/glittershark/xanthous/src/Xanthous/App.hs b/users/glittershark/xanthous/src/Xanthous/App.hs
index a0913780faef..9091961b725c 100644
--- a/users/glittershark/xanthous/src/Xanthous/App.hs
+++ b/users/glittershark/xanthous/src/Xanthous/App.hs
@@ -217,7 +217,7 @@ handleCommand Close = do
 handleCommand Look = do
   prompt_ @'PointOnMap ["look", "prompt"] Cancellable
     $ \(PointOnMapResult pos) ->
-      use (entities . EntityMap.atPosition pos)
+      gets (revealedEntitiesAtPosition pos)
       >>= \case
         Empty -> say_ ["look", "nothing"]
         ents -> describeEntities ents