Door destruction happens during door update, updates pathing
This commit is contained in:
+1
-17
@@ -3,8 +3,6 @@
|
||||
|
||||
module Dodge.Update (updateUniverse) where
|
||||
|
||||
import Dodge.Zoning.Pathing
|
||||
import Dodge.Debug.Picture
|
||||
import Dodge.Zoning.Base
|
||||
import Dodge.Path
|
||||
import Data.Foldable
|
||||
@@ -328,14 +326,8 @@ updateEdgeWallObs w (i,j) = fromMaybe w $ do
|
||||
| otherwise = at DoorObstacle ?~ ()
|
||||
|
||||
updateDoors :: World -> World
|
||||
updateDoors w = let (is,w') = foldrM doDrWdWd' w (w ^. cWorld . lWorld . doors)
|
||||
updateDoors w = let (is,w') = foldrM updateDoor w (w ^. cWorld . lWorld . doors)
|
||||
in updateEdgesWall (zonesExtract (w ^. incEdgeZoning & each . each %~ S.fromList) is) w'
|
||||
& cWorld . lWorld . flares <>~ foldMap (drawZoneCol green peZoneSize) is
|
||||
--updateDoors w = uncurry updateEdgesWall .
|
||||
-- over _1 (zonesExtract (w ^. incEdgeZoning & each . each %~ S.fromList)) $ foldrM doDrWdWd' w (w ^. cWorld . lWorld . doors)
|
||||
|
||||
updateDoor :: Door -> World -> World
|
||||
updateDoor dr = doDrWdWd (_drMech dr) dr
|
||||
|
||||
updateMagnets :: LWorld -> LWorld
|
||||
updateMagnets lw =
|
||||
@@ -561,14 +553,6 @@ updateIMl fim fup w = alaf Endo foldMap (dbArg fup) (fim w) w
|
||||
updateIMl' :: (World -> IM.IntMap a) -> (a -> World -> World) -> World -> World
|
||||
updateIMl' fim fup w = alaf Endo foldMap fup (fim w) w
|
||||
|
||||
updateAccum :: (Foldable f, Monoid m)
|
||||
=> (World -> f a)
|
||||
-> (a -> World -> (m, World))
|
||||
-> World
|
||||
-> (m, World)
|
||||
updateAccum fim fup w = foldrM fup w (fim w)
|
||||
--alaf Endo foldMap fup (fim w) w
|
||||
|
||||
updateCreatureGroups :: World -> World
|
||||
updateCreatureGroups w =
|
||||
w & cWorld . lWorld . creatureGroups
|
||||
|
||||
Reference in New Issue
Block a user