Add doors and an open command

Add a Door entity and an Open command, which necessitated supporting the
direction prompt. Currently nothing actually puts doors on the map,
which puts a slight damper on actually testing this out.
This commit is contained in:
Griffin Smith 2019-09-20 13:14:55 -04:00
parent 7770ed0548
commit 4db3a68efe
13 changed files with 151 additions and 29 deletions

View file

@ -27,7 +27,7 @@ randomItems cells = do
let len = rangeSize $ bounds cells
(numItems :: Int) <- floor . (* fromIntegral len)
<$> getRandomR @_ @Float (0.0004, 0.001)
items <- for [0..numItems] $ const do
items <- for [0..numItems] $ const $ do
pos <- randomPosition cells
itemType <- fmap (fromMaybe (error "no item raws!"))
. choose . ChooseElement