Half add explicit death event for machines
This commit is contained in:
@@ -5,6 +5,7 @@ module Dodge.Placement.Instance.Terminal
|
||||
, simpleTermMessage
|
||||
, genTermMessage
|
||||
, topFlushStrings
|
||||
, terminalColor
|
||||
) where
|
||||
import Dodge.Data
|
||||
import Dodge.LevelGen.Data
|
||||
@@ -35,14 +36,14 @@ putTerminal' col mcf = ps0PushPS (PutButton termButton)
|
||||
})
|
||||
$ const Nothing
|
||||
|
||||
putTerminal :: (World -> TerminalParams) -> Placement
|
||||
putTerminal f = ps0PushPSw PutNothing $ \_ _ -> Just $
|
||||
putTerminal :: Color -> (World -> TerminalParams) -> Placement
|
||||
putTerminal col f = ps0PushPSw PutNothing $ \_ _ -> Just $
|
||||
ps0PushPS (PutButton $ termButton & btTerminalParams .~ f)
|
||||
$ \pl -> Just $ pt0 (PutMachine terminalColor (reverse $ square 10) defaultMachine
|
||||
{ _mcDraw = noPic . terminalShape terminalColor
|
||||
$ \pl -> Just $ pt0 (PutMachine col (reverse $ square 10) defaultMachine
|
||||
{ _mcDraw = noPic . terminalShape col
|
||||
, _mcHP = 100
|
||||
, _mcUpdate = machineAddSound fridgeHumS
|
||||
$ machineUpdateDeathEff $ \mc -> (buttons . at (fromJust (_plMID pl)) .~ Nothing)
|
||||
, _mcUpdate = machineAddSound fridgeHumS (\_ -> id)
|
||||
, _mcDeath = \mc -> (buttons . at (fromJust (_plMID pl)) .~ Nothing)
|
||||
. makeExplosionAt (_mcPos mc)
|
||||
})
|
||||
$ const Nothing
|
||||
|
||||
Reference in New Issue
Block a user