This commit is contained in:
2021-11-23 22:33:23 +00:00
parent ddd120dee1
commit 5f6d81bd05
10 changed files with 65 additions and 53 deletions
+20 -6
View File
@@ -91,18 +91,31 @@ data RoomLink = RoomLink
data RoomLinkType
= OutLink
| InLink
| AnyLink
| LabLink Int
deriving (Eq,Ord)
data RoomWire
= --RoomWire Point2 Float
WallWire Point2 Float Float
data RoomPos
= UsedOutLink Int Point2 Float
| UsedInLink Int Point2 Float
| UnusedLink Point2 Float
| PosPl Point2 Float
| LabPos Int RoomPos
= UsedOutLink
{_rpChildNum :: Int
,_rpOutRoomID :: Int
,_rpPos :: Point2
,_rpDir :: Float
}
| UsedInLink
{_rpInRoomID :: Int
,_rpPos :: Point2
,_rpDir ::Float
}
| UnusedLink
{_rpPos :: Point2
,_rpDir ::Float
}
| PosPl
{_rpPos :: Point2
,_rpDir ::Float
}
deriving (Eq,Ord,Show)
makeLenses ''Room
@@ -110,6 +123,7 @@ makeLenses ''PSType
makeLenses ''PlacementSpot
makeLenses ''Placement
makeLenses ''RoomLink
makeLenses ''RoomPos
spNoID :: PlacementSpot -> PSType -> Placement
spNoID ps pst = Placement ps pst Nothing (const Nothing)