Refactor ai
This commit is contained in:
@@ -96,7 +96,7 @@ autoDoorPane (trigx,trigy) n closedPos openPos = Door
|
||||
a = fst closedPos
|
||||
b = snd closedPos
|
||||
dm w
|
||||
| any (crNearSeg 40 trigx trigy) $ IM.filter (_crIsAnimate . _crState) $ _creatures w
|
||||
| any (crNearSeg 40 trigx trigy) $ IM.filter isAnimate $ _creatures w
|
||||
= flip (foldr changeZonedWall) zoneps $ over walls (IM.adjust openDoor n) w
|
||||
| otherwise
|
||||
= flip (foldr changeZonedWall') zoneps $ over walls (IM.adjust closeDoor n) w
|
||||
|
||||
Reference in New Issue
Block a user