Implement targeting launcher shells using separate item
This commit is contained in:
+11
-5
@@ -6,6 +6,7 @@ Description : Simulation update
|
||||
-}
|
||||
module Dodge.Update (updateUniverse) where
|
||||
|
||||
import Data.Monoid
|
||||
import NewInt
|
||||
import Control.Monad
|
||||
import Dodge.Update.Input.InGame
|
||||
@@ -384,10 +385,12 @@ updateCreatureSoundPositions w =
|
||||
--updateIMr :: (World -> IM.IntMap a) -> (a -> a -> World -> World) -> World -> World
|
||||
--updateIMr fim fup w = foldr (dbArg fup) w (fim w)
|
||||
updateIMl :: (World -> IM.IntMap a) -> (a -> a -> World -> World) -> World -> World
|
||||
updateIMl fim fup w = foldl' (flip $ dbArg fup) w (fim w)
|
||||
updateIMl fim fup w = alaf Endo foldMap (dbArg fup) (fim w) w
|
||||
--updateIMl fim fup w = foldl' (flip $ dbArg fup) w (fim w)
|
||||
|
||||
updateIMl' :: (World -> IM.IntMap a) -> (a -> World -> World) -> World -> World
|
||||
updateIMl' fim fup w = foldl' (flip fup) w (fim w)
|
||||
updateIMl' fim fup w = alaf Endo foldMap fup (fim w) w
|
||||
--updateIMl' fim fup w = foldl' (flip fup) w (fim w)
|
||||
|
||||
updateCreatureGroups :: World -> World
|
||||
updateCreatureGroups w =
|
||||
@@ -561,10 +564,13 @@ ppEvents :: World -> World
|
||||
ppEvents w = IM.foldl' (flip $ \pp -> doPressPlateEvent (_ppEvent pp) pp) w $ w ^. cWorld . lWorld . pressPlates
|
||||
|
||||
updateSeenWalls :: World -> World
|
||||
updateSeenWalls w = foldl' markWallSeen w (map (_wlID . snd) $ allVisibleWalls w)
|
||||
updateSeenWalls w = alaf Endo foldMap (markWallSeen . _wlID . snd) (allVisibleWalls w) w
|
||||
--updateSeenWalls w = foldl' markWallSeen w (map (_wlID . snd) $ allVisibleWalls w)
|
||||
|
||||
markWallSeen :: World -> Int -> World
|
||||
markWallSeen w i = w & cWorld . seenWalls . at i ?~ ()
|
||||
markWallSeen :: Int -> World -> World
|
||||
markWallSeen i = cWorld . seenWalls . at i ?~ ()
|
||||
--markWallSeen :: World -> Int -> World
|
||||
--markWallSeen w i = w & cWorld . seenWalls . at i ?~ ()
|
||||
|
||||
--markWallSeen !w !i = w & cWorld . lWorld . walls %~ IM.adjust markSeen i
|
||||
-- in the past there might have been a space leak, which the following was meant
|
||||
|
||||
Reference in New Issue
Block a user