Simplifies ear damage, allows empaths to properly spot deafness (#51436)

About The Pull Request

Ears currently behave strangely compared to other organs, especially their most closely related sensory organ, eyes. They only assign a deafness trait for quirks, mutations, and clothing (which prevents empaths from noticing hearing damage deafness), have lots of unnecessary procs for dealing/assessing damage, and several audible events check istype() for earmuffs specifically for whether a mob can hear something.

This cuts down on all of that. I removed most ear related procs from mobs, tied deafness explicitly to TRAIT_DEAF (and added a new source for hearing damage), and generally neatened up related code. As a direct result, empaths can now detect deafness from hearing damage, as I assume was intended. I also fixed a bug with examining with med HUD's or as an observer not showing a person's quirks, though I'm not sure people will really care about the info with med HUDs. Also, full revives/regenerating organs now remove all damage from existing organs rather than only trying to replace missing ones

In addition, Inacusiate and Sensory Restoration no longer instantly cure all hearing damage when applied, they now rapidly decrease both ear damage and deafness each tick. This isn't really a fix, but I figured I'd throw it in since I think cobby wanted to move away from instant fix microdose chems, and I punted the restoreEars() procs anyway

Fixes: #51435
Fixes: #48974
Why It's Good For The Game

Brings ears in line with how other organs operate, makes them easier to understand, and restores (what I assume to be) intended functionality for the empath quirk and medhud/observer examines
Changelog

cl Ryll/Shaps
fix: Empaths are able to detect deafness derived from hearing damage
tweak: Inacusiate and Sensory Restoration no longer instantly heal all hearing damage when applied, instead rapidly removing both ear damage and deafness.
fix: MedHUDs and observers now display quirks as intended on examine
/cl
This commit is contained in:
Ryll Ryll
2020-06-19 10:51:06 +12:00
committed by GitHub
parent b5c5fa52c2
commit 20fd4822f2
23 changed files with 114 additions and 116 deletions
+2 -5
View File
@@ -221,11 +221,8 @@
/obj/item/bikehorn/golden/proc/flip_mobs(mob/living/carbon/M, mob/user)
var/turf/T = get_turf(src)
for(M in ohearers(7, T))
if(ishuman(M) && M.can_hear())
var/mob/living/carbon/human/H = M
if(istype(H.ears, /obj/item/clothing/ears/earmuffs))
continue
M.emote("flip")
if(M.can_hear())
M.emote("flip")
flip_cooldown = world.time + 7
//canned laughter
+4 -2
View File
@@ -204,9 +204,9 @@ GENE SCANNER
trauma_text += trauma_desc
render_list += "<span class='alert ml-1'>Cerebral traumas detected: subject appears to be suffering from [english_list(trauma_text)].</span>\n"
if(C.roundstart_quirks.len)
render_list += "<span class='info ml-1'>Subject Major Disabilities: [C.get_trait_string(FALSE, CAT_QUIRK_MAJOR_DISABILITY)].</span>\n"
render_list += "<span class='info ml-1'>Subject Major Disabilities: [C.get_quirk_string(FALSE, CAT_QUIRK_MAJOR_DISABILITY)].</span>\n"
if(advanced)
render_list += "<span class='info ml-1'>Subject Minor Disabilities: [C.get_trait_string(FALSE, CAT_QUIRK_MINOR_DISABILITY)].</span>\n"
render_list += "<span class='info ml-1'>Subject Minor Disabilities: [C.get_quirk_string(FALSE, CAT_QUIRK_MINOR_DISABILITY)].</span>\n"
if(advanced)
render_list += "<span class='info ml-1'>Brain Activity Level: [(200 - M.getOrganLoss(ORGAN_SLOT_BRAIN))/2]%.</span>\n"
@@ -255,6 +255,8 @@ GENE SCANNER
message = ""
if(HAS_TRAIT_FROM(C, TRAIT_DEAF, GENETIC_MUTATION))
message = "\n<span class='alert ml-2'>Subject is genetically deaf.</span>"
else if(HAS_TRAIT_FROM(C, TRAIT_DEAF, EAR_DAMAGE))
message = "\n<span class='alert ml-2'>Subject is deaf from ear damage.</span>"
else if(HAS_TRAIT(C, TRAIT_DEAF))
message = "\n<span class='alert ml-2'>Subject is deaf.</span>"
else