Add some background sounds to machines

This commit is contained in:
2025-12-26 12:30:05 +00:00
parent 2575ccc0f4
commit 337e786f33
4 changed files with 22 additions and 59 deletions
+19 -1
View File
@@ -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)