Add indicator light to switch doors
This commit is contained in:
@@ -83,6 +83,7 @@ data Room = Room
|
||||
}
|
||||
data RoomWire
|
||||
= RoomWire Point2 Float
|
||||
| WallWire Point2 Float Float
|
||||
data RoomPos
|
||||
= OutLink Int Point2 Float
|
||||
| InLink Point2 Float
|
||||
@@ -104,20 +105,6 @@ makeLenses ''PSType
|
||||
makeLenses ''PlacementSpot
|
||||
makeLenses ''Placement
|
||||
|
||||
-- TODO rename to any unused link facing out
|
||||
anyLnkOutPS :: PlacementSpot
|
||||
anyLnkOutPS = PSLnk f (const id) Nothing
|
||||
where
|
||||
f (UnusedLink p a) = Just $ PS p a
|
||||
f _ = Nothing
|
||||
|
||||
|
||||
anyLnkInPS :: Float -- ^ amount to shift inward
|
||||
-> PlacementSpot
|
||||
anyLnkInPS x = PSLnk f (const id) Nothing
|
||||
where
|
||||
f (UnusedLink v a) = Just $ PS (v -.- x *.* unitVectorAtAngle (a + 0.5 * pi)) (a+ pi)
|
||||
f _ = Nothing
|
||||
|
||||
spNoID :: PlacementSpot -> PSType -> Placement
|
||||
spNoID ps pst = Placement ps pst Nothing (const Nothing)
|
||||
|
||||
Reference in New Issue
Block a user