Refactor sound

This commit is contained in:
2021-09-12 17:52:34 +01:00
parent ea333a363b
commit 51a85bd1ec
97 changed files with 409 additions and 177 deletions
+4 -4
View File
@@ -19,7 +19,7 @@ import Dodge.Base
import Dodge.Zone
import Dodge.Base.Collide
import Dodge.SoundLogic
import Dodge.SoundLogic.Synonyms
import Dodge.SoundLogic.LoadSound
--import Dodge.WorldEvent
import Dodge.Inventory
--import Dodge.LightSources
@@ -167,7 +167,7 @@ blinkAction
-> World
-> World
blinkAction cr w
= soundMultiFrom [TeleSound 0,TeleSound 1] p3 teleSound Nothing
= soundMultiFrom [TeleSound 0,TeleSound 1] p3 teleS Nothing
. over radDistortion (distortionBulge ++)
. set (creatures . ix cid . crPos) p3
. blinkShockwave cid p3
@@ -198,7 +198,7 @@ youDropItem w = case yourItem w of
NoItem -> w
_ -> rmSelectedInvItem (_yourID w)
. copyItemToFloor (you w) (_crInvSel cr)
$ soundFrom (CrSound (_crID cr)) (_crPos cr) putDownSound Nothing
$ soundFrom (CrSound (_crID cr)) (_crPos cr) whiteNoiseFadeOutS Nothing
w
where
cr = you w
@@ -233,7 +233,7 @@ pickUpItem
pickUpItem cid flit w = case maybeInvSlot of
Nothing -> w
Just i -> w
& soundFrom (CrSound cid) (_flItPos flit) pickUpSound Nothing
& soundFrom (CrSound cid) (_flItPos flit) pickUpS Nothing
& updateItLocation i
& floorItems %~ IM.delete (_flItID flit)
& creatures . ix cid . crInv . ix i %~ addItem it