some refinement in messages

This commit is contained in:
nek0 2018-07-19 04:56:31 +02:00
parent 2b86eaf230
commit 2f8a267b09

View file

@ -1,5 +1,6 @@
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE BangPatterns #-}
module MainGame.WorldMap where module MainGame.WorldMap where
import Affection as A import Affection as A
@ -96,12 +97,12 @@ loadMapFork ud future progress = do
logIO A.Debug ("number of reachpoints: " ++ show (length rps)) logIO A.Debug ("number of reachpoints: " ++ show (length rps))
let nnex = Prelude.filter (\p -> pointType p /= RoomExit) rps let nnex = Prelude.filter (\p -> pointType p /= RoomExit) rps
npcposs <- placeNPCs inter mat rps 100 -- (length nnex) npcposs <- placeNPCs inter mat rps 100 -- (length nnex)
_ <- liftIO $ swapMVar progress (14 / loadSteps, "Unfolding MindMap graph") _ <- liftIO $ swapMVar progress (14 / loadSteps, "Preparing MindMap graph")
A.logIO A.Debug $ "number of placed NPCs: " ++ show (length npcposs) A.logIO A.Debug $ "number of placed NPCs: " ++ show (length npcposs)
(mmintmat, mmgraph) <- buildFloorMap . springField <$> !(mmintmat, mmgraph) <- buildFloorMap . springField <$>
buildMindMap (length npcposs) 2 buildMindMap (length npcposs) 2
_ <- liftIO $ swapMVar progress (15 / loadSteps, "Converting MindMap to images") _ <- liftIO $ swapMVar progress (15 / loadSteps, "Unfolding and Converting MindMap to images")
let mmimgmat = convertTileToImg $ manhattan mmgraph mmintmat let !mmimgmat = convertTileToImg $ manhattan mmgraph mmintmat
_ <- liftIO $ swapMVar progress (16 / loadSteps, "Creating WorldState") _ <- liftIO $ swapMVar progress (16 / loadSteps, "Creating WorldState")
(nws, _) <- yieldSystemT (worldState ud) $ do (nws, _) <- yieldSystemT (worldState ud) $ do
let pmmpos = (+ 0.5) . (fromIntegral :: Int -> Double) . floor <$> mmPos let pmmpos = (+ 0.5) . (fromIntegral :: Int -> Double) . floor <$> mmPos