Refactor sounds
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user