a little optimization
This commit is contained in:
parent
b89fe75a39
commit
5e8df5a022
2 changed files with 4 additions and 2 deletions
|
@ -111,7 +111,9 @@ placeHalls rng fc input =
|
|||
(nbs, nmat) = buildHall cross 3 b amat
|
||||
in
|
||||
-- if hallRatio nmat < 0.33 && wmax - 1 >= 2
|
||||
if wmax - 1 >= 3
|
||||
if wmax - 1 >= 3 &&
|
||||
all (\(Boundaries (minr, minc) (maxr, maxc)) ->
|
||||
maxr - minr > 3 && maxc - minc > 3) nbs
|
||||
then doHalls g2 nbs (row, col) (wmax -1) nmat
|
||||
else (g2, nmat)
|
||||
) (rand, mat) bs
|
||||
|
|
|
@ -99,7 +99,7 @@ loadMapFork ud future progress = do
|
|||
_ <- liftIO $ swapMVar progress (13 / loadSteps, "Placing NPCs")
|
||||
logIO A.Debug ("number of reachpoints: " ++ show (length rps))
|
||||
let nnex = Prelude.filter (\p -> pointType p /= RoomExit) rps
|
||||
npcposs <- placeNPCs inter mat rps 50 -- (length $ filter (\a -> pointType a == Table) nnex)
|
||||
npcposs <- placeNPCs inter mat rps 25 -- (length $ filter (\a -> pointType a == Table) nnex)
|
||||
_ <- liftIO $ swapMVar progress (14 / loadSteps, "Preparing MindMap graph")
|
||||
A.logIO A.Debug $ "number of placed NPCs: " ++ show (length npcposs)
|
||||
!(mmintmat, mmgraph) <- buildFloorMap . springField <$>
|
||||
|
|
Loading…
Reference in a new issue