From 6ebe75ca2af64c5909c5ac5c2d3d95dfba302e80 Mon Sep 17 00:00:00 2001 From: Varlaisvea <125837828+Varlaisvea@users.noreply.github.com> Date: Sun, 12 Mar 2023 19:46:31 +0000 Subject: [PATCH] Taj & Tesh hearing tweaks (#8994) * big heckin chonker ultragigamega-ears!!!! * slight balance tweak * tesh no longer have four ears so they no longer have superultragigamegahearing * its ok i couldnt figure out between() either lmao --- code/modules/mob/living/carbon/human/human.dm | 3 +++ code/modules/mob/living/carbon/human/species/species.dm | 1 + .../mob/living/carbon/human/species/station/station.dm | 1 + .../mob/living/carbon/human/species/station/teshari.dm | 1 + code/modules/mob/living/say.dm | 6 +++--- code/modules/mob/mob.dm | 3 +++ code/modules/mob/mob_defines.dm | 2 ++ 7 files changed, 14 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index fce4a77e3d..38fa454ed9 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1670,3 +1670,6 @@ /mob/living/carbon/human/leaves_tracks_type() return species.get_move_trail(src) + +/mob/living/carbon/human/hearing_boost_range() + return (hearing_boost_range + species.hearboost) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index cb38366f4c..8c2741da6b 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -53,6 +53,7 @@ var/blood_level_fatal = 0.4 //"Fatal" blood level; below this, you take extremely high oxydamage var/hunger_factor = 0.05 // Multiplier for hunger. var/active_regen_mult = 1 // Multiplier for 'Regenerate' power speed, in human_powers.dm + var/hearboost = 0 //Extra ranger on whisper hearing. 0 is adjacent. var/taste_sensitivity = TASTE_NORMAL // How sensitive the species is to minute tastes. var/allergens = null // Things that will make this species very sick diff --git a/code/modules/mob/living/carbon/human/species/station/station.dm b/code/modules/mob/living/carbon/human/species/station/station.dm index c121a48034..617bd92994 100644 --- a/code/modules/mob/living/carbon/human/species/station/station.dm +++ b/code/modules/mob/living/carbon/human/species/station/station.dm @@ -197,6 +197,7 @@ species_language = LANGUAGE_SIIK health_hud_intensity = 2.5 chem_strength_alcohol = 1.25 + hearboost = 1 //Sensitive ears. min_age = 17 max_age = 80 diff --git a/code/modules/mob/living/carbon/human/species/station/teshari.dm b/code/modules/mob/living/carbon/human/species/station/teshari.dm index 0400cfe30a..d1b638736f 100644 --- a/code/modules/mob/living/carbon/human/species/station/teshari.dm +++ b/code/modules/mob/living/carbon/human/species/station/teshari.dm @@ -55,6 +55,7 @@ gluttonous = 1 blood_volume = 400 hunger_factor = 0.2 + hearboost = 1 //Big heckin chonker ultragigamega-ears. ambiguous_genders = TRUE diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 30ebd18ab4..7ddf006241 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -331,20 +331,20 @@ var/global/list/channel_to_radio_key = new var/dst = get_dist(get_turf(M),get_turf(src)) var/runechat_enabled = M.client?.is_preference_enabled(/datum/client_preference/runechat_mob) - if(dst <= message_range || (M.stat == DEAD && !forbid_seeing_deadchat)) //Inside normal message range, or dead with ears (handled in the view proc) + if(dst <= min(message_range + M.hearing_boost_range(), world.view) || (M.stat == DEAD && !forbid_seeing_deadchat)) //Inside normal message range, boosted whisper range, or dead with ears (handled in the view proc) if(M.client && !runechat_enabled) var/image/I1 = listening[M] || speech_bubble images_to_clients[I1] |= M.client M << I1 M.hear_say(message_pieces, verb, italics, src, speech_sound, sound_vol) if(whispering && !isobserver(M)) //Don't even bother with these unless whispering - if(dst > message_range && dst <= w_scramble_range) //Inside whisper scramble range + if((message_range + M.hearing_boost_range() < dst) && (w_scramble_range + M.hearing_boost_range() >= dst)) //Within scramble range but not normal range if(M.client && !runechat_enabled) var/image/I2 = listening[M] || speech_bubble images_to_clients[I2] |= M.client M << I2 M.hear_say(stars_all(message_pieces), verb, italics, src, speech_sound, sound_vol*0.2) - if(dst > w_scramble_range && dst <= world.view) //Inside whisper 'visible' range + if((w_scramble_range + M.hearing_boost_range()) < dst && world.view >= dst) //Within visible range but not scramble range M.show_message("[name] [w_not_heard].", 2) //Object message delivery diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 3f100dbc7a..f58d17e422 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1205,3 +1205,6 @@ to_chat(src, SPAN_WARNING("You aren't dextrous enough to [target ? "use \the [target]" : "do that"].")) return FALSE return TRUE + +/mob/proc/hearing_boost_range() + return hearing_boost_range \ No newline at end of file diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index febbcf39dd..163be51b73 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -157,6 +157,8 @@ var/can_be_antagged = FALSE // To prevent pAIs/mice/etc from getting antag in autotraitor and future auto- modes. Uses inheritance instead of a bunch of typechecks. + var/hearing_boost_range = 0 //Extra range for whisper hearing, in tiles. Can also be adjusted for a whole species via hearboost species var. + //Generic list for proc holders. Only way I can see to enable certain verbs/procs. Should be modified if needed. var/proc_holder_list[] = list()//Right now unused. //Also unlike the spell list, this would only store the object in contents, not an object in itself.