Merge pull request #5842 from Rykka-Stormheart/shep-dev-ear-ringing

Adds Deafened Feedback, enhances looping sounds further
This commit is contained in:
Razgriz
2023-03-04 16:37:29 -07:00
committed by GitHub
33 changed files with 127 additions and 16 deletions
@@ -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)