Skip to content

Commit 145625b

Browse files
Cleaned up some more sounds and prepped ambistat.ogg and ambibar.ogg for their future as title music
(For PolyBlue) Flashbangs now affect people in lockers git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2608 316c924e-a436-60f5-8080-3fe189b3f50e
1 parent a2d6e59 commit 145625b

File tree

6 files changed

+100
-74
lines changed

6 files changed

+100
-74
lines changed

code/game/objects/items/weapons/grenades.dm

+86-61
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ FLASHBANG
9393
active = 0
9494
det_time = 30
9595
proc
96+
bang(var/turf/T , var/mob/living/carbon/M)
9697
prime()
9798
clown_check(var/mob/living/user)
9899

@@ -143,81 +144,92 @@ FLASHBANG
143144
..()
144145
return
145146

147+
bang(var/turf/T , var/mob/living/carbon/M) // Added a new proc called 'bang' that takes a location and a person to be banged.
148+
if (locate(/obj/item/weapon/cloaking_device, M)) // Called during the loop that bangs people in lockers/containers and when banging
149+
for(var/obj/item/weapon/cloaking_device/S in M) // people in normal view. Could theroetically be called during other explosions.
150+
S.active = 0 // -- Polymorph
151+
S.icon_state = "shield0"
146152

147-
prime()
153+
M << "\red <B>BANG</B>"
148154
playsound(src.loc, 'bang.ogg', 25, 1)
149-
var/turf/T = get_turf(src)
150-
if(T)
151-
T.hotspot_expose(700,125)
152-
153-
for(var/mob/living/carbon/M in viewers(T, null))
154-
if (locate(/obj/item/weapon/cloaking_device, M))
155-
for(var/obj/item/weapon/cloaking_device/S in M)
156-
S.active = 0
157-
S.icon_state = "shield0"
158-
159-
M << "\red <B>BANG</B>"
160155

161156
//Checking for protections
162-
var/eye_safety = 0
163-
var/ear_safety = 0
164-
if(iscarbon(M))
165-
eye_safety = M.eyecheck()
166-
if(ishuman(M))
167-
if(istype(M:ears, /obj/item/clothing/ears/earmuffs))
168-
ear_safety += 2
169-
if(M.mutations & HULK)
170-
ear_safety += 1
171-
if(istype(M:head, /obj/item/clothing/head/helmet))
172-
ear_safety += 1
157+
var/eye_safety = 0
158+
var/ear_safety = 0
159+
if(iscarbon(M))
160+
eye_safety = M.eyecheck()
161+
if(ishuman(M))
162+
if(istype(M:ears, /obj/item/clothing/ears/earmuffs))
163+
ear_safety += 2
164+
if(M.mutations & HULK)
165+
ear_safety += 1
166+
if(istype(M:head, /obj/item/clothing/head/helmet))
167+
ear_safety += 1
173168

174169
//Flashing everyone
175-
if(eye_safety < 1)
176-
flick("e_flash", M.flash)
177-
M.eye_stat += rand(1, 3)
178-
M.stunned = max(M.stunned,2)
179-
M.weakened = max(M.weakened,10)
170+
if(eye_safety < 1)
171+
flick("e_flash", M.flash)
172+
M.eye_stat += rand(1, 3)
173+
M.stunned = max(M.stunned,2)
174+
M.weakened = max(M.weakened,10)
175+
176+
180177

181178
//Now applying sound
182-
if((get_dist(M, T) <= 2 || src.loc == M.loc || src.loc == M))
183-
if(ear_safety > 0)
184-
M.stunned = max(M.stunned,2)
185-
M.weakened = max(M.weakened,1)
179+
if((get_dist(M, T) <= 2 || src.loc == M.loc || src.loc == M))
180+
if(ear_safety > 0)
181+
M.stunned = max(M.stunned,2)
182+
M.weakened = max(M.weakened,1)
183+
else
184+
M.stunned = max(M.stunned,10)
185+
M.weakened = max(M.weakened,3)
186+
if ((prob(14) || (M == src.loc && prob(70))))
187+
M.ear_damage += rand(1, 10)
186188
else
187-
M.stunned = max(M.stunned,10)
188-
M.weakened = max(M.weakened,3)
189-
if ((prob(14) || (M == src.loc && prob(70))))
190-
M.ear_damage += rand(1, 10)
191-
else
192-
M.ear_damage += rand(0, 5)
189+
M.ear_damage += rand(0, 5)
193190
M.ear_deaf = max(M.ear_deaf,15)
194191

195-
else if(get_dist(M, T) <= 5)
196-
if(!ear_safety)
197-
M.stunned = max(M.stunned,8)
198-
M.ear_damage += rand(0, 3)
199-
M.ear_deaf = max(M.ear_deaf,10)
192+
else if(get_dist(M, T) <= 5)
193+
if(!ear_safety)
194+
M.stunned = max(M.stunned,8)
195+
M.ear_damage += rand(0, 3)
196+
M.ear_deaf = max(M.ear_deaf,10)
200197

201-
else if(!ear_safety)
202-
M.stunned = max(M.stunned,4)
203-
M.ear_damage += rand(0, 1)
204-
M.ear_deaf = max(M.ear_deaf,5)
198+
else if(!ear_safety)
199+
M.stunned = max(M.stunned,4)
200+
M.ear_damage += rand(0, 1)
201+
M.ear_deaf = max(M.ear_deaf,5)
205202

