Refactor sounds

This commit is contained in:
2021-09-09 14:58:07 +01:00
parent be7b2d2cd7
commit 70c97f5367
26 changed files with 113 additions and 162 deletions
+7 -4
View File
@@ -165,7 +165,8 @@ blinkAction
:: Creature
-> World
-> World
blinkAction cr w = soundOnce teleSound
blinkAction cr w
= soundMultiFrom [TeleSound 0,TeleSound 1] p3 teleSound Nothing
. over radDistortion (distortionBulge ++)
. set (creatures . ix cid . crPos) p3
. blinkShockwave cid p3
@@ -195,9 +196,11 @@ youDropItem :: World -> World
youDropItem w = case yourItem w of
NoItem -> w
_ -> rmSelectedInvItem (_yourID w)
. copyItemToFloor (you w) (_crInvSel $ you w)
$ soundOnce putDownSound
. copyItemToFloor (you w) (_crInvSel cr)
$ soundFrom (CrSound (_crID cr)) (_crPos cr) putDownSound Nothing
w
where
cr = you w
{- | Copy an inventory item to the floor. -}
copyItemToFloor
:: Creature
@@ -229,7 +232,7 @@ pickUpItem
pickUpItem cid flit w = case maybeInvSlot of
Nothing -> w
Just i -> w
& soundOnce pickUpSound
& soundFrom (CrSound cid) (_flItPos flit) pickUpSound Nothing
& updateItLocation i
& floorItems %~ IM.delete (_flItID flit)
& creatures . ix cid . crInv . ix i %~ addItem it