From eea0ec07fd8b6062e209b9be6a5abae9e4461c85 Mon Sep 17 00:00:00 2001 From: nek0 Date: Tue, 5 May 2020 07:13:15 +0200 Subject: [PATCH] bumped module Floorplan to affection 0.0.0.10 --- src/Floorplan.hs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Floorplan.hs b/src/Floorplan.hs index b41d76b..299b7b4 100644 --- a/src/Floorplan.hs +++ b/src/Floorplan.hs @@ -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