Add looping sound, add sound to terminals
This commit is contained in:
@@ -8,7 +8,6 @@ module Dodge.PlacementSpot
|
||||
, anyUnusedSpot
|
||||
, unusedSpotAwayFromLink
|
||||
, isUnusedLnk
|
||||
, isUnusedLnk'
|
||||
, isInLnk
|
||||
, unusedSpotNearInLink
|
||||
, randDirPS
|
||||
@@ -20,11 +19,12 @@ module Dodge.PlacementSpot
|
||||
, unusedOffPathAwayFromLink
|
||||
, setFallback
|
||||
, twoRoomPoss
|
||||
, isUnusedLinkType
|
||||
, isUnusedLnkType
|
||||
, rprBoolShift
|
||||
, rprBool
|
||||
, shiftInBy
|
||||
, resetPLUse
|
||||
, psposAddLabel
|
||||
) where
|
||||
import Dodge.LevelGen.Data
|
||||
import Geometry
|
||||
@@ -53,14 +53,12 @@ isUnusedLnk rp _ = case _rpLinkStatus rp of
|
||||
UnusedLink {} -> _rpPlacementUse rp == 0
|
||||
_ -> False
|
||||
|
||||
isUnusedLnk' :: RoomPos -> Bool
|
||||
isUnusedLnk' rp = case _rpLinkStatus rp of
|
||||
UnusedLink {} -> _rpPlacementUse rp == 0
|
||||
_ -> False
|
||||
|
||||
anyUnusedSpot :: PlacementSpot
|
||||
anyUnusedSpot = rprBool $ \rp _ -> _rpLinkStatus rp == NotLink && _rpPlacementUse rp == 0
|
||||
|
||||
psposAddLabel :: RoomPosType -> PlacementSpot -> PlacementSpot
|
||||
psposAddLabel lab = psSelect %~ (\f rp r -> f rp r & _Just . _2 . rpType %~ S.insert lab)
|
||||
|
||||
rprBool :: (RoomPos -> Room -> Bool) -> PlacementSpot
|
||||
rprBool t = PSPos (useRoomPosRoomCond t) (const id) Nothing
|
||||
|
||||
@@ -141,9 +139,9 @@ useRoomPosRoomCond t rp r
|
||||
| t rp r = Just (PS (_rpPos rp) (_rpDir rp), rp & rpPlacementUse +~ 1)
|
||||
| otherwise = Nothing
|
||||
|
||||
isUnusedLinkType :: RoomLinkType -> RoomPos -> Bool
|
||||
isUnusedLinkType rlt rp = case _rpLinkStatus rp of
|
||||
UnusedLink{_rplsType = rlts} -> rlt `S.member` rlts
|
||||
isUnusedLnkType :: RoomLinkType -> RoomPos -> Room -> Bool
|
||||
isUnusedLnkType rlt rp _ = case _rpLinkStatus rp of
|
||||
UnusedLink{_rplsType = rlts} -> rlt `S.member` rlts && _rpPlacementUse rp == 0
|
||||
_ -> False
|
||||
|
||||
unusedSpotNearInLink :: Float -> PlacementSpot
|
||||
|
||||
Reference in New Issue
Block a user