From 1ba7e2b3967b496da3dc10dbc353a519b8f9d4cb Mon Sep 17 00:00:00 2001
From: loburd <66150448+loburd@users.noreply.github.com>
Date: Wed, 26 Aug 2020 17:22:12 -0400
Subject: [PATCH] Update synx.dm
---
.../mob/living/simple_animal/aliens/synx.dm | 54 ++++++++++++++++---
1 file changed, 48 insertions(+), 6 deletions(-)
diff --git a/code/modules/mob/living/simple_animal/aliens/synx.dm b/code/modules/mob/living/simple_animal/aliens/synx.dm
index 8ed52b3b83..ec60f60b44 100644
--- a/code/modules/mob/living/simple_animal/aliens/synx.dm
+++ b/code/modules/mob/living/simple_animal/aliens/synx.dm
@@ -146,10 +146,10 @@
//some things should be here that arent tho.
..()
verbs |= /mob/living/proc/ventcrawl
- //verbs |= /mob/living/proc/shredlimb //will port shredlimb
- //verbs |= /mob/living/proc/sonar //will port perceptive hearing.
//verbs |= /mob/living/proc/disendstomach //to do later: add disendstomach verb and flag to check, also sprites of stomach outside the body.
verbs |= /mob/living/simple_mob/proc/contort
+ verbs |= /mob/living/simple_mob/retaliate/synx/proc/sonar_ping
+ verbs |= /mob/living/simple_mob/proc/shred_limb //shredlimb
verbs |= /mob/living/simple_mob/retaliate/synx/proc/disguise
verbs |= /mob/living/simple_mob/retaliate/synx/proc/randomspeech
realname = name
@@ -409,13 +409,55 @@
spawn(5)
name = realname
-//set up for later
-/*
-/mob/living/simple_mob/proc/sonar() //perceptive hearing.
+//lo- procs adjusted to mobs.
+/mob/living/simple_mob/retaliate/synx
+ var/next_sonar_ping = 0
-/mob/living/simple_mob/proc/shred_limb() //shredlimb
+/mob/living/simple_mob/retaliate/synx/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())
+ to_chat(src, "You need to recover before you can use this ability.")
+ return
+ if(world.time < next_sonar_ping)
+ to_chat(src, "You need another moment to focus.")
+ return
+ if(is_deaf() || is_below_sound_pressure(get_turf(src)))
+ to_chat(src, "You are for all intents and purposes currently deaf!")
+ return
+ next_sonar_ping += 10 SECONDS
+ var/heard_something = FALSE
+ to_chat(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 += ""
+ to_chat(src,jointext(feedback,null))
+ if(!heard_something)
+ to_chat(src, "You hear no movement but your own.")
/mob/living/simple_mob/proc/disendstomach() //Original code for disendedstomach burn damage.
*/