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