Add some background sounds to machines
This commit is contained in:
@@ -118,11 +118,29 @@ mcPlaySound mc w = case _mcType mc of
|
||||
| d < 100 ->
|
||||
soundContinueVol
|
||||
(1 -0.01 * d)
|
||||
(MachineSound mid)
|
||||
(MachineBackgroundSound mid)
|
||||
(_mcPos mc)
|
||||
fridgeHumS
|
||||
(Just 2)
|
||||
w
|
||||
McDistributer {}
|
||||
| d < 100 ->
|
||||
soundContinueVol
|
||||
(0.5 * (1 -0.01 * d))
|
||||
(MachineBackgroundSound mid)
|
||||
(_mcPos mc)
|
||||
whirS
|
||||
(Just 2)
|
||||
w
|
||||
McProxSensor {}
|
||||
| d < 100 ->
|
||||
soundContinueVol
|
||||
(0.5 * (1 -0.01 * d))
|
||||
(MachineBackgroundSound mid)
|
||||
(_mcPos mc)
|
||||
throbC4S
|
||||
(Just 2)
|
||||
w
|
||||
_ -> w
|
||||
where
|
||||
d = max 0 (dist ( you w ^. crPos . _xy) (_mcPos mc) - 100)
|
||||
|
||||
Reference in New Issue
Block a user