Add indicator light to switch doors
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
module Dodge.PlacementSpot where
|
||||
import Dodge.LevelGen.Data
|
||||
import Geometry
|
||||
|
||||
-- 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
|
||||
|
||||
fstLnkOut :: PlacementSpot
|
||||
fstLnkOut = PSLnk f (const id) Nothing
|
||||
where
|
||||
f (OutLink 0 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
|
||||
Reference in New Issue
Block a user