Cleanup warnings
This commit is contained in:
@@ -14,9 +14,7 @@ import Data.List
|
||||
import Data.Maybe
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
import Control.Lens
|
||||
import Control.DeepSeq (deepseq)
|
||||
import Data.Graph.Inductive hiding ((&))
|
||||
import Data.Graph.Inductive.NodeMap
|
||||
|
||||
-- probably don't have to rebuild the entire graph, oh well
|
||||
addButtonDoor :: Color -> Point2 -> Float -> Point2 -> Point2 -> World -> World
|
||||
@@ -27,7 +25,7 @@ addButtonDoor c btp btr a b w = over buttons (IM.insert bid bt)
|
||||
$ putDoubleDoor c cond a b w
|
||||
where
|
||||
bid = newKey $ _buttons w
|
||||
cond w = BtNoLabel == _btState (_buttons w IM.! bid)
|
||||
cond w' = BtNoLabel == _btState (_buttons w' IM.! bid)
|
||||
bt = (makeButton c eff) {_btPos = btp, _btRot = btr, _btID = bid}
|
||||
(newGraphPairs,removedPairs) = partition (isNothing . uncurry (intersectSegSeg' a b))
|
||||
$ _pathGraph' w
|
||||
@@ -45,7 +43,7 @@ addSwitchDoor c btp btr a b w = over buttons (IM.insert bid bt)
|
||||
$ putDoubleDoor c cond a b w
|
||||
where
|
||||
bid = newKey $ _buttons w
|
||||
cond w = BtOn == _btState (_buttons w IM.! bid)
|
||||
cond w' = BtOn == _btState (_buttons w' IM.! bid)
|
||||
bt = (makeSwitch c openDoor closeDoor) {_btPos = btp, _btRot = btr, _btID = bid}
|
||||
(newGraphPairs,removedPairs) = partition (isNothing . uncurry (intersectSegSeg' a b))
|
||||
$ _pathGraph' w
|
||||
@@ -127,7 +125,8 @@ mkTriggerDoubleDoor c cond pl pr xs = addSound $ zipWith3 (triggerDoorPaneLinear
|
||||
prd = pr -.- norm
|
||||
hwu = hw +.+ norm
|
||||
hwd = hw -.- norm
|
||||
addSound (x:xs) = f x : xs
|
||||
addSound (x:ys) = f x : ys
|
||||
addSound _ = error "When creating a trigger door, added a sound to nothing"
|
||||
f wl = over doorMech g wl
|
||||
g dm w
|
||||
| dist wp pld > 2 && dist wp hwd > 2
|
||||
|
||||
Reference in New Issue
Block a user