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
1 changed files with 7 additions and 0 deletions

View File

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