Move machine destruction to external function
This commit is contained in:
+6
-4
@@ -12,8 +12,9 @@ import Dodge.CullBox
|
||||
--import Dodge.Block
|
||||
import Dodge.Distortion
|
||||
import Dodge.SoundLogic
|
||||
import Dodge.Wall.Delete
|
||||
--import Dodge.Wall.Delete
|
||||
import Dodge.Update.WallDamage
|
||||
import Dodge.Machine.Destroy
|
||||
--import Dodge.Menu
|
||||
import Dodge.Base
|
||||
import Dodge.Zone
|
||||
@@ -127,9 +128,10 @@ updateWorldSelect w = f . g $ case (w ^? mouseButtons . ix ButtonLeft, w ^? mous
|
||||
mcChooseUpdate :: Machine -> Machine -> World -> World
|
||||
mcChooseUpdate mc mc'
|
||||
| _mcHP mc > 0 = _mcUpdate mc mc'
|
||||
| otherwise = (machines %~ IM.delete (_mcID mc))
|
||||
. deleteWallIDs (_mcWallIDs mc)
|
||||
. _mcDeath mc mc'
|
||||
| otherwise = destroyMachine mc
|
||||
-- (machines %~ IM.delete (_mcID mc))
|
||||
-- . deleteWallIDs (_mcWallIDs mc)
|
||||
-- . _mcDeath mc mc'
|
||||
|
||||
tmUpdate :: Terminal -> World -> World
|
||||
tmUpdate tm w = case w ^? terminals . ix (_tmID tm) . tmFutureLines . ix 0 of
|
||||
|
||||
Reference in New Issue
Block a user