mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-25 14:16:58 +01:00
Adds Deafened Feedback, enhances looping sounds further
Adds deafened ear ring that plays any time you're deafened, and fades back in once you can hear again. Example of deafened feedback [here](https://streamable.com/8s8vlu). Worry not, if you're deafened via mutation or other, you'll simply go deaf, and only hear the fade-in once you regain hearing. It will also only play **once** when you are deafened. Further deafening effects while you are already deaf will not force you to hear it again.
This commit is contained in:
+2
-1
@@ -357,6 +357,7 @@
|
||||
H.SetBlinded(0)
|
||||
H.eye_blurry = 0
|
||||
H.ear_deaf = 0
|
||||
H.deaf_loop.stop() // CHOMPStation Add: Ear Ringing/Deafness
|
||||
H.ear_damage = 0
|
||||
H.heal_overall_damage(H.getActualBruteLoss(), H.getActualFireLoss(), 1)
|
||||
for(var/I in H.organs_by_name)
|
||||
@@ -573,4 +574,4 @@
|
||||
if("l_hand")
|
||||
usr.unEquip(src)
|
||||
usr.put_in_l_hand(src)
|
||||
src.add_fingerprint(usr)
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
@@ -1,3 +1,17 @@
|
||||
/mob/living
|
||||
// var/ear_deaf_loop = FALSE // Are we already playing our deafened loop? Checked for safety so we don't deafen our players. (Not sure if we need this bc looping sounds datums have protection for starts being called repeatedly, commented out)
|
||||
var/datum/looping_sound/mob/deafened/deaf_loop
|
||||
|
||||
/mob/living/Initialize()
|
||||
. = ..()
|
||||
|
||||
deaf_loop = new(list(src), FALSE)
|
||||
|
||||
/mob/living/Destroy()
|
||||
. = ..()
|
||||
|
||||
QDEL_NULL(deaf_loop)
|
||||
|
||||
/mob/living/proc/vs_animate(var/belly_to_animate)
|
||||
return
|
||||
|
||||
@@ -14,4 +28,4 @@ Maybe later, gotta figure out a way to click yourself when in a locker etc.
|
||||
/mob/living/New(var/newloc)
|
||||
..()
|
||||
verbs |= /mob/living/proc/click_self
|
||||
*/
|
||||
*/
|
||||
|
||||
@@ -223,6 +223,7 @@
|
||||
M.eye_blurry = max(M.eye_blurry, 30)
|
||||
if(prob(20))
|
||||
M.ear_deaf = max(M.ear_deaf, 4)
|
||||
M.deaf_loop.start() // CHOMPStation Add: Ear Ringing/Deafness
|
||||
M.Confuse(2)
|
||||
else
|
||||
M.Weaken(2)
|
||||
|
||||
Reference in New Issue
Block a user