From 8daf92c2dcd5c9b392b22f6d801f637eabd280bf Mon Sep 17 00:00:00 2001
From: Sharkmare <34294231+Sharkmare@users.noreply.github.com>
Date: Thu, 28 Feb 2019 18:07:57 +0100
Subject: [PATCH 1/7] Vocal mimicry for synxes
trying to write a vocal mimicry system.
this might be very spagheti and attempts to integrate the existing pet mimicry into the base synx to try and make use of the mob speak list as a storage for random sentences to choose from as well as adding the `voices` list to store names of people, yes this does include yourself if you play as a synx and use say instead of speak, no you should not be using say as a synx in the first place.
Might populate the say for synxes and voices for synxes with random voices and sentences so they dont start at 0
---
.../mob/living/simple_animal/animals/synx.dm | 52 ++++++++++++-------
1 file changed, 34 insertions(+), 18 deletions(-)
diff --git a/code/modules/mob/living/simple_animal/animals/synx.dm b/code/modules/mob/living/simple_animal/animals/synx.dm
index 262170a79c..3b7df6a4f8 100644
--- a/code/modules/mob/living/simple_animal/animals/synx.dm
+++ b/code/modules/mob/living/simple_animal/animals/synx.dm
@@ -10,12 +10,14 @@
icon_dead = "synx_dead"
//VAR$ SETUP
+ var/realname = null
var/poison_per_bite = 5
var/poison_chance = 99.666
var/poison_type = "synxchem"//inaprovalin, but evil
var/transformed_state = "synx_transformed"
var/transformed = FALSE
var/memorysize = 50 //Var for how many messages synxes remember if they know speechcode
+ var/list/voices = list()
faction = "Synx"
intelligence_level = SA_ANIMAL
@@ -113,11 +115,13 @@
*/
/mob/living/simple_animal/retaliate/synx/New()
- ..()
- verbs |= /mob/living/proc/ventcrawl
- verbs |= /mob/living/simple_animal/proc/contort
- verbs += /mob/living/simple_animal/retaliate/synx/proc/disguise
- verbs += /mob/living/simple_animal/retaliate/synx/proc/honk
+ ..()
+ verbs |= /mob/living/proc/ventcrawl
+ verbs |= /mob/living/simple_animal/proc/contort
+ verbs += /mob/living/simple_animal/retaliate/synx/proc/disguise
+ verbs += /mob/living/simple_animal/retaliate/synx/proc/honk
+ verbs += /mob/living/simple_animal/retaliate/synx/proc/randomspeech
+ realname = name
mob/living/simple_animal/synx/PunchTarget()
if(!Adjacent(target_mob))
@@ -264,7 +268,21 @@ mob/living/simple_animal/synx/PunchTarget()
if(prob(poison_chance))
to_chat(L, "You feel a strange substance on you.")
L.reagents.add_reagent(poison_type, poison_per_bite)
-
+
+/mob/living/simple_animal/retaliate/synx/hear_say(message,speaker)
+ . = ..()
+ if(!message) return
+ speak += message
+ voice += speaker
+ if(voices.len>=memorysize)
+ voices -= (pick(voices))//making the list more dynamic
+ if(speak.len>=memorysize)
+ speak -= (pick(speak))//making the list more dynamic
+ if(resting)
+ resting = !resting
+ if(message=="Honk!")
+ bikehorn()
+
//////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////// POWERS!!!! /////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////
@@ -309,6 +327,16 @@ mob/living/simple_animal/synx/PunchTarget()
transformed = !transformed
update_icons()
+/mob/living/simple_animal/retaliate/synx/proc/randomspeech()
+ set name = "speak"
+ set desc = "Takes a sentence you heard and says it"
+ set category = "Abilities"
+ name = pick(voices)
+ if(speak)
+ spawn(10)
+ src.say(pick(speak))
+ spawn(20)
+ name = realname
////////////////////////////////////////
////////////////PET VERSION/////////////
@@ -340,18 +368,6 @@ mob/living/simple_animal/synx/PunchTarget()
speak_chance = 2.0666
speak = list()
-//PET speechcode, simplistic but more than enough for the PET
-/mob/living/simple_animal/retaliate/synx/pet/hear_say(message)
- . = ..()
- if(!message) return
- speak += message
- if(speak.len>=memorysize)
- speak -= (pick(speak))//making the list more dynamic
- if(resting)
- resting = !resting
- if(message=="Honk!")
- bikehorn()
-
//HONKMOTHER Code.
/mob/living/simple_animal/retaliate/synx/proc/honk()
set name = "HONK"
From 4cba6840c1d960a1d6e9e02b9d8abae86387b375 Mon Sep 17 00:00:00 2001
From: Sharkmare <34294231+Sharkmare@users.noreply.github.com>
Date: Thu, 28 Feb 2019 18:13:00 +0100
Subject: [PATCH 2/7] woops adding safeguards
---
code/modules/mob/living/simple_animal/animals/synx.dm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/code/modules/mob/living/simple_animal/animals/synx.dm b/code/modules/mob/living/simple_animal/animals/synx.dm
index 3b7df6a4f8..529a64d174 100644
--- a/code/modules/mob/living/simple_animal/animals/synx.dm
+++ b/code/modules/mob/living/simple_animal/animals/synx.dm
@@ -331,10 +331,12 @@ mob/living/simple_animal/synx/PunchTarget()
set name = "speak"
set desc = "Takes a sentence you heard and says it"
set category = "Abilities"
- name = pick(voices)
- if(speak)
+ if(speak && voices)
+ name = pick(voices)
spawn(10)
src.say(pick(speak))
+ else
+ M.custom_pain("YOU NEED TO HEAR THINGS FIRST, try using Ventcrawl to eevesdrop on nerds",30)
spawn(20)
name = realname
From 802b68d75cc250e24f897e1a468a0fbb739eb639 Mon Sep 17 00:00:00 2001
From: Sharkmare <34294231+Sharkmare@users.noreply.github.com>
Date: Thu, 28 Feb 2019 18:16:18 +0100
Subject: [PATCH 3/7] Update synx.dm
---
code/modules/mob/living/simple_animal/animals/synx.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/mob/living/simple_animal/animals/synx.dm b/code/modules/mob/living/simple_animal/animals/synx.dm
index 529a64d174..b257018384 100644
--- a/code/modules/mob/living/simple_animal/animals/synx.dm
+++ b/code/modules/mob/living/simple_animal/animals/synx.dm
@@ -273,7 +273,7 @@ mob/living/simple_animal/synx/PunchTarget()
. = ..()
if(!message) return
speak += message
- voice += speaker
+ voices += speaker
if(voices.len>=memorysize)
voices -= (pick(voices))//making the list more dynamic
if(speak.len>=memorysize)
From 573671ea8bd215a4e22897253d929745bffceb85 Mon Sep 17 00:00:00 2001
From: Sharkmare <34294231+Sharkmare@users.noreply.github.com>
Date: Thu, 28 Feb 2019 18:24:09 +0100
Subject: [PATCH 4/7] Update synx.dm
---
code/modules/mob/living/simple_animal/animals/synx.dm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/code/modules/mob/living/simple_animal/animals/synx.dm b/code/modules/mob/living/simple_animal/animals/synx.dm
index b257018384..f67a760a2e 100644
--- a/code/modules/mob/living/simple_animal/animals/synx.dm
+++ b/code/modules/mob/living/simple_animal/animals/synx.dm
@@ -25,7 +25,7 @@
maxHealth = 150
health = 150
turns_per_move = 5 //Should just affect how often it wanders, subject to change.
- speed = -2 //Re enabled custom speed
+ speed = 2 //Re enabled custom speed
see_in_dark = 6
stop_when_pulled = 0
armor = list( // will be determined
@@ -299,13 +299,13 @@ mob/living/simple_animal/synx/PunchTarget()
status_flags &= ~HIDING
reset_plane_and_layer()
to_chat(src,"You have stopped hiding.")
- speed = -3
+ speed = 2
else
status_flags |= HIDING
layer = HIDING_LAYER //Just above cables with their 2.44
plane = OBJ_PLANE
to_chat(src,"You are now hiding.")
- speed = 2
+ speed = 4
/mob/living/simple_animal/retaliate/synx/proc/disguise()
set name = "Toggle Form"
From 7f856d4820568df762654625a71e1865a4326e84 Mon Sep 17 00:00:00 2001
From: Sharkmare <34294231+Sharkmare@users.noreply.github.com>
Date: Thu, 28 Feb 2019 18:26:23 +0100
Subject: [PATCH 5/7] Update synx.dm
---
code/modules/mob/living/simple_animal/animals/synx.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/mob/living/simple_animal/animals/synx.dm b/code/modules/mob/living/simple_animal/animals/synx.dm
index f67a760a2e..dac58fb39e 100644
--- a/code/modules/mob/living/simple_animal/animals/synx.dm
+++ b/code/modules/mob/living/simple_animal/animals/synx.dm
@@ -336,7 +336,7 @@ mob/living/simple_animal/synx/PunchTarget()
spawn(10)
src.say(pick(speak))
else
- M.custom_pain("YOU NEED TO HEAR THINGS FIRST, try using Ventcrawl to eevesdrop on nerds",30)
+ src.custom_pain("YOU NEED TO HEAR THINGS FIRST, try using Ventcrawl to eevesdrop on nerds",30)
spawn(20)
name = realname
From 517e66133f0db7e42f8054026c9f631f3c9670e3 Mon Sep 17 00:00:00 2001
From: Sharkmare <34294231+Sharkmare@users.noreply.github.com>
Date: Thu, 28 Feb 2019 18:34:53 +0100
Subject: [PATCH 6/7] Update synx.dm
---
code/modules/mob/living/simple_animal/animals/synx.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/mob/living/simple_animal/animals/synx.dm b/code/modules/mob/living/simple_animal/animals/synx.dm
index dac58fb39e..9de6e74af0 100644
--- a/code/modules/mob/living/simple_animal/animals/synx.dm
+++ b/code/modules/mob/living/simple_animal/animals/synx.dm
@@ -336,7 +336,7 @@ mob/living/simple_animal/synx/PunchTarget()
spawn(10)
src.say(pick(speak))
else
- src.custom_pain("YOU NEED TO HEAR THINGS FIRST, try using Ventcrawl to eevesdrop on nerds",30)
+ self_message("YOU NEED TO HEAR THINGS FIRST, try using Ventcrawl to eevesdrop on nerds")
spawn(20)
name = realname
From e62c5a22af08a773310cbb0d6abab8ee48076bce Mon Sep 17 00:00:00 2001
From: Sharkmare <34294231+Sharkmare@users.noreply.github.com>
Date: Thu, 28 Feb 2019 18:44:06 +0100
Subject: [PATCH 7/7] Update synx.dm
---
code/modules/mob/living/simple_animal/animals/synx.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/mob/living/simple_animal/animals/synx.dm b/code/modules/mob/living/simple_animal/animals/synx.dm
index 9de6e74af0..8fd717f6df 100644
--- a/code/modules/mob/living/simple_animal/animals/synx.dm
+++ b/code/modules/mob/living/simple_animal/animals/synx.dm
@@ -336,7 +336,7 @@ mob/living/simple_animal/synx/PunchTarget()
spawn(10)
src.say(pick(speak))
else
- self_message("YOU NEED TO HEAR THINGS FIRST, try using Ventcrawl to eevesdrop on nerds")
+ usr << "YOU NEED TO HEAR THINGS FIRST, try using Ventcrawl to eevesdrop on nerds"
spawn(20)
name = realname