Cleanup, merge modules

This commit is contained in:
2025-09-18 08:28:09 +01:00
parent f12ae3533c
commit 1564b1c721
23 changed files with 166 additions and 540 deletions
+9 -14
View File
@@ -76,15 +76,12 @@ data PlacementSpot
}
-- TODO attempt to unify/simplify this union type
data Placement
= Placement
{ _plOrder :: Int
, _plSpot :: PlacementSpot
, _plType :: PSType
, _plMID :: Maybe Int
, _plIDCont :: World -> Placement -> Maybe Placement
}
-- | RandomPlacement {_unRandomPlacement :: State StdGen Placement}
data Placement = Placement
{ _plSpot :: PlacementSpot
, _plType :: PSType
, _plMID :: Maybe Int
, _plIDCont :: World -> Placement -> Maybe Placement
}
{- The '_rmPolys' lists which polygons should be cut out to form the indestructible walls of the room.
Link pairs contain a position and rotation to attach to another room;
@@ -107,9 +104,9 @@ data Room = Room
, _rmPos :: [RoomPos]
, _rmPath :: S.Set (Point2, Point2)
, _rmPmnts :: [Placement]
, _rmInPmnt :: [InPlacement]
-- note that in placements form a list: multiple InPlacements can use the same id
, _rmOutPmnt :: IM.IntMap Placement
, _rmInPmnt :: [InPlacement]
, -- note that in placements form a list: multiple InPlacements can use the same id
_rmOutPmnt :: IM.IntMap Placement
, _rmBound :: [[Point2]]
, _rmFloor :: Floor
, _rmName :: String
@@ -126,8 +123,6 @@ data Room = Room
, _rmClusterStatus :: ClusterStatus
}
--data OutPlacement = OutPlacement { _opPlacement :: Placement }
data InPlacement = InPlacement
{ _ipPlacement :: World -> [Placement] -> Placement
, _ipPlacementID :: Int