Split custom echo code into it's own call to reduce overhead.

This commit is contained in:
Fermi
2019-06-22 12:18:38 +01:00
parent ee9d234af6
commit d2685be3f6
3 changed files with 44 additions and 12 deletions
@@ -212,6 +212,9 @@
var/DistApart = 1 //Distance between master and owner
var/tranceTime = 0 //how long trance effects apply on trance status
var/customEcho //Custom looping text in owner
var/customSpan //Custom spans for looping text
/datum/status_effect/chem/enthrall/on_apply()
var/mob/living/carbon/M = owner
var/datum/reagent/fermi/enthrall/E = locate(/datum/reagent/fermi/enthrall) in M.reagents.reagent_list
@@ -496,6 +499,13 @@
//Truth serum?
//adrenals?
//customEcho
if(customEcho)
if(prob(5))
if(!customSpan) //just in case!
customSpan = "notice"
to_chat(owner, "<span class='[customSpan]'><i>[customEcho].</i></span>")
//final tidying
resistanceTally += deltaResist
deltaResist = 0
@@ -150,7 +150,7 @@ Creating a chem with a low purity will make you permanently fall in love with so
name = "MKUltraTest"
id = "enthrallTest"
description = "A forbidden deep red mixture that overwhelms a foreign body with waves of joy, intoxicating them into servitude. When taken by the creator, it will enhance the draw of their voice to those affected by it."
color = "#2C051A" // rgb: , 0, 255
color = "#c40020" // rgb: , 0, 255
data = list("creatorID" = "honkatonkbramblesnatch", "creatorGender" = "Mistress", "creatorName" = "Fermis Yakumo")
creatorID = "honkatonkbramblesnatch"//ckey
creatorGender = "Mistress"