Improve detector equipment, various cleanup

This commit is contained in:
2022-05-27 18:49:54 +01:00
parent 60fc2d44e8
commit 79b3a86520
15 changed files with 180 additions and 138 deletions
+3 -2
View File
@@ -35,8 +35,9 @@ machineUpdateDeathEff f mc
machineAddSound :: SoundID -> (Machine -> World -> World) -> Machine -> World -> World
machineAddSound sid f mc w
| dist (_crPos $ you w) (_mcPos mc) < 100
= soundContinue (MachineSound mid) (_mcPos mc) sid (Just 2) $ f mc w
| d < 200
= soundContinueVol (1-0.005*d) (MachineSound mid) (_mcPos mc) sid (Just 2) $ f mc w
| otherwise = f mc w
where
d = dist (_crPos $ you w) (_mcPos mc)
mid = _mcID mc