Change crab footstep sound

This commit is contained in:
2026-04-10 12:40:36 +01:00
parent f19e165571
commit 95a6c90d01
6 changed files with 257 additions and 250 deletions
Binary file not shown.
Binary file not shown.
+2 -5
View File
@@ -39,16 +39,13 @@ drawDamSensor ::
M.Map SensorType (PaletteColor, DecorationShape) -> M.Map SensorType (PaletteColor, DecorationShape) ->
DamageSensor -> DamageSensor ->
SPic SPic
drawDamSensor gp sens = fold $ do drawDamSensor gp sens = foldMap sensorSPic $ gp ^? ix (sens ^. sensType)
let st = sens ^. sensType
x <- gp ^? ix st
return $ sensorSPic x
terminalSPic :: LWorld -> Machine -> SPic terminalSPic :: LWorld -> Machine -> SPic
terminalSPic lw = noPic . terminalShape lw terminalSPic lw = noPic . terminalShape lw
terminalShape :: LWorld -> Machine -> Shape terminalShape :: LWorld -> Machine -> Shape
terminalShape lw mc = fromMaybe mempty $ do terminalShape lw mc = fold $ do
tid <- mc ^? mcMounts . ix OTTerminal tid <- mc ^? mcMounts . ix OTTerminal
term <- lw ^? terminals . ix tid term <- lw ^? terminals . ix tid
return $ return $
+250 -240
View File
@@ -1,4 +1,4 @@
-- generated at 2026-04-03 15:24:55.064035871 UTC -- generated at 2026-04-10 11:38:00.904778995 UTC
module Dodge.SoundLogic.ExternallyGeneratedSounds where module Dodge.SoundLogic.ExternallyGeneratedSounds where
import Sound.Data import Sound.Data
soundToVol :: SoundID -> Float soundToVol :: SoundID -> Float
@@ -90,89 +90,91 @@ soundToVol v = case _getSoundID v of
84 -> 200 84 -> 200
85 -> 1000 85 -> 1000
86 -> 1000 86 -> 1000
87 -> 250 87 -> 50
88 -> 300 88 -> 250
89 -> 2000 89 -> 300
90 -> 200 90 -> 2000
91 -> 1000 91 -> 200
92 -> 100 92 -> 1000
93 -> 300 93 -> 100
94 -> 100 94 -> 300
95 -> 40 95 -> 100
96 -> 1000 96 -> 40
97 -> 100 97 -> 1000
98 -> 1000 98 -> 100
99 -> 500 99 -> 1000
100 -> 100 100 -> 500
101 -> 200 101 -> 100
102 -> 250 102 -> 200
103 -> 200 103 -> 250
104 -> 200 104 -> 200
105 -> 50 105 -> 200
106 -> 1000 106 -> 50
107 -> 50 107 -> 1000
108 -> 500 108 -> 50
109 -> 500 109 -> 500
110 -> 1000 110 -> 500
111 -> 200 111 -> 1000
112 -> 2000 112 -> 200
113 -> 20 113 -> 2000
114 -> 500 114 -> 20
115 -> 200 115 -> 500
116 -> 100 116 -> 200
117 -> 2000 117 -> 100
118 -> 100 118 -> 50
119 -> 100 119 -> 2000
120 -> 200 120 -> 100
121 -> 300 121 -> 100
122 -> 500 122 -> 200
123 -> 100 123 -> 300
124 -> 300 124 -> 500
125 -> 200 125 -> 100
126 -> 1000 126 -> 300
127 -> 100 127 -> 200
128 -> 50 128 -> 1000
129 -> 100 129 -> 100
130 -> 100 130 -> 50
131 -> 50 131 -> 100
132 -> 1000 132 -> 100
133 -> 500 133 -> 50
134 -> 40 134 -> 1000
135 -> 100 135 -> 500
136 -> 200 136 -> 40
137 -> 500 137 -> 100
138 -> 1000 138 -> 200
139 -> 300 139 -> 500
140 -> 100 140 -> 1000
141 -> 300 141 -> 300
142 -> 300 142 -> 100
143 -> 100 143 -> 300
144 -> 100 144 -> 300
145 -> 500 145 -> 100
146 -> 100 146 -> 100
147 -> 100 147 -> 500
148 -> 500 148 -> 100
149 -> 100 149 -> 100
150 -> 100 150 -> 500
151 -> 500 151 -> 100
152 -> 40 152 -> 100
153 -> 200 153 -> 500
154 -> 50 154 -> 40
155 -> 500 155 -> 200
156 -> 2000 156 -> 50
157 -> 200 157 -> 500
158 -> 2000 158 -> 2000
159 -> 40 159 -> 200
160 -> 100 160 -> 2000
161 -> 100 161 -> 40
162 -> 500 162 -> 100
163 -> 100 163 -> 100
164 -> 1000 164 -> 500
165 -> 100 165 -> 100
166 -> 500 166 -> 1000
167 -> 8000 167 -> 100
168 -> 200 168 -> 500
169 -> 300 169 -> 8000
170 -> 200
171 -> 300
_ -> 50 _ -> 50
soundToOnomato :: SoundID -> String soundToOnomato :: SoundID -> String
soundToOnomato v = case _getSoundID v of soundToOnomato v = case _getSoundID v of
@@ -263,89 +265,91 @@ soundToOnomato v = case _getSoundID v of
84 -> "SQWCH" 84 -> "SQWCH"
85 -> "TRWNG" 85 -> "TRWNG"
86 -> "CRSK" 86 -> "CRSK"
87 -> "DMP" 87 -> "CLK"
88 -> "BEP" 88 -> "DMP"
89 -> "BOOM" 89 -> "BEP"
90 -> "SKREL" 90 -> "BOOM"
91 -> "CRSNK" 91 -> "SKREL"
92 -> "SLP" 92 -> "CRSNK"
93 -> "CHPCHPCHP" 93 -> "SLP"
94 -> "SLP" 94 -> "CHPCHPCHP"
95 -> "TAP" 95 -> "SLP"
96 -> "CRNKL" 96 -> "TAP"
97 -> "WRR" 97 -> "CRNKL"
98 -> "CRNK" 98 -> "WRR"
99 -> "CUHRUP" 99 -> "CRNK"
100 -> "SPLRT" 100 -> "CUHRUP"
101 -> "TING" 101 -> "SPLRT"
102 -> "WHRHH" 102 -> "TING"
103 -> "CRSKRL" 103 -> "WHRHH"
104 -> "WH" 104 -> "CRSKRL"
105 -> "FHFH" 105 -> "WH"
106 -> "BRAP" 106 -> "FHFH"
107 -> "WHHH" 107 -> "BRAP"
108 -> "PLH" 108 -> "WHHH"
109 -> "CLANG" 109 -> "PLH"
110 -> "CRUNK" 110 -> "CLANG"
111 -> "TING" 111 -> "CRUNK"
112 -> "TATATA" 112 -> "TING"
113 -> "SWSH" 113 -> "TATATA"
114 -> "DNDNDNDN" 114 -> "SWSH"
115 -> "THCK" 115 -> "DNDNDNDN"
116 -> "SLP" 116 -> "THCK"
117 -> "PEW" 117 -> "SLP"
118 -> "SKLE" 118 -> "CLK"
119 -> "THUD" 119 -> "PEW"
120 -> "WH" 120 -> "SKLE"
121 -> "BWAH" 121 -> "THUD"
122 -> "DEDEDUM" 122 -> "WH"
123 -> "WHUMWHUM" 123 -> "BWAH"
124 -> "WHRP" 124 -> "DEDEDUM"
125 -> "TING" 125 -> "WHUMWHUM"
126 -> "CRMPL" 126 -> "WHRP"
127 -> "SKLE" 127 -> "TING"
128 -> "SHUHP" 128 -> "CRMPL"
129 -> "SLP" 129 -> "SKLE"
130 -> "SPRT" 130 -> "SHUHP"
131 -> "HSS" 131 -> "SLP"
132 -> "TRNKL" 132 -> "SPRT"
133 -> "TAK" 133 -> "HSS"
134 -> "CLICK" 134 -> "TRNKL"
135 -> "DUHDEH" 135 -> "TAK"
136 -> "SHTCK" 136 -> "CLICK"
137 -> "DEDUM" 137 -> "DUHDEH"
138 -> "BWMP" 138 -> "SHTCK"
139 -> "BWAAH" 139 -> "DEDUM"
140 -> "SLP" 140 -> "BWMP"
141 -> "DWAAH" 141 -> "BWAAH"
142 -> "TNKTONK" 142 -> "SLP"
143 -> "VFVFVF" 143 -> "DWAAH"
144 -> "SLP" 144 -> "TNKTONK"
145 -> "CRTINK" 145 -> "VFVFVF"
146 -> "VHHP" 146 -> "SLP"
147 -> "SPRT" 147 -> "CRTINK"
148 -> "PRUM" 148 -> "VHHP"
149 -> "SLPP" 149 -> "SPRT"
150 -> "FWUMP" 150 -> "PRUM"
151 -> "CLANG" 151 -> "SLPP"
152 -> "TIP" 152 -> "FWUMP"
153 -> "CRAKLE" 153 -> "CLANG"
154 -> "HSSS" 154 -> "TIP"
155 -> "TRINKL" 155 -> "CRAKLE"
156 -> "BANG" 156 -> "HSSS"
157 -> "ZMM" 157 -> "TRINKL"
158 -> "CHUGUGUG" 158 -> "BANG"
159 -> "TAPP" 159 -> "ZMM"
160 -> "KKSQWL" 160 -> "CHUGUGUG"
161 -> "SKWLL" 161 -> "TAPP"
162 -> "DUDURAH" 162 -> "KKSQWL"
163 -> "SKWLL" 163 -> "SKWLL"
164 -> "TRNKL" 164 -> "DUDURAH"
165 -> "SLP" 165 -> "SKWLL"
166 -> "WHUAWUH" 166 -> "TRNKL"
167 -> "RINGGG" 167 -> "SLP"
168 -> "QWLPH" 168 -> "WHUAWUH"
169 -> "WRRR" 169 -> "RINGGG"
170 -> "QWLPH"
171 -> "WRRR"
_ -> error "unitialised sound" _ -> error "unitialised sound"
soundPathList :: [String] soundPathList :: [String]
soundPathList = soundPathList =
@@ -436,6 +440,7 @@ soundPathList =
, "gut3.SQWCH.200.wav" , "gut3.SQWCH.200.wav"
, "metal7.TRWNG.1000.wav" , "metal7.TRWNG.1000.wav"
, "glassShat4.CRSK.1000.wav" , "glassShat4.CRSK.1000.wav"
, "footPin1.CLK.50.wav"
, "energyRelease.DMP.250.wav" , "energyRelease.DMP.250.wav"
, "tone440.BEP.300.wav" , "tone440.BEP.300.wav"
, "explosion.BOOM.2000.wav" , "explosion.BOOM.2000.wav"
@@ -466,6 +471,7 @@ soundPathList =
, "combine.DNDNDNDN.500.wav" , "combine.DNDNDNDN.500.wav"
, "connectItem.THCK.200.wav" , "connectItem.THCK.200.wav"
, "slapClean7.SLP.100.wav" , "slapClean7.SLP.100.wav"
, "footPin2.CLK.50.wav"
, "seagullWhistle1.PEW.2000.wav" , "seagullWhistle1.PEW.2000.wav"
, "bloodShort6.SKLE.100.wav" , "bloodShort6.SKLE.100.wav"
, "hit.THUD.100.wav" , "hit.THUD.100.wav"
@@ -694,169 +700,173 @@ metal7S :: SoundID
metal7S = SoundID 85 metal7S = SoundID 85
glassShat4S :: SoundID glassShat4S :: SoundID
glassShat4S = SoundID 86 glassShat4S = SoundID 86
footPin1S :: SoundID
footPin1S = SoundID 87
energyReleaseS :: SoundID energyReleaseS :: SoundID
energyReleaseS = SoundID 87 energyReleaseS = SoundID 88
tone440S :: SoundID tone440S :: SoundID
tone440S = SoundID 88 tone440S = SoundID 89
explosionS :: SoundID explosionS :: SoundID
explosionS = SoundID 89 explosionS = SoundID 90
gut4S :: SoundID gut4S :: SoundID
gut4S = SoundID 90 gut4S = SoundID 91
glassShat1S :: SoundID glassShat1S :: SoundID
glassShat1S = SoundID 91 glassShat1S = SoundID 92
slap3S :: SoundID slap3S :: SoundID
slap3S = SoundID 92 slap3S = SoundID 93
reload1S :: SoundID reload1S :: SoundID
reload1S = SoundID 93 reload1S = SoundID 94
slapClean3S :: SoundID slapClean3S :: SoundID
slapClean3S = SoundID 94 slapClean3S = SoundID 95
foot2S :: SoundID foot2S :: SoundID
foot2S = SoundID 95 foot2S = SoundID 96
glassShat2S :: SoundID glassShat2S :: SoundID
glassShat2S = SoundID 96 glassShat2S = SoundID 97
fireS :: SoundID fireS :: SoundID
fireS = SoundID 97 fireS = SoundID 98
glassShat3S :: SoundID glassShat3S :: SoundID
glassShat3S = SoundID 98 glassShat3S = SoundID 99
insertS :: SoundID insertS :: SoundID
insertS = SoundID 99 insertS = SoundID 100
blood1S :: SoundID blood1S :: SoundID
blood1S = SoundID 100 blood1S = SoundID 101
ting3S :: SoundID ting3S :: SoundID
ting3S = SoundID 101 ting3S = SoundID 102
whirdownS :: SoundID whirdownS :: SoundID
whirdownS = SoundID 102 whirdownS = SoundID 103
gut6S :: SoundID gut6S :: SoundID
gut6S = SoundID 103 gut6S = SoundID 104
whirdownShort3S :: SoundID whirdownShort3S :: SoundID
whirdownShort3S = SoundID 104 whirdownShort3S = SoundID 105
debrisS :: SoundID debrisS :: SoundID
debrisS = SoundID 105 debrisS = SoundID 106
tap3S :: SoundID tap3S :: SoundID
tap3S = SoundID 106 tap3S = SoundID 107
backgroundSpaceS :: SoundID backgroundSpaceS :: SoundID
backgroundSpaceS = SoundID 107 backgroundSpaceS = SoundID 108
lasPulseS :: SoundID lasPulseS :: SoundID
lasPulseS = SoundID 108 lasPulseS = SoundID 109
clang2S :: SoundID clang2S :: SoundID
clang2S = SoundID 109 clang2S = SoundID 110
metal2S :: SoundID metal2S :: SoundID
metal2S = SoundID 110 metal2S = SoundID 111
tingS :: SoundID tingS :: SoundID
tingS = SoundID 111 tingS = SoundID 112
autoBS :: SoundID autoBS :: SoundID
autoBS = SoundID 112 autoBS = SoundID 113
knifeS :: SoundID knifeS :: SoundID
knifeS = SoundID 113 knifeS = SoundID 114
combineS :: SoundID combineS :: SoundID
combineS = SoundID 114 combineS = SoundID 115
connectItemS :: SoundID connectItemS :: SoundID
connectItemS = SoundID 115 connectItemS = SoundID 116
slapClean7S :: SoundID slapClean7S :: SoundID
slapClean7S = SoundID 116 slapClean7S = SoundID 117
footPin2S :: SoundID
footPin2S = SoundID 118
seagullWhistle1S :: SoundID seagullWhistle1S :: SoundID
seagullWhistle1S = SoundID 117 seagullWhistle1S = SoundID 119
bloodShort6S :: SoundID bloodShort6S :: SoundID
bloodShort6S = SoundID 118 bloodShort6S = SoundID 120
hitS :: SoundID hitS :: SoundID
hitS = SoundID 119 hitS = SoundID 121
whirdownShort4S :: SoundID whirdownShort4S :: SoundID
whirdownShort4S = SoundID 120 whirdownShort4S = SoundID 122
sineRaisePitchOneSecS :: SoundID sineRaisePitchOneSecS :: SoundID
sineRaisePitchOneSecS = SoundID 121 sineRaisePitchOneSecS = SoundID 123
dededumS :: SoundID dededumS :: SoundID
dededumS = SoundID 122 dededumS = SoundID 124
throbC4S :: SoundID throbC4S :: SoundID
throbC4S = SoundID 123 throbC4S = SoundID 125
whirTapS :: SoundID whirTapS :: SoundID
whirTapS = SoundID 124 whirTapS = SoundID 126
ting5S :: SoundID ting5S :: SoundID
ting5S = SoundID 125 ting5S = SoundID 127
stone2S :: SoundID stone2S :: SoundID
stone2S = SoundID 126 stone2S = SoundID 128
blood6S :: SoundID blood6S :: SoundID
blood6S = SoundID 127 blood6S = SoundID 129
pickUpS :: SoundID pickUpS :: SoundID
pickUpS = SoundID 128 pickUpS = SoundID 130
slap2S :: SoundID slap2S :: SoundID
slap2S = SoundID 129 slap2S = SoundID 131
bloodShort2S :: SoundID bloodShort2S :: SoundID
bloodShort2S = SoundID 130 bloodShort2S = SoundID 132
foamSprayFadeOutS :: SoundID foamSprayFadeOutS :: SoundID
foamSprayFadeOutS = SoundID 131 foamSprayFadeOutS = SoundID 133
metal6S :: SoundID metal6S :: SoundID
metal6S = SoundID 132 metal6S = SoundID 134
tap1S :: SoundID tap1S :: SoundID
tap1S = SoundID 133 tap1S = SoundID 135
click1S :: SoundID click1S :: SoundID
click1S = SoundID 134 click1S = SoundID 136
semitoneLoop1S :: SoundID semitoneLoop1S :: SoundID
semitoneLoop1S = SoundID 135 semitoneLoop1S = SoundID 137
disconnectItemS :: SoundID disconnectItemS :: SoundID
disconnectItemS = SoundID 136 disconnectItemS = SoundID 138
dedumS :: SoundID dedumS :: SoundID
dedumS = SoundID 137 dedumS = SoundID 139
sawtoothFailS :: SoundID sawtoothFailS :: SoundID
sawtoothFailS = SoundID 138 sawtoothFailS = SoundID 140
sineRaisePitchTwoSecS :: SoundID sineRaisePitchTwoSecS :: SoundID
sineRaisePitchTwoSecS = SoundID 139 sineRaisePitchTwoSecS = SoundID 141
slap4S :: SoundID slap4S :: SoundID
slap4S = SoundID 140 slap4S = SoundID 142
skwareFadeTwoSecS :: SoundID skwareFadeTwoSecS :: SoundID
skwareFadeTwoSecS = SoundID 141 skwareFadeTwoSecS = SoundID 143
reloadFailS :: SoundID reloadFailS :: SoundID
reloadFailS = SoundID 142 reloadFailS = SoundID 144
throb1S :: SoundID throb1S :: SoundID
throb1S = SoundID 143 throb1S = SoundID 145
slap5S :: SoundID slap5S :: SoundID
slap5S = SoundID 144 slap5S = SoundID 146
smallGlass3S :: SoundID smallGlass3S :: SoundID
smallGlass3S = SoundID 145 smallGlass3S = SoundID 147
reverseCymbal1S :: SoundID reverseCymbal1S :: SoundID
reverseCymbal1S = SoundID 146 reverseCymbal1S = SoundID 148
blood2S :: SoundID blood2S :: SoundID
blood2S = SoundID 147 blood2S = SoundID 149
insertOneS :: SoundID insertOneS :: SoundID
insertOneS = SoundID 148 insertOneS = SoundID 150
slap1S :: SoundID slap1S :: SoundID
slap1S = SoundID 149 slap1S = SoundID 151
tap4S :: SoundID tap4S :: SoundID
tap4S = SoundID 150 tap4S = SoundID 152
clang1S :: SoundID clang1S :: SoundID
clang1S = SoundID 151 clang1S = SoundID 153
foot1S :: SoundID foot1S :: SoundID
foot1S = SoundID 152 foot1S = SoundID 154
elecCrackleS :: SoundID elecCrackleS :: SoundID
elecCrackleS = SoundID 153 elecCrackleS = SoundID 155
foamSprayLoopS :: SoundID foamSprayLoopS :: SoundID
foamSprayLoopS = SoundID 154 foamSprayLoopS = SoundID 156
smallGlass1S :: SoundID smallGlass1S :: SoundID
smallGlass1S = SoundID 155 smallGlass1S = SoundID 157
bangS :: SoundID bangS :: SoundID
bangS = SoundID 156 bangS = SoundID 158
buzz1S :: SoundID buzz1S :: SoundID
buzz1S = SoundID 157 buzz1S = SoundID 159
seagullChatterS :: SoundID seagullChatterS :: SoundID
seagullChatterS = SoundID 158 seagullChatterS = SoundID 160
foot3S :: SoundID foot3S :: SoundID
foot3S = SoundID 159 foot3S = SoundID 161
bloodShort3S :: SoundID bloodShort3S :: SoundID
bloodShort3S = SoundID 160 bloodShort3S = SoundID 162
blood4S :: SoundID blood4S :: SoundID
blood4S = SoundID 161 blood4S = SoundID 163
ejectS :: SoundID ejectS :: SoundID
ejectS = SoundID 162 ejectS = SoundID 164
bloodShort4S :: SoundID bloodShort4S :: SoundID
bloodShort4S = SoundID 163 bloodShort4S = SoundID 165
metal1S :: SoundID metal1S :: SoundID
metal1S = SoundID 164 metal1S = SoundID 166
slapClean5S :: SoundID slapClean5S :: SoundID
slapClean5S = SoundID 165 slapClean5S = SoundID 167
warp1S :: SoundID warp1S :: SoundID
warp1S = SoundID 166 warp1S = SoundID 168
tinitusS :: SoundID tinitusS :: SoundID
tinitusS = SoundID 167 tinitusS = SoundID 169
gut1S :: SoundID gut1S :: SoundID
gut1S = SoundID 168 gut1S = SoundID 170
fireFadeS :: SoundID fireFadeS :: SoundID
fireFadeS = SoundID 169 fireFadeS = SoundID 171
+4 -4
View File
@@ -377,17 +377,17 @@ updateCreatureStride :: World -> Creature -> World
updateCreatureStride w cr updateCreatureStride w cr
| Walking <- cr ^. crStance . carriage | Walking <- cr ^. crStance . carriage
, CrabCrit {} <- cr ^. crType , CrabCrit {} <- cr ^. crType
= w & f (g 10) (cr ^?! crType . lFootPos) lFootPos = w & f footPin1S (g 10) (cr ^?! crType . lFootPos) lFootPos
& f (g (-10)) (cr ^?! crType . rFootPos) rFootPos & f footPin2S (g (-10)) (cr ^?! crType . rFootPos) rFootPos
| Walking <- cr ^. crStance . carriage | Walking <- cr ^. crStance . carriage
, isJust $ cr ^? crType . strideAmount = w & tocr . crType . strideAmount +~ d , isJust $ cr ^? crType . strideAmount = w & tocr . crType . strideAmount +~ d
| otherwise = w | otherwise = w
where where
tocr = cWorld . lWorld . creatures . ix cid tocr = cWorld . lWorld . creatures . ix cid
cid = cr ^. crID cid = cr ^. crID
f p q fp f sn p q fp
| distance p q > 10 = (tocr . crType . fp .~ (p - 9 *^ signorm (q - p))) | distance p q > 10 = (tocr . crType . fp .~ (p - 9 *^ signorm (q - p)))
. soundStart (CrFootSound cid 0) (p - 9 *^ signorm (q - p)) foot1S Nothing . soundStart (CrFootSound cid 0) (p - 9 *^ signorm (q - p)) sn Nothing
| otherwise = id | otherwise = id
g x = cr ^. crPos . _xy + x *^ vNormal (unitVectorAtAngle (cr ^. crDir)) g x = cr ^. crPos . _xy + x *^ vNormal (unitVectorAtAngle (cr ^. crDir))
s = 2 * fromMaybe 1 (crMvType cr ^? mvSpeed) s = 2 * fromMaybe 1 (crMvType cr ^? mvSpeed)