Improve low level flamer
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
{-# LANGUAGE TupleSections #-}
|
||||
module Dodge.Placement.Instance.Terminal where
|
||||
module Dodge.Placement.Instance.Terminal
|
||||
( putTerminal
|
||||
) where
|
||||
import Dodge.Data
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.Default
|
||||
import Dodge.Machine
|
||||
import Dodge.WorldEvent.Explosion
|
||||
import Color
|
||||
import Geometry
|
||||
import ShapePicture
|
||||
@@ -12,10 +16,12 @@ import Shape
|
||||
import Data.Maybe
|
||||
|
||||
putTerminal :: (GenParams -> TerminalParams) -> Placement
|
||||
putTerminal f = PlacementGenUpdate g $ ps0jPushPS (PutButton $ thebutton)
|
||||
$ pt0 (PutMachine (dark magenta) (reverse $ square 10) defaultMachine
|
||||
putTerminal f = PlacementGenUpdate g $ ps0PushPS (PutButton $ thebutton)
|
||||
$ \pl -> Just $ pt0 (PutMachine terminalColor (reverse $ square 10) defaultMachine
|
||||
{ _mcDraw = drawTerminal
|
||||
, _mcHP = 100
|
||||
, _mcUpdate = machineUpdateDeathEff $ \mc -> (buttons . at (fromJust (_plMID pl)) .~ Nothing)
|
||||
. makeExplosionAt (_mcPos mc)
|
||||
})
|
||||
$ const Nothing
|
||||
where
|
||||
@@ -31,8 +37,11 @@ putTerminal f = PlacementGenUpdate g $ ps0jPushPS (PutButton $ thebutton)
|
||||
, _btTerminalParams = TerminalParams [] [] 10
|
||||
}
|
||||
|
||||
terminalColor :: Color
|
||||
terminalColor = dark magenta
|
||||
|
||||
drawTerminal :: Machine -> SPic
|
||||
drawTerminal _ = noPic $ colorSH (dark green) $ upperPrismPoly 15 $ square 10
|
||||
drawTerminal _ = noPic $ colorSH terminalColor $ upperPrismPoly 15 $ square 10
|
||||
|
||||
displayTerminalMessage :: Int -> World -> World
|
||||
displayTerminalMessage btid w = w & hud . hudElement .~ DisplayInventory DisplayTerminal
|
||||
|
||||
Reference in New Issue
Block a user