Re-add machine hum to all terminals
This commit is contained in:
@@ -20,7 +20,7 @@ import Geometry
|
|||||||
import ShapePicture
|
import ShapePicture
|
||||||
import LensHelp
|
import LensHelp
|
||||||
import Shape
|
import Shape
|
||||||
import ShapePicture
|
--import ShapePicture
|
||||||
--import Sound.Data
|
--import Sound.Data
|
||||||
|
|
||||||
import Data.Maybe
|
import Data.Maybe
|
||||||
@@ -33,7 +33,7 @@ putTerminal''
|
|||||||
putTerminal'' mc tm mcf = ps0PushPS (PutTerminal tm)
|
putTerminal'' mc tm mcf = ps0PushPS (PutTerminal tm)
|
||||||
$ \tmpl -> Just $ ps0PushPS (PutButton termButton)
|
$ \tmpl -> Just $ ps0PushPS (PutButton termButton)
|
||||||
$ \btpl -> Just $ pt0 (PutMachine (reverse $ square 10)
|
$ \btpl -> Just $ pt0 (PutMachine (reverse $ square 10)
|
||||||
(mc & mcUpdate %~ (\fmu mc' -> (mcf (fromJust $ _plMID btpl) mc' . fmu mc'))
|
(mc & mcUpdate %~ (\fmu mc' -> (mcf (fromJust $ _plMID btpl) mc' . fmu mc')) . machineAddSound fridgeHumS
|
||||||
& mcDeath %~ (\fd mc' -> mcKillTerm mc' . (buttons . at (fromJust (_plMID btpl)) .~ Nothing) . fd mc')
|
& mcDeath %~ (\fd mc' -> mcKillTerm mc' . (buttons . at (fromJust (_plMID btpl)) .~ Nothing) . fd mc')
|
||||||
) )
|
) )
|
||||||
$ \mcpl -> Just $ sps0 $ PutWorldUpdate $ const (setids tmpl btpl mcpl)
|
$ \mcpl -> Just $ sps0 $ PutWorldUpdate $ const (setids tmpl btpl mcpl)
|
||||||
@@ -48,8 +48,6 @@ putTerminal'' mc tm mcf = ps0PushPS (PutTerminal tm)
|
|||||||
btid = fromJust (_plMID btpl)
|
btid = fromJust (_plMID btpl)
|
||||||
mcid = fromJust (_plMID mcpl)
|
mcid = fromJust (_plMID mcpl)
|
||||||
|
|
||||||
-- machineAddSound fridgeHumS
|
|
||||||
|
|
||||||
mcKillTerm :: Machine -> World -> World
|
mcKillTerm :: Machine -> World -> World
|
||||||
mcKillTerm mc w = fromMaybe w $ do
|
mcKillTerm mc w = fromMaybe w $ do
|
||||||
tmid <- _mcTermMID mc
|
tmid <- _mcTermMID mc
|
||||||
@@ -62,7 +60,8 @@ putTerminal'
|
|||||||
-> Terminal
|
-> Terminal
|
||||||
-> (Int -> Machine -> World -> World) -- | machine update, takes button id as input
|
-> (Int -> Machine -> World -> World) -- | machine update, takes button id as input
|
||||||
-> Placement
|
-> Placement
|
||||||
putTerminal' col = putTerminal'' (defaultMachine & mcColor .~ col)
|
putTerminal' col = putTerminal'' (defaultMachine
|
||||||
|
& mcColor .~ col)
|
||||||
{ _mcDraw = noPic . terminalShape
|
{ _mcDraw = noPic . terminalShape
|
||||||
, _mcHP = 100
|
, _mcHP = 100
|
||||||
, _mcSensor = defaultProximitySensor
|
, _mcSensor = defaultProximitySensor
|
||||||
|
|||||||
Reference in New Issue
Block a user