Add RoomCluster ideas

This commit is contained in:
2022-06-09 12:30:34 +01:00
parent 9252c48d2b
commit 785dbba5ef
6 changed files with 139 additions and 3 deletions
+3
View File
@@ -23,7 +23,9 @@ module Dodge.Data
, module Dodge.Equipment.Data
, module MaybeHelp
, module Dodge.Data.ItemAmount
, module Dodge.RoomCluster.Data
) where
import Dodge.RoomCluster.Data
import Dodge.Data.ItemAmount
import Dodge.ShortShow
import Dodge.Creature.State.Data
@@ -1469,6 +1471,7 @@ data Room = Room
, _rmMParent :: Maybe Int
, _rmChildren :: [Int]
, _rmType :: RoomType
, _rmClusterStatus :: ClusterStatus
}
data RoomLink = RoomLink
{ _rlType :: S.Set RoomLinkType
+3
View File
@@ -31,4 +31,7 @@ defaultRoom = Room
, _rmMParent = Nothing
, _rmChildren = []
, _rmType = DefaultRoomType
, _rmClusterStatus = defaultClusterStatus
}
defaultClusterStatus :: ClusterStatus
defaultClusterStatus = ClusterStatus "defRoomClust" S.empty
-3
View File
@@ -102,6 +102,3 @@ initialAnoTree = padSucWithDoors $ treeFromPost
{- | A test level tree. -}
initialRoomTree :: State StdGen (Tree (LabSubCompTree Room))
initialRoomTree = mapM anoToRoomTree initialAnoTree
--initialRoomTree :: State StdGen (Tree Room)
--initialRoomTree = do
-- expandTree <$> mapM anoToRoomTree initialAnoTree
+1
View File
@@ -0,0 +1 @@
module Dodge.RoomCluster where
+15
View File
@@ -0,0 +1,15 @@
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE StrictData #-}
module Dodge.RoomCluster.Data where
import qualified Data.Set as S
import Control.Lens
data ClusterStatus = ClusterStatus
{ _csName :: String
, _csLinks :: S.Set ClusterLink
}
data ClusterLink = OnwardCluster | SideCluster
deriving (Ord,Eq,Enum,Show)
makeLenses ''ClusterStatus