Add laser tunnel lock-key combination

This commit is contained in:
2022-03-09 15:27:35 +00:00
parent a4ec4e4889
commit 3bfebc266b
11 changed files with 104 additions and 75 deletions
+3 -2
View File
@@ -1,3 +1,4 @@
{-# LANGUAGE LambdaCase #-}
module Dodge.PlacementSpot where
import Dodge.LevelGen.Data
import Geometry
@@ -39,7 +40,7 @@ unusedSpotAwayFromLink x = PSPos f (const id) Nothing
setFallback :: Placement -> Placement -> Placement
setFallback fallback plmnt = plmnt
& plSpot . psFallback .~ Just fallback
& plSpot . psFallback %~ maybe (Just fallback) Just
& plIDCont %~ fmap (fmap $ setFallback fallback)
unusedOffPathAwayFromLink :: Float -> PlacementSpot
@@ -88,7 +89,7 @@ useRoomPosCond t rp _
a = _rpDir rp
unusedLnkToPS :: RoomPos -> Room -> Maybe (PlacementSpot,RoomPos)
unusedLnkToPS = useRoomPosCond $ \rp -> case rp of
unusedLnkToPS = useRoomPosCond $ \case
UnusedLink {} -> True
_ -> False