diff --git a/code/_helpers/turfs.dm b/code/_helpers/turfs.dm
index 8583628114..1926246856 100644
--- a/code/_helpers/turfs.dm
+++ b/code/_helpers/turfs.dm
@@ -32,3 +32,10 @@
if(!available_turfs.len)
available_turfs = start_turfs
return pick(available_turfs)
+
+/proc/is_below_sound_pressure(var/turf/T)
+ var/datum/gas_mixture/environment = T ? T.return_air() : null
+ var/pressure = environment ? environment.return_pressure() : 0
+ if(pressure < SOUND_MINIMUM_PRESSURE)
+ return TRUE
+ return FALSE
\ No newline at end of file
diff --git a/code/_helpers/type2type.dm b/code/_helpers/type2type.dm
index 0bcf546123..8dc9cb020b 100644
--- a/code/_helpers/type2type.dm
+++ b/code/_helpers/type2type.dm
@@ -73,14 +73,14 @@
// Turns a direction into text
/proc/dir2text(direction)
switch (direction)
- if (1.0) return "north"
- if (2.0) return "south"
- if (4.0) return "east"
- if (8.0) return "west"
- if (5.0) return "northeast"
- if (6.0) return "southeast"
- if (9.0) return "northwest"
- if (10.0) return "southwest"
+ if (NORTH) return "north"
+ if (SOUTH) return "south"
+ if (EAST) return "east"
+ if (WEST) return "west"
+ if (NORTHEAST) return "northeast"
+ if (SOUTHEAST) return "southeast"
+ if (NORTHWEST) return "northwest"
+ if (SOUTHWEST) return "southwest"
// Turns text into proper directions
/proc/text2dir(direction)
diff --git a/code/modules/mob/hear_say.dm b/code/modules/mob/hear_say.dm
index 343b8e4225..a240277d38 100644
--- a/code/modules/mob/hear_say.dm
+++ b/code/modules/mob/hear_say.dm
@@ -59,7 +59,7 @@
if(is_preference_enabled(/datum/client_preference/ghost_ears) && (speaker in view(src)))
message = "[message]"
- if((sdisabilities & DEAF) || ear_deaf)
+ if(is_deaf())
if(!language || !(language.flags & INNATE)) // INNATE is the flag for audible-emote-language, so we don't want to show an "x talks but you cannot hear them" message if it's set
if(speaker == src)
src << "You cannot hear yourself speak!"
diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm
index 7682f675b0..67561125f1 100644
--- a/code/modules/mob/living/carbon/human/human_helpers.dm
+++ b/code/modules/mob/living/carbon/human/human_helpers.dm
@@ -90,6 +90,54 @@
return 0
+/mob/living/carbon/human
+ var/next_sonar_ping = 0
+
+/mob/living/carbon/human/proc/sonar_ping()
+ set name = "Listen In"
+ set desc = "Allows you to listen in to movement and noises around you."
+ set category = "Abilities"
+
+ if(incapacitated())
+ src << "You need to recover before you can use this ability."
+ return
+ if(world.time < next_sonar_ping)
+ src << "You need another moment to focus."
+ return
+ if(is_deaf() || is_below_sound_pressure(get_turf(src)))
+ src << "You are for all intents and purposes currently deaf!"
+ return
+ next_sonar_ping += 10 SECONDS
+ var/heard_something = FALSE
+ src << "You take a moment to listen in to your environment..."
+ for(var/mob/living/L in range(client.view, src))
+ var/turf/T = get_turf(L)
+ if(!T || L == src || L.stat == DEAD || is_below_sound_pressure(T))
+ continue
+ heard_something = TRUE
+ var/feedback = list()
+ feedback += "There are noises of movement "
+ var/direction = get_dir(src, L)
+ if(direction)
+ feedback += "towards the [dir2text(direction)], "
+ switch(get_dist(src, L) / client.view)
+ if(0 to 0.2)
+ feedback += "very close by."
+ if(0.2 to 0.4)
+ feedback += "close by."
+ if(0.4 to 0.6)
+ feedback += "some distance away."
+ if(0.6 to 0.8)
+ feedback += "further away."
+ else
+ feedback += "far away."
+ else // No need to check distance if they're standing right on-top of us
+ feedback += "right on top of you."
+ feedback += ""
+ src << jointext(feedback,null)
+ if(!heard_something)
+ src << "You hear no movement but your own."
+
#undef HUMAN_EATING_NO_ISSUE
#undef HUMAN_EATING_NO_MOUTH
#undef HUMAN_EATING_BLOCKED_MOUTH
diff --git a/code/modules/mob/living/carbon/human/species/station/seromi.dm b/code/modules/mob/living/carbon/human/species/station/seromi.dm
index 9316eaecad..ed5f0de570 100644
--- a/code/modules/mob/living/carbon/human/species/station/seromi.dm
+++ b/code/modules/mob/living/carbon/human/species/station/seromi.dm
@@ -31,8 +31,9 @@
brute_mod = 1.35
burn_mod = 1.35
mob_size = MOB_SMALL
+ pass_flags = PASSTABLE
holder_type = /obj/item/weapon/holder/human
- short_sighted = 1
+// short_sighted = 1
gluttonous = 1
blood_volume = 400
hunger_factor = 0.2
@@ -84,40 +85,13 @@
/datum/unarmed_attack/claws,
/datum/unarmed_attack/stomp/weak
)
-/*
- var/shock_cap = 30
- var/hallucination_cap = 25
-// I'm... so... ronrery, so ronery...
-/datum/species/teshari/handle_environment_special(var/mob/living/carbon/human/H)
-
- // If they're dead or unconcious they're a bit beyond this kind of thing.
- if(H.stat)
- return
-
- // No point processing if we're already stressing the hell out.
- if(H.hallucination >= hallucination_cap && H.shock_stage >= shock_cap)
- return
-
- // Check for company.
- for(var/mob/living/M in viewers(H))
- if(M == H || M.stat == DEAD || M.invisibility > H.see_invisible)
- continue
- if(M.faction == "neutral" || M.faction == H.faction)
- return
-
- // No company? Suffer :(
- if(H.shock_stage < shock_cap)
- H.shock_stage += 1
- if(H.shock_stage >= shock_cap && H.hallucination < hallucination_cap)
- H.hallucination += 2.5
-*/
-/datum/species/teshari/get_vision_flags(var/mob/living/carbon/human/H)
- if(!(H.sdisabilities & DEAF) && !H.ear_deaf)
- return SEE_SELF|SEE_MOBS
- else
- return SEE_SELF
+ inherent_verbs = list(
+ /mob/living/carbon/human/proc/sonar_ping,
+ /mob/living/proc/hide
+ )
/datum/species/teshari/equip_survival_gear(var/mob/living/carbon/human/H)
..()
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(H),slot_shoes)
+
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index aaea193734..7d969569d4 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -50,13 +50,13 @@
if(!client) return
if (type)
- if((type & 1) && ((sdisabilities & BLIND) || blinded || paralysis) )//Vision related
+ if((type & 1) && (is_blind() || paralysis) )//Vision related
if (!( alt ))
return
else
msg = alt
type = alt_type
- if ((type & 2) && ((sdisabilities & DEAF) || ear_deaf))//Hearing related
+ if ((type & 2) && is_deaf())//Hearing related
if (!( alt ))
return
else
@@ -154,6 +154,12 @@
return UNBUCKLED
return restrained() ? FULLY_BUCKLED : PARTIALLY_BUCKLED
+/mob/proc/is_blind()
+ return ((sdisabilities & BLIND) || blinded || incapacitated(INCAPACITATION_KNOCKOUT))
+
+/mob/proc/is_deaf()
+ return ((sdisabilities & DEAF) || ear_deaf || incapacitated(INCAPACITATION_KNOCKOUT))
+
/mob/proc/is_physically_disabled()
return incapacitated(INCAPACITATION_DISABLED)