build also elevator doors

This commit is contained in:
nek0 2019-02-15 06:50:39 +01:00
parent 4e0cbd18fe
commit 16a329ddac

View file

@ -256,7 +256,7 @@ loadMapFork ud ad future progress = do
( p + increment ( p + increment
, "Registering doors into WorldState" , "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 mapM_ (\door -> do
let rooms = Prelude.foldl let rooms = Prelude.foldl
(\acc coord -> (\acc coord ->
@ -292,7 +292,7 @@ loadMapFork ud ad future progress = do
| otherwise = error ("strange wall: " ++ show wall) | otherwise = error ("strange wall: " ++ show wall)
void $ createEntity $ newEntity void $ createEntity $ newEntity
{ pos = Just (fmap ((+ 0.5) . fromIntegral) coord) { 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 , anim = Just $ AnimState (AnimId AnimDoor0 "shut" orientation) 0 0
} }
) doors ) doors