From 16a329ddac1621f3613a4d6ab2112ab77b2aa61c Mon Sep 17 00:00:00 2001 From: nek0 Date: Fri, 15 Feb 2019 06:50:39 +0100 Subject: [PATCH] build also elevator doors --- src/MainGame/WorldMap.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MainGame/WorldMap.hs b/src/MainGame/WorldMap.hs index 4bd4839..287a83b 100644 --- a/src/MainGame/WorldMap.hs +++ b/src/MainGame/WorldMap.hs @@ -256,7 +256,7 @@ loadMapFork ud ad future progress = do ( p + increment , "Registering doors into WorldState" ))) - let doors = Prelude.filter ((RoomExit ==) . pointType) rps + let doors = Prelude.filter ((\t -> t == RoomExit || t == Elevator) . pointType) rps mapM_ (\door -> do let rooms = Prelude.foldl (\acc coord -> @@ -292,7 +292,7 @@ loadMapFork ud ad future progress = do | otherwise = error ("strange wall: " ++ show wall) void $ createEntity $ newEntity { pos = Just (fmap ((+ 0.5) . fromIntegral) coord) - , clearanceLvl = Just (maximum $ Prelude.map clearance (Prelude.map snd rooms)) + , clearanceLvl = Just (maximum $ 0 : Prelude.map clearance (Prelude.map snd rooms)) , anim = Just $ AnimState (AnimId AnimDoor0 "shut" orientation) 0 0 } ) doors