Start implementing sticky grenades

This commit is contained in:
2025-01-01 17:03:10 +00:00
parent 356301fb61
commit e8fe4c2d72
16 changed files with 585 additions and 536 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -30,7 +30,7 @@ import RandomHelp
splinterBlock :: Block -> World -> World splinterBlock :: Block -> World -> World
splinterBlock bl w = splinterBlock bl w =
foldl' unshadowBlock w (_blShadows bl) -- foldr shiftTowardCen w (_blWallIDs bl) foldl' unshadowBlock w (_blShadows bl) -- foldr shiftTowardCen w (_blWallIDs bl)
& originsIDsAt & soundOriginsIDsAt
[MaterialSound bm 0, MaterialSound bm 1, MaterialSound bm 2] [MaterialSound bm 0, MaterialSound bm 1, MaterialSound bm 2]
(weakenMatS bm) (weakenMatS bm)
(_blPos bl) (_blPos bl)
+2 -2
View File
@@ -57,7 +57,7 @@ makeDebrisDirectedHeight mindist maxdist arcrad dir maxh bm col p w =
w w
& flip (foldl' (flip $ plNew (cWorld . lWorld . props) prID)) thedebris & flip (foldl' (flip $ plNew (cWorld . lWorld . props) prID)) thedebris
& randGen .~ newg & randGen .~ newg
& originsIDsAt [MaterialSound bm i | i <- [0, 1, 2]] (destroyMatS bm) p & soundOriginsIDsAt [MaterialSound bm i | i <- [0, 1, 2]] (destroyMatS bm) p
where where
dsize = debrisSize bm dsize = debrisSize bm
(thedebris, newg) = mapM f [10, 10 + dsize .. maxh + 5] & runState $ _randGen w (thedebris, newg) = mapM f [10, 10 + dsize .. maxh + 5] & runState $ _randGen w
@@ -90,7 +90,7 @@ makeDebrisDirected mindist maxdist arcrad dir bm col p w =
w w
& flip (foldl' (flip $ plNew (cWorld . lWorld . props) prID)) thedebris & flip (foldl' (flip $ plNew (cWorld . lWorld . props) prID)) thedebris
& randGen .~ newg & randGen .~ newg
& originsIDsAt [MaterialSound bm i | i <- [0, 1, 2]] (destroyMatS bm) p & soundOriginsIDsAt [MaterialSound bm i | i <- [0, 1, 2]] (destroyMatS bm) p
where where
(thedebris, newg) = mapM f [35, 55 .. 95] & runState $ _randGen w (thedebris, newg) = mapM f [35, 55 .. 95] & runState $ _randGen w
f h = do f h = do
+1
View File
@@ -261,6 +261,7 @@ inventoryX c = case c of
, megaShellMag , megaShellMag
, homingModule , homingModule
, gLauncher , gLauncher
, stickyMod
] ]
<> [shellModule p | p <- [minBound .. maxBound]] <> [shellModule p | p <- [minBound .. maxBound]]
'V' -> 'V' ->
+2
View File
@@ -32,6 +32,7 @@ data ComposeLinkType
| ProjectileStabiliserLink | ProjectileStabiliserLink
| UnderBarrelSlotLink | UnderBarrelSlotLink
| UnderBarrelPlatformLink | UnderBarrelPlatformLink
| GrenadeHitEffectLink
deriving (Eq, Ord, Show, Read) deriving (Eq, Ord, Show, Read)
data ItemStructuralFunction data ItemStructuralFunction
@@ -59,6 +60,7 @@ data ItemStructuralFunction
| FunctionChangeSF | FunctionChangeSF
| MakeAutoSF | MakeAutoSF
| ProjectileStabiliserSF | ProjectileStabiliserSF
| GrenadeHitEffectSF
deriving (Eq, Ord, Show, Read) deriving (Eq, Ord, Show, Read)
type ComposedItem = (Item, ItemStructuralFunction, LinkTest) type ComposedItem = (Item, ItemStructuralFunction, LinkTest)
+2
View File
@@ -51,6 +51,8 @@ data RocketHoming
data GrenadeHitEffect data GrenadeHitEffect
= GBounce {_bounceTolerance :: Float} = GBounce {_bounceTolerance :: Float}
| GStick | GStick
| GStuckCreature {_stuckCrID :: Int, _stuckCrOffset :: Point2}
| GStuckWall {_stuckWlID :: Int}
deriving (Show, Eq, Ord, Read) --Generic, Flat) deriving (Show, Eq, Ord, Read) --Generic, Flat)
data RocketSmoke data RocketSmoke
-1
View File
@@ -121,7 +121,6 @@ displaySectionsSizes 3 = 10
displaySectionsSizes _ = 3 displaySectionsSizes _ = 3
displayIndents :: Int -> Int displayIndents :: Int -> Int
--displayIndents (-3) = 2
displayIndents 0 = 2 displayIndents 0 = 2
displayIndents 3 = 2 displayIndents 3 = 2
displayIndents 5 = 2 displayIndents 5 = 2
+9 -1
View File
@@ -321,7 +321,7 @@ useLoadedAmmo itmtree cr (cme, w) (mzid, Just (mz, x, magtree)) = (,) (cme & cme
MuzzleRLauncher -> createProjectileR itmtree magtree mz cr w MuzzleRLauncher -> createProjectileR itmtree magtree mz cr w
MuzzleGLauncher -> MuzzleGLauncher ->
createProjectile createProjectile
(Grenade (GBounce 2)) (Grenade (getGrenadeHitEffect itmtree))
magtree magtree
(getPJStabiliser itmtree) (getPJStabiliser itmtree)
mz mz
@@ -668,6 +668,14 @@ getPJStabiliser ldt = case lookup ProjectileStabiliserLink (ldt ^. ldtRight) of
_ -> Nothing _ -> Nothing
_ -> Nothing _ -> Nothing
getGrenadeHitEffect :: LabelDoubleTree ComposeLinkType Item -> GrenadeHitEffect
getGrenadeHitEffect t = case lookup GrenadeHitEffectLink (t ^. ldtRight) of
Just ldt' -> case ldt' ^? ldtValue . itType of
Just STICKYMOD -> GStick
_ -> GBounce 2
_ -> GBounce 2
createProjectile :: createProjectile ::
ProjectileType -> ProjectileType ->
LabelDoubleTree ComposeLinkType Item -> LabelDoubleTree ComposeLinkType Item ->
+2 -1
View File
@@ -110,7 +110,7 @@ getAutoSpringLinks itm = case itm ^? itUse . heldTriggerType of
extraWeaponLinks :: Item -> [(ItemStructuralFunction, ComposeLinkType)] extraWeaponLinks :: Item -> [(ItemStructuralFunction, ComposeLinkType)]
extraWeaponLinks itm = case itm ^. itType of extraWeaponLinks itm = case itm ^. itType of
HELD GLAUNCHER -> launcherlinks HELD GLAUNCHER -> launcherlinks <> [(GrenadeHitEffectSF,GrenadeHitEffectLink)]
HELD RLAUNCHER -> launcherlinks HELD RLAUNCHER -> launcherlinks
HELD RLAUNCHERX{} -> launcherlinks HELD RLAUNCHERX{} -> launcherlinks
_ -> [] _ -> []
@@ -163,6 +163,7 @@ structureToPotentialFunction ::
LabelDoubleTree ItemLink ComposedItem -> LabelDoubleTree ItemLink ComposedItem ->
S.Set ItemStructuralFunction S.Set ItemStructuralFunction
structureToPotentialFunction ldt = case ldt ^. ldtValue . _1 . itType of structureToPotentialFunction ldt = case ldt ^. ldtValue . _1 . itType of
STICKYMOD -> S.singleton GrenadeHitEffectSF
ATTACH GIMBAL -> S.singleton ProjectileStabiliserSF ATTACH GIMBAL -> S.singleton ProjectileStabiliserSF
ATTACH GYROSCOPE -> S.singleton ProjectileStabiliserSF ATTACH GYROSCOPE -> S.singleton ProjectileStabiliserSF
HELD GLAUNCHER -> S.singleton UnderBarrelPlatformSF HELD GLAUNCHER -> S.singleton UnderBarrelPlatformSF
+1
View File
@@ -8,6 +8,7 @@ import Dodge.Data.ComposedItem
itemInvColor :: ComposedItem -> Color itemInvColor :: ComposedItem -> Color
itemInvColor ci = case ci ^. _2 of itemInvColor ci = case ci ^. _2 of
GrenadeHitEffectSF -> yellow
IntroScanSF -> white IntroScanSF -> white
UnloadedWeaponSF -> mixColorsLinear 0.5 0.5 red white UnloadedWeaponSF -> mixColorsLinear 0.5 0.5 red white
HeldPlatformSF -> white HeldPlatformSF -> white
+1 -1
View File
@@ -21,7 +21,7 @@ updateLampoid cr w = case cr ^?! crType . lampLSID of
-- & cWorld . lWorld . tempLightSources .:~ tlsTimeRadFunPos 20 150 (TLSFade 1 10) (addZ 20 cpos) -- & cWorld . lWorld . tempLightSources .:~ tlsTimeRadFunPos 20 150 (TLSFade 1 10) (addZ 20 cpos)
& cWorld . lWorld . worldEvents .:~ MakeTempLight & cWorld . lWorld . worldEvents .:~ MakeTempLight
(LSParam (addZ 20 cpos) 150 1) 20 (LSParam (addZ 20 cpos) 150 1) 20
& originsIDsAt [MaterialSound Glass n | n <- [0, 1, 2]] (destroyMatS Glass) cpos & soundOriginsIDsAt [MaterialSound Glass n | n <- [0, 1, 2]] (destroyMatS Glass) cpos
& cWorld . lWorld . lightSources . at i .~ Nothing & cWorld . lWorld . lightSources . at i .~ Nothing
& cWorld . lWorld . creatures . at cid .~ Nothing & cWorld . lWorld . creatures . at cid .~ Nothing
| otherwise -> | otherwise ->
+1 -1
View File
@@ -34,7 +34,7 @@ destroyLS lsid w =
w w
& cWorld . lWorld . lightSources . at lsid .~ Nothing & cWorld . lWorld . lightSources . at lsid .~ Nothing
& destroyLSFlashAt p3 & destroyLSFlashAt p3
& originsIDsAt [MaterialSound Glass n | n <- [0, 1, 2]] (destroyMatS Glass) (xyV3 p3) & soundOriginsIDsAt [MaterialSound Glass n | n <- [0, 1, 2]] (destroyMatS Glass) (xyV3 p3)
where where
ls = w ^?! cWorld . lWorld . lightSources . ix lsid -- unsafe ls = w ^?! cWorld . lWorld . lightSources . ix lsid -- unsafe
p3 = _lsPos $ _lsParam ls p3 = _lsPos $ _lsParam ls
+25 -13
View File
@@ -14,6 +14,7 @@ import Dodge.Movement.Turn
import Dodge.Payload import Dodge.Payload
import Dodge.SoundLogic import Dodge.SoundLogic
import Dodge.WorldEvent.Cloud import Dodge.WorldEvent.Cloud
import Dodge.WorldEvent.Sound
import Dodge.WorldEvent.ThingsHit import Dodge.WorldEvent.ThingsHit
import Geometry import Geometry
import qualified IntMapHelp as IM import qualified IntMapHelp as IM
@@ -23,8 +24,9 @@ import RandomHelp
updateProjectile :: Projectile -> World -> World updateProjectile :: Projectile -> World -> World
updateProjectile pj w = updateProjectile pj w =
(cWorld . lWorld . projectiles . ix (pj ^. pjID) %~ ( cWorld . lWorld . projectiles . ix (pj ^. pjID)
decTimMvVel) %~ decTimMvVel
)
. shellCollisionCheck . shellCollisionCheck
pj pj
$ foldl' (flip $ upProjectile pj) w (_pjUpdates pj) $ foldl' (flip $ upProjectile pj) w (_pjUpdates pj)
@@ -83,10 +85,10 @@ shellCollisionCheck pj w
| RetiredProjectile <- pj ^. pjType | RetiredProjectile <- pj ^. pjType
, time <= 0 = , time <= 0 =
destroyProjectile (pj ^. pjScreenID) (_pjID pj) w destroyProjectile (pj ^. pjScreenID) (_pjID pj) w
| time <= 0 = g
| RetiredProjectile <- pj ^. pjType = w | RetiredProjectile <- pj ^. pjType = w
| Just thit <- thingHit oldPos (oldPos + _pjVel pj) w = tryShellBounce thit pj w | Just thit <- thingHit oldPos (oldPos + _pjVel pj) w = tryShellBounce thit pj w
-- | anythingHitCirc 2 oldPos (oldPos + _pjVel pj) w = g -- | anythingHitCirc 2 oldPos (oldPos + _pjVel pj) w = g
| time <= 0 = g
| otherwise = w | otherwise = w
where where
g = explodeShell pj w g = explodeShell pj w
@@ -97,12 +99,20 @@ shellCollisionCheck pj w
-- bouncing in some way -- bouncing in some way
tryShellBounce :: (Point2, Either Creature Wall) -> Projectile -> World -> World tryShellBounce :: (Point2, Either Creature Wall) -> Projectile -> World -> World
tryShellBounce (p, Right wl) pj w tryShellBounce (p, Right wl) pj w
| Just GStick <- pj ^? pjType . gnHitEffect = w | Just GStuckWall{} <- pj ^? pjType . gnHitEffect = w
| Just GStick <- pj ^? pjType . gnHitEffect =
w & cWorld . lWorld . projectiles . ix (_pjID pj) . pjType .~ Grenade
(GStuckWall (wl ^. wlID))
& cWorld . lWorld . projectiles . ix (_pjID pj) . pjUpdates %~ delete ApplyGravityPU
& soundOriginIDsAt (ShellSound (pj ^. pjID)) [slapS, slap1S] (pj ^. pjPos)
| Just x <- pj ^? pjType . gnHitEffect . bounceTolerance = | Just x <- pj ^? pjType . gnHitEffect . bounceTolerance =
if abs (dotV (pj ^. pjVel) (vNormal hitline)) < x if abs (dotV (pj ^. pjVel) (vNormal hitline)) < x
then w & cWorld . lWorld . projectiles . ix (_pjID pj) . pjVel %~ reflectIn then
hitline w
& cWorld . lWorld . projectiles . ix (_pjID pj) . pjPos .~ p & cWorld . lWorld . projectiles . ix (_pjID pj) . pjVel
%~ reflectIn
hitline
& cWorld . lWorld . projectiles . ix (_pjID pj) . pjPos .~ p
& soundStart (ShellSound (pj ^. pjID)) (pj ^. pjPos) click1S Nothing & soundStart (ShellSound (pj ^. pjID)) (pj ^. pjPos) click1S Nothing
else explodeShell pj w else explodeShell pj w
where where
@@ -180,12 +190,14 @@ pjRemoteSetDirection ph pj w = case ph of
lw = w ^. cWorld . lWorld lw = w ^. cWorld . lWorld
decTimMvVel :: Projectile -> Projectile decTimMvVel :: Projectile -> Projectile
decTimMvVel pj = pj decTimMvVel pj
& pjSpin *~ 0.99 | Just GStuckWall{} <- pj ^? pjType . gnHitEffect = pj & pjTimer -~ 1
& pjTimer -~ 1 | otherwise =
& pjPos +~ _pjVel pj pj
& pjDir +~ _pjSpin pj & pjSpin *~ 0.99
& pjTimer -~ 1
& pjPos +~ _pjVel pj
& pjDir +~ _pjSpin pj
explodeShell :: explodeShell ::
Projectile -> Projectile ->
+143 -133
View File
@@ -1,4 +1,4 @@
-- generated at 2024-11-03 10:36:18.238246608 UTC -- generated at 2025-01-01 16:37:43.706494172 UTC
module Dodge.SoundLogic.ExternallyGeneratedSounds where module Dodge.SoundLogic.ExternallyGeneratedSounds where
import Sound.Data import Sound.Data
soundToVol :: SoundID -> Float soundToVol :: SoundID -> Float
@@ -61,53 +61,55 @@ soundToVol v = case _getSoundID v of
55 -> 40 55 -> 40
56 -> 300 56 -> 300
57 -> 300 57 -> 300
58 -> 2000 58 -> 100
59 -> 1000 59 -> 2000
60 -> 1000 60 -> 1000
61 -> 1000 61 -> 1000
62 -> 1000 62 -> 1000
63 -> 1000 63 -> 1000
64 -> 40 64 -> 1000
65 -> 50 65 -> 40
66 -> 1000 66 -> 50
67 -> 500 67 -> 1000
68 -> 500 68 -> 500
69 -> 100 69 -> 500
70 -> 1000 70 -> 100
71 -> 20 71 -> 1000
72 -> 500 72 -> 20
73 -> 300 73 -> 500
74 -> 200 74 -> 300
75 -> 500 75 -> 200
76 -> 1000 76 -> 500
77 -> 200 77 -> 1000
78 -> 1000 78 -> 200
79 -> 2000 79 -> 1000
80 -> 500 80 -> 2000
81 -> 100 81 -> 500
82 -> 1000 82 -> 100
83 -> 2000 83 -> 1000
84 -> 2000 84 -> 2000
85 -> 500 85 -> 2000
86 -> 2000 86 -> 100
87 -> 100 87 -> 500
88 -> 300 88 -> 2000
89 -> 1000 89 -> 100
90 -> 200 90 -> 300
91 -> 100 91 -> 1000
92 -> 1000 92 -> 200
93 -> 2000 93 -> 100
94 -> 1000 94 -> 1000
95 -> 100 95 -> 2000
96 -> 200 96 -> 1000
97 -> 500 97 -> 100
98 -> 100 98 -> 200
99 -> 2000 99 -> 500
100 -> 2000 100 -> 100
101 -> 2000 101 -> 2000
102 -> 200 102 -> 2000
103 -> 100 103 -> 2000
104 -> 200 104 -> 200
105 -> 100
106 -> 200
_ -> 50 _ -> 50
soundToOnomato :: SoundID -> String soundToOnomato :: SoundID -> String
soundToOnomato v = case _getSoundID v of soundToOnomato v = case _getSoundID v of
@@ -169,53 +171,55 @@ soundToOnomato v = case _getSoundID v of
55 -> "TIPTAP" 55 -> "TIPTAP"
56 -> "TNKTNKTNK" 56 -> "TNKTNKTNK"
57 -> "CHPCHPCHP" 57 -> "CHPCHPCHP"
58 -> "SCREE" 58 -> "SLP"
59 -> "DHDHL" 59 -> "SCREE"
60 -> "BRAP" 60 -> "DHDHL"
61 -> "CRSK" 61 -> "BRAP"
62 -> "CRNKL" 62 -> "CRSK"
63 -> "TRNKL" 63 -> "CRNKL"
64 -> "TAPP" 64 -> "TRNKL"
65 -> "SHUHP" 65 -> "TAPP"
66 -> "CRUMBL" 66 -> "SHUHP"
67 -> "DEDEDUM" 67 -> "CRUMBL"
68 -> "TAK" 68 -> "DEDEDUM"
69 -> "SPLRT" 69 -> "TAK"
70 -> "CRISH" 70 -> "SPLRT"
71 -> "SWSH" 71 -> "CRISH"
72 -> "BIPBIPBIP" 72 -> "SWSH"
73 -> "BEP" 73 -> "BIPBIPBIP"
74 -> "CRSKRL" 74 -> "BEP"
75 -> "KRTNKL" 75 -> "CRSKRL"
76 -> "CRSNK" 76 -> "KRTNKL"
77 -> "SHTCK" 77 -> "CRSNK"
78 -> "TTRKL" 78 -> "SHTCK"
79 -> "UGGAUGGA" 79 -> "TTRKL"
80 -> "DUDURAH" 80 -> "UGGAUGGA"
81 -> "KKSQWL" 81 -> "DUDURAH"
82 -> "CRMPL" 82 -> "KKSQWL"
83 -> "CHUGUGUG" 83 -> "CRMPL"
84 -> "BANG" 84 -> "CHUGUGUG"
85 -> "DEDA" 85 -> "BANG"
86 -> "WHSSH" 86 -> "SLPP"
87 -> "HNH" 87 -> "DEDA"
88 -> "BWAH" 88 -> "WHSSH"
89 -> "CRUNK" 89 -> "HNH"
90 -> "SQWLTCH" 90 -> "BWAH"
91 -> "DRR" 91 -> "CRUNK"
92 -> "TRNKL" 92 -> "SQWLTCH"
93 -> "BRAP" 93 -> "DRR"
94 -> "BLPCHCH" 94 -> "TRNKL"
95 -> "SKLE" 95 -> "BRAP"
96 -> "ZMM" 96 -> "BLPCHCH"
97 -> "WRRR" 97 -> "SKLE"
98 -> "FWUMP" 98 -> "ZMM"
99 -> "BRAHCHCH" 99 -> "WRRR"
100 -> "BRPBRPBRP" 100 -> "FWUMP"
101 -> "WE-OH" 101 -> "BRAHCHCH"
102 -> "THCK" 102 -> "BRPBRPBRP"
103 -> "FHP" 103 -> "WE-OH"
104 -> "QWLPH" 104 -> "THCK"
105 -> "FHP"
106 -> "QWLPH"
_ -> error "unitialised sound" _ -> error "unitialised sound"
soundPathList :: [String] soundPathList :: [String]
soundPathList = soundPathList =
@@ -277,6 +281,7 @@ soundPathList =
, "twoStep.TIPTAP.40.wav" , "twoStep.TIPTAP.40.wav"
, "reload.TNKTNKTNK.300.wav" , "reload.TNKTNKTNK.300.wav"
, "reload1.CHPCHPCHP.300.wav" , "reload1.CHPCHPCHP.300.wav"
, "slap.SLP.100.wav"
, "tone440sawtooth.SCREE.2000.wav" , "tone440sawtooth.SCREE.2000.wav"
, "metal3.DHDHL.1000.wav" , "metal3.DHDHL.1000.wav"
, "tap3.BRAP.1000.wav" , "tap3.BRAP.1000.wav"
@@ -304,6 +309,7 @@ soundPathList =
, "stone2.CRMPL.1000.wav" , "stone2.CRMPL.1000.wav"
, "seagullChatter1.CHUGUGUG.2000.wav" , "seagullChatter1.CHUGUGUG.2000.wav"
, "bang.BANG.2000.wav" , "bang.BANG.2000.wav"
, "slap1.SLPP.100.wav"
, "deda.DEDA.500.wav" , "deda.DEDA.500.wav"
, "missileLaunch.WHSSH.2000.wav" , "missileLaunch.WHSSH.2000.wav"
, "grunt.HNH.100.wav" , "grunt.HNH.100.wav"
@@ -441,97 +447,101 @@ reloadS :: SoundID
reloadS = SoundID 56 reloadS = SoundID 56
reload1S :: SoundID reload1S :: SoundID
reload1S = SoundID 57 reload1S = SoundID 57
slapS :: SoundID
slapS = SoundID 58
tone440sawtoothS :: SoundID tone440sawtoothS :: SoundID
tone440sawtoothS = SoundID 58 tone440sawtoothS = SoundID 59
metal3S :: SoundID metal3S :: SoundID
metal3S = SoundID 59 metal3S = SoundID 60
tap3S :: SoundID tap3S :: SoundID
tap3S = SoundID 60 tap3S = SoundID 61
glassShat4S :: SoundID glassShat4S :: SoundID
glassShat4S = SoundID 61 glassShat4S = SoundID 62
glassShat2S :: SoundID glassShat2S :: SoundID
glassShat2S = SoundID 62 glassShat2S = SoundID 63
metal1S :: SoundID metal1S :: SoundID
metal1S = SoundID 63 metal1S = SoundID 64
foot3S :: SoundID foot3S :: SoundID
foot3S = SoundID 64 foot3S = SoundID 65
pickUpS :: SoundID pickUpS :: SoundID
pickUpS = SoundID 65 pickUpS = SoundID 66
stone5S :: SoundID stone5S :: SoundID
stone5S = SoundID 66 stone5S = SoundID 67
dededumS :: SoundID dededumS :: SoundID
dededumS = SoundID 67 dededumS = SoundID 68
tap1S :: SoundID tap1S :: SoundID
tap1S = SoundID 68 tap1S = SoundID 69
blood1S :: SoundID blood1S :: SoundID
blood1S = SoundID 69 blood1S = SoundID 70
metal4S :: SoundID metal4S :: SoundID
metal4S = SoundID 70 metal4S = SoundID 71
knifeS :: SoundID knifeS :: SoundID
knifeS = SoundID 71 knifeS = SoundID 72
computerBeepingS :: SoundID computerBeepingS :: SoundID
computerBeepingS = SoundID 72 computerBeepingS = SoundID 73
tone440S :: SoundID tone440S :: SoundID
tone440S = SoundID 73 tone440S = SoundID 74
gut6S :: SoundID gut6S :: SoundID
gut6S = SoundID 74 gut6S = SoundID 75
smallGlass2S :: SoundID smallGlass2S :: SoundID
smallGlass2S = SoundID 75 smallGlass2S = SoundID 76
glassShat1S :: SoundID glassShat1S :: SoundID
glassShat1S = SoundID 76 glassShat1S = SoundID 77
disconnectItemS :: SoundID disconnectItemS :: SoundID
disconnectItemS = SoundID 77 disconnectItemS = SoundID 78
metal5S :: SoundID metal5S :: SoundID
metal5S = SoundID 78 metal5S = SoundID 79
seagullBarkTransformedS :: SoundID seagullBarkTransformedS :: SoundID
seagullBarkTransformedS = SoundID 79 seagullBarkTransformedS = SoundID 80
ejectS :: SoundID ejectS :: SoundID
ejectS = SoundID 80 ejectS = SoundID 81
blood3S :: SoundID blood3S :: SoundID
blood3S = SoundID 81 blood3S = SoundID 82
stone2S :: SoundID stone2S :: SoundID
stone2S = SoundID 82 stone2S = SoundID 83
seagullChatter1S :: SoundID seagullChatter1S :: SoundID
seagullChatter1S = SoundID 83 seagullChatter1S = SoundID 84
bangS :: SoundID bangS :: SoundID
bangS = SoundID 84 bangS = SoundID 85
slap1S :: SoundID
slap1S = SoundID 86
dedaS :: SoundID dedaS :: SoundID
dedaS = SoundID 85 dedaS = SoundID 87
missileLaunchS :: SoundID missileLaunchS :: SoundID
missileLaunchS = SoundID 86 missileLaunchS = SoundID 88
gruntS :: SoundID gruntS :: SoundID
gruntS = SoundID 87 gruntS = SoundID 89
sineRaisePitchOneSecS :: SoundID sineRaisePitchOneSecS :: SoundID
sineRaisePitchOneSecS = SoundID 88 sineRaisePitchOneSecS = SoundID 90
metal2S :: SoundID metal2S :: SoundID
metal2S = SoundID 89 metal2S = SoundID 91
gut5S :: SoundID gut5S :: SoundID
gut5S = SoundID 90 gut5S = SoundID 92
slideDoorS :: SoundID slideDoorS :: SoundID
slideDoorS = SoundID 91 slideDoorS = SoundID 93
metal6S :: SoundID metal6S :: SoundID
metal6S = SoundID 92 metal6S = SoundID 94
autoGunS :: SoundID autoGunS :: SoundID
autoGunS = SoundID 93 autoGunS = SoundID 95
oldMachineBootS :: SoundID oldMachineBootS :: SoundID
oldMachineBootS = SoundID 94 oldMachineBootS = SoundID 96
blood6S :: SoundID blood6S :: SoundID
blood6S = SoundID 95 blood6S = SoundID 97
buzzS :: SoundID buzzS :: SoundID
buzzS = SoundID 96 buzzS = SoundID 98
fireLoudS :: SoundID fireLoudS :: SoundID
fireLoudS = SoundID 97 fireLoudS = SoundID 99
tap4S :: SoundID tap4S :: SoundID
tap4S = SoundID 98 tap4S = SoundID 100
shotgunS :: SoundID shotgunS :: SoundID
shotgunS = SoundID 99 shotgunS = SoundID 101
miniS :: SoundID miniS :: SoundID
miniS = SoundID 100 miniS = SoundID 102
seagullWhistleS :: SoundID seagullWhistleS :: SoundID
seagullWhistleS = SoundID 101 seagullWhistleS = SoundID 103
connectItemS :: SoundID connectItemS :: SoundID
connectItemS = SoundID 102 connectItemS = SoundID 104
whiteNoiseFadeInS :: SoundID whiteNoiseFadeInS :: SoundID
whiteNoiseFadeInS = SoundID 103 whiteNoiseFadeInS = SoundID 105
gut1S :: SoundID gut1S :: SoundID
gut1S = SoundID 104 gut1S = SoundID 106
+6 -6
View File
@@ -1,6 +1,6 @@
module Dodge.WorldEvent.Sound ( module Dodge.WorldEvent.Sound (
originIDsAt, soundOriginIDsAt,
originsIDsAt, soundOriginsIDsAt,
) where ) where
import Control.Lens import Control.Lens
@@ -10,12 +10,12 @@ import Geometry.Data
import RandomHelp import RandomHelp
import Sound.Data import Sound.Data
originsIDsAt :: [SoundOrigin] -> [SoundID] -> Point2 -> World -> World soundOriginsIDsAt :: [SoundOrigin] -> [SoundID] -> Point2 -> World -> World
originsIDsAt sos sids p w = soundMultiFrom sos p sid Nothing $ set randGen g w soundOriginsIDsAt sos sids p w = soundMultiFrom sos p sid Nothing $ set randGen g w
where where
(sid, g) = _randGen w & runState (takeOne sids) (sid, g) = _randGen w & runState (takeOne sids)
originIDsAt :: SoundOrigin -> [SoundID] -> Point2 -> World -> World soundOriginIDsAt :: SoundOrigin -> [SoundID] -> Point2 -> World -> World
originIDsAt so sids p w = soundStart so p sid Nothing $ set randGen g w soundOriginIDsAt so sids p w = soundStart so p sid Nothing $ set randGen g w
where where
(sid, g) = _randGen w & runState (takeOne sids) (sid, g) = _randGen w & runState (takeOne sids)
+388 -375
View File
File diff suppressed because it is too large Load Diff