Start creating explicit tutorial map
This commit is contained in:
+24
-24
@@ -1,37 +1,37 @@
|
||||
--{-# LANGUAGE TupleSections #-}
|
||||
{- | Annotating tree structures with desired properties for rooms. -}
|
||||
module Dodge.Annotation
|
||||
( module Dodge.Annotation.Data
|
||||
, module Dodge.Annotation
|
||||
) where
|
||||
import Dodge.Cleat
|
||||
import RandomHelp
|
||||
import Dodge.Tree
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.Annotation.Data
|
||||
import LensHelp
|
||||
|
||||
--import Control.Lens
|
||||
-- | Annotating tree structures with desired properties for rooms.
|
||||
module Dodge.Annotation (
|
||||
module Dodge.Annotation.Data,
|
||||
module Dodge.Annotation,
|
||||
) where
|
||||
|
||||
import Data.Maybe
|
||||
import Dodge.Annotation.Data
|
||||
import Dodge.Cleat
|
||||
--import Dodge.Data.GenWorld
|
||||
import Dodge.Tree
|
||||
import LensHelp
|
||||
import RandomHelp
|
||||
|
||||
annoToRoomTree :: Annotation -> State (StdGen,Int) MTRS
|
||||
annoToRoomTree :: Annotation -> State (StdGen, Int) MTRS
|
||||
annoToRoomTree an = case an of
|
||||
AnTree t -> zoom _1 t
|
||||
AnRoom r -> MTree "SingleRoom" . NodeTree . pure . (rmClusterStatus . csLinks . at OnwardCluster ?~ ()) <$> zoom _1 r <*> return []
|
||||
AnTree t -> zoom _1 t
|
||||
-- AnRoom r -> MTree "SingleRoom" . NodeTree . pure . (rmClusterStatus . csLinks . at OnwardCluster ?~ ()) <$> zoom _1 r <*> return []
|
||||
OnwardList ans -> do
|
||||
mts <- mapM annoToRoomTree ans
|
||||
return $ foldr1 attachOnward' mts
|
||||
IntAnno f -> do
|
||||
(g,i) <- get
|
||||
put (g,i+1)
|
||||
IntAnno f -> do
|
||||
(g, i) <- get
|
||||
put (g, i + 1)
|
||||
annoToRoomTree (f i)
|
||||
ModifyTree f a -> f <$> annoToRoomTree a
|
||||
PassthroughLockKeyLists ls ks i -> zoom _1 $ do
|
||||
(functionlockroom,randomitemidentity) <- takeOne ls
|
||||
(functionlockroom, randomitemidentity) <- takeOne ls
|
||||
lr <- functionlockroom i
|
||||
ii <- randomitemidentity
|
||||
keyroom <- fromJust $ lookup ii ks
|
||||
return $ MTree ("PassthroughLockKeyLists-"++show ii)
|
||||
(NodeMTree $ MTree "RassThroughLockKeyLists" (NodeMTree lr) [MBranch (toLabel i) keyroom])
|
||||
[]
|
||||
|
||||
return $
|
||||
MTree
|
||||
("PassthroughLockKeyLists-" ++ show ii)
|
||||
(NodeMTree $ MTree "RassThroughLockKeyLists" (NodeMTree lr) [MBranch (toLabel i) keyroom])
|
||||
[]
|
||||
|
||||
Reference in New Issue
Block a user