Add automatic girder light placement for rectangular rooms

This commit is contained in:
2022-03-19 08:34:31 +00:00
parent c4a8912441
commit ce660309c5
6 changed files with 60 additions and 33 deletions
+12
View File
@@ -96,12 +96,23 @@ data Room = Room
, _rmMID :: Maybe Int
, _rmMParent :: Maybe Int
, _rmChildren :: [Int]
, _rmType :: RoomType
}
data RoomLink = RoomLink
{ _rlType :: S.Set RoomLinkType
, _rlPos :: Point2
, _rlDir :: Float
} deriving (Eq,Ord)
data RoomType = DefaultRoomType
| RectRoomType
{ _numLinkEW :: Int
, _numLinkNS :: Int
, _linkGapEW :: Float
, _linkGapNS :: Float
, _rmWidth :: Float
, _rmHeight :: Float
}
deriving (Eq,Ord)
data RoomLinkType
= OutLink
| InLink
@@ -174,6 +185,7 @@ data GenWorld = GenWorld
}
makeLenses ''Room
makeLenses ''RoomType
makeLenses ''PSType
makeLenses ''PlacementSpot
makeLenses ''Placement