206203
//This really should be in mob not every check
207-
if (M.eye_stat >= 20)
208-
M << "\red Your eyes start to burn badly!"
209-
M.disabilities |= 1
210-
if (prob(M.eye_stat - 20 + 1))
211-
M << "\red You can't see anything!"
212-
M.sdisabilities |= 1
213-
if (M.ear_damage >= 15)
214-
M << "\red Your ears start to ring badly!"
215-
if (prob(M.ear_damage - 10 + 5))
216-
M << "\red You can't hear anything!"
217-
M.sdisabilities |= 4
218-
else
219-
if (M.ear_damage >= 5)
220-
M << "\red Your ears start to ring!"
204+
if (M.eye_stat >= 20)
205+
M << "\red Your eyes start to burn badly!"
206+
M.disabilities |= 1
207+
if (prob(M.eye_stat - 20 + 1))
208+
M << "\red You can't see anything!"
209+
M.sdisabilities |= 1
210+
if (M.ear_damage >= 15)
211+
M << "\red Your ears start to ring badly!"
212+
if (prob(M.ear_damage - 10 + 5))
213+
M << "\red You can't hear anything!"
214+
M.sdisabilities |= 4
215+
else
216+
if (M.ear_damage >= 5)
217+
M << "\red Your ears start to ring!"
218+
219+
prime() // Prime now just handles the two loops that query for people in lockers and people who can see it.
220+
var/turf/T = get_turf(src)
221+
if(T)
222+
T.hotspot_expose(700,125)
223+
224+
for(var/obj/structure/closet/L in view(T, null))
225+
if(locate(/mob/living/carbon/, L))
226+
for(var/mob/living/carbon/M in L)
227+
bang(T, M)
228+
229+
230+
for(var/mob/living/carbon/M in viewers(T, null))
231+
bang(T, M)
232+
221233

222234
//Blob damage here
223235
for(var/obj/effect/blob/B in view(8,T))
@@ -251,3 +263,16 @@ FLASHBANG
251263
prime()
252264
return 0
253265
return 1
266+
267+
268+
269+
270+
271+
272+
273+
274+
275+
276+
277+
278+

code/game/sound.dm

+12-12
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
if (vary)
2020
S.frequency = rand(32000, 55000)
21-
for (var/mob/M in range(world.view+extrarange, source))
21+
for (var/mob/M in range(world.view+extrarange, source)) // Plays for people in range.
2222
if (M.client)
2323
if(M.ear_deaf <= 0 || !M.ear_deaf)
2424
if(isturf(source))
@@ -27,6 +27,12 @@
2727

2828
M << S
2929

30+
for(var/obj/structure/closet/L in range(world.view+extrarange, source))
31+
if(locate(/mob/, L))
32+
for(var/mob/Ml in L)
33+
Ml << S
34+
// Now plays for people in lockers! -- Polymorph
35+
3036
/mob/proc/playsound_local(var/atom/source, soundin, vol as num, vary, extrarange as num)
3137
if(!src.client || ear_deaf > 0) return
3238
switch(soundin)
@@ -81,22 +87,16 @@ client/verb/Toggle_Soundscape()
8187

8288
switch(src.name)
8389
if ("Chapel") sound = pick('ambicha1.ogg','ambicha2.ogg','ambicha3.ogg','ambicha4.ogg')
84-
if ("Morgue") sound = pick('ambimo1.ogg','ambimo2.ogg','ambistat.ogg')
85-
if ("Space") sound = pick('ambispace.ogg','ambistat.ogg',)
90+
if ("Morgue") sound = pick('ambimo1.ogg','ambimo2.ogg','title2.ogg')
91+
if ("Space") sound = pick('ambispace.ogg','title2.ogg',)
8692
if ("Engine Control") sound = pick('ambisin1.ogg','ambisin2.ogg','ambisin3.ogg','ambisin4.ogg')
8793
if ("Atmospherics") sound = pick('ambiatm1.ogg')
88-
if ("Medbay") sound = pick('ambistat.ogg')
89-
if ("Bridge") sound = pick('ambistat.ogg')
90-
if ("Arrival Shuttle Hallway") sound = pick('ambistat.ogg','ambiruntime.ogg')
9194
if ("AI Sat Ext") sound = pick('ambiruntime.ogg','ambimalf.ogg')
9295
if ("AI Satellite") sound = pick('ambimalf.ogg')
9396
if ("AI Satellite Teleporter Room") sound = pick('ambiruntime.ogg','ambimalf.ogg')
94-
if ("Port Primary Hallway") sound = pick('ambiruntime.ogg', 'ambistat.ogg')
95-
if ("Bar") sound = pick('ambibar.ogg')
96-
if ("Locker Room") sound = pick('ambiruntime.ogg','ambistat.ogg')
97-
if ("Primary Tool Storage") sound = pick('ambiruntime.ogg','ambistat.ogg')
98-
if ("AI Upload Foyer") sound = pick('ambimalf.ogg')
99-
if ("AI Upload Chamber") sound = pick('ambimalf.ogg')
97+
if ("Bar") sound = pick('title1.ogg')
98+
if ("AI Upload Foyer") sound = pick('ambimalf.ogg', 'null.ogg')
99+
if ("AI Upload Chamber") sound = pick('ambimalf.ogg','null.ogg')
100100
if ("Mine")
101101
sound = pick('ambimine.ogg')
102102
musVolume = 25

html/changelog.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ <h4>Changelog</h4>
8383
</li>
8484
<li><b>PolymorphBlue updated:</b>
8585
<ul>
86-
<li>Traitors in the escape shuttle's prison cell will now fail their objective.</li>
86+
<li>Traitors in the escape shuttle's prison cell will now fail their objective.</li>
87+
<li>Lockers are no longer soundproof! (or flashproof, for that matter)</li>
8788
</ul>
8889
</li>
8990
</ul>
File renamed without changes.
File renamed without changes.

sound/voice/malf.ogg

-17.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)