bumped module Floorplan to affection 0.0.0.10

This commit is contained in:
nek0 2020-05-05 07:13:15 +02:00
parent ace1f0ce8c
commit eea0ec07fd

View file

@ -322,6 +322,7 @@ buildFacilities gen fc input =
in (ngen, facilFlood facil acc x) in (ngen, facilFlood facil acc x)
) (gen, input) nearests ) (gen, input) nearests
facilFlood :: TileState -> Matrix TileState -> (Int, Int) -> Matrix TileState
facilFlood ts mat coords@(cr, cc) = facilFlood ts mat coords@(cr, cc) =
let cur = mat M.! coords let cur = mat M.! coords
altered = M.setElem ts coords mat altered = M.setElem ts coords mat
@ -417,6 +418,7 @@ buildGraph amat mat root coord@(br, bc)
| otherwise = c | otherwise = c
flood :: Matrix TileState -> [(Int, Int)] -> (Int, Int) -> [(Int,Int)]
flood amat acc (fr, fc) = flood amat acc (fr, fc) =
let ncoords = [] ++ let ncoords = [] ++
(if (fr + 1, fc) `notElem` acc && (if (fr + 1, fc) `notElem` acc &&
@ -488,6 +490,9 @@ assignClearance graph imat =
return ret return ret
else else
return room return room
reassign _ _ (GHall _) = do
logIO A.Error "cannot reassign Hallways!"
error "*dies*"
actualRoomType :: Boundaries Int -> M.Matrix TileState -> TileState actualRoomType :: Boundaries Int -> M.Matrix TileState -> TileState
actualRoomType (Boundaries (minrow, mincol) (maxrow, maxcol)) imat = actualRoomType (Boundaries (minrow, mincol) (maxrow, maxcol)) imat =
@ -546,6 +551,8 @@ findNeighbor (dir, _) bnds ingraph
_ -> error "findNeighbor: Not a GRoom result" _ -> error "findNeighbor: Not a GRoom result"
else else
error "findNeighbor: Non-Singleton filter result" error "findNeighbor: Non-Singleton filter result"
findNeighbor (_, _) _ _ =
A.log A.Error "*confused from indirection*" (error "*dies*")
buildDoors :: Matrix TileState -> V.Vector Graph -> IO (Matrix TileState) buildDoors :: Matrix TileState -> V.Vector Graph -> IO (Matrix TileState)
buildDoors = V.foldM placeDoors buildDoors = V.foldM placeDoors