still not finding toilet bug
This commit is contained in:
parent
c4c7541b71
commit
d79d9b1ed9
4 changed files with 13 additions and 6 deletions
|
@ -124,6 +124,13 @@ placeInteriorIO imat imgmat irp graph =
|
|||
))
|
||||
then A.log A.Debug ("no cluster placed") $
|
||||
placeCluster g2 bnds (try + 1) mat rp appl
|
||||
else if
|
||||
any (`elem` (oldreaches))
|
||||
(V2
|
||||
<$> [pr .. pr + nrows cmat - 1]
|
||||
<*> [pc .. pc + ncols cmat - 1])
|
||||
then A.log A.Debug ("no cluster placed") $
|
||||
placeCluster g2 bnds (try + 1) mat rp appl
|
||||
else if
|
||||
not (isReachable newmat [] (oldreaches ++ reaches) exits)
|
||||
then A.log A.Debug ("no cluster placed") $
|
||||
|
|
|
@ -3,7 +3,7 @@ module Navigation where
|
|||
import Affection as A
|
||||
|
||||
import Data.Matrix as M
|
||||
import Data.Maybe (isJust)
|
||||
import Data.Maybe (isJust, catMaybes)
|
||||
|
||||
-- internal imports
|
||||
|
||||
|
|
|
@ -97,5 +97,5 @@ instance Collidible ImgId where
|
|||
[ Boundaries (14/36, 14/36) (22/36, 22/36)
|
||||
]
|
||||
collisionObstacle ImgEmptyNoWalk =
|
||||
[ Boundaries (0, 0) (1, 1) ]
|
||||
[ Boundaries (0, 0) (0.99, 0.99) ]
|
||||
collisionObstacle _ = []
|
||||
|
|
|
@ -193,7 +193,7 @@ naviGraph imgmat animBounds (V2 r c) =
|
|||
(\(V2 br bc, _) -> floor br == r + oor && floor bc == c + ooc)
|
||||
animBounds))
|
||||
[(0, cc), (rr, 0)])
|
||||
then V2 (r + rr) (c + cc): acc
|
||||
then V2 (r + rr) (c + cc) : acc
|
||||
else acc
|
||||
)
|
||||
[]
|
||||
|
|
Loading…
Reference in a new issue