Cleanup
This commit is contained in:
@@ -1547,16 +1547,12 @@ explodeRemoteRocket itid ptid n w
|
|||||||
$ set (projectiles . ix ptid . ptPict) blank
|
$ set (projectiles . ix ptid . ptPict) blank
|
||||||
$ set (itPoint . wpFire) (flip const)
|
$ set (itPoint . wpFire) (flip const)
|
||||||
$ resetName
|
$ resetName
|
||||||
-- $ resetScope
|
|
||||||
$ makeExplosionAt (_ptPos (_projectiles w IM.! ptid)) w
|
$ makeExplosionAt (_ptPos (_projectiles w IM.! ptid)) w
|
||||||
-- $ makeShrapnelBombAt (_ptPos (_projectiles w IM.! ptid)) w
|
|
||||||
where resetName = set (itPoint . itName) "REMOTELAUNCHER"
|
where resetName = set (itPoint . itName) "REMOTELAUNCHER"
|
||||||
-- resetScope = creatures . ix n . crInv . ix j . itScope . _Just . scopePos .~ (0,0)
|
|
||||||
itPoint = pointToItem $ _itemPositions w IM.! itid
|
itPoint = pointToItem $ _itemPositions w IM.! itid
|
||||||
|
|
||||||
throwRemoteBomb :: Int -> World -> World
|
throwRemoteBomb :: Int -> World -> World
|
||||||
throwRemoteBomb n w = setLocation $ removePict $ resetFire
|
throwRemoteBomb n w = setLocation $ removePict $ resetFire
|
||||||
-- $ resetName $ over projectiles addG $ set randGen g w
|
|
||||||
$ resetName $ over projectiles addG w
|
$ resetName $ over projectiles addG w
|
||||||
where addG = IM.insert i
|
where addG = IM.insert i
|
||||||
$ Projectile { _ptPos = p
|
$ Projectile { _ptPos = p
|
||||||
|
|||||||
+18
-20
@@ -26,25 +26,23 @@ update :: World -> World
|
|||||||
update w
|
update w
|
||||||
| _menuState w /= InGame = w
|
| _menuState w /= InGame = w
|
||||||
| otherwise =
|
| otherwise =
|
||||||
let w1 = updateParticles' $ updateParticles
|
let w1 = updateParticles' . updateProjectiles
|
||||||
$ updateLightSources
|
. updateLightSources
|
||||||
$ zoneClouds
|
. zoneClouds
|
||||||
$ updateClouds
|
. updateClouds
|
||||||
$ updateCreatures
|
. updateCreatures
|
||||||
$ updateBlocks -- $ zoning
|
. updateBlocks -- . zoning
|
||||||
$ updateSeenWalls
|
. updateSeenWalls
|
||||||
$ updateSoundQueue
|
. updateSoundQueue
|
||||||
$ updateCloseObjects
|
$ updateCloseObjects w
|
||||||
w
|
in checkEndGame . ppEvents
|
||||||
w2 = -- updateWeaponCounters $
|
. updateCamera
|
||||||
simpleCrSprings
|
. colCrsWalls
|
||||||
$ zoneCreatures $ wallEvents
|
. simpleCrSprings
|
||||||
$ set worldEvents id $ _worldEvents w1
|
. zoneCreatures
|
||||||
w1
|
. wallEvents
|
||||||
w3 = updateCamera
|
. set worldEvents id
|
||||||
$ colCrsWalls
|
$ _worldEvents w1 w1
|
||||||
w2
|
|
||||||
in checkEndGame $ ppEvents w3
|
|
||||||
where -- zoning w = set wallsZone (IM.foldr wallInZone IM.empty (_walls w))
|
where -- zoning w = set wallsZone (IM.foldr wallInZone IM.empty (_walls w))
|
||||||
-- w
|
-- w
|
||||||
-- wallInZone wl | dist (_wlLine wl !! 0) (_wlLine wl !! 1) <= 2*zoneSize
|
-- wallInZone wl | dist (_wlLine wl !! 0) (_wlLine wl !! 1) <= 2*zoneSize
|
||||||
@@ -68,7 +66,7 @@ updateSoundQueue = set soundQueue []
|
|||||||
updateLightSources w = set tempLightSources (catMaybes tlss) w'
|
updateLightSources w = set tempLightSources (catMaybes tlss) w'
|
||||||
where (w',tlss) = mapAccumR (\a b -> _tlsUpdate b a b) w $ _tempLightSources w
|
where (w',tlss) = mapAccumR (\a b -> _tlsUpdate b a b) w $ _tempLightSources w
|
||||||
|
|
||||||
updateParticles w = IM.foldr' _ptUpdate w $ _projectiles w
|
updateProjectiles w = IM.foldr' _ptUpdate w $ _projectiles w
|
||||||
|
|
||||||
updateParticles' :: World -> World
|
updateParticles' :: World -> World
|
||||||
updateParticles' w = set particles' (catMaybes ps) w'
|
updateParticles' w = set particles' (catMaybes ps) w'
|
||||||
|
|||||||
Reference in New Issue
Block a user