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