Merge pull request #9964 from GrayRachnid/fixmyblunder

Fixes Codewords not changing color and MkUltra enthrall not having the proper hearing_args
This commit is contained in:
Putnam3145
2019-11-29 06:20:18 -08:00
committed by GitHub
2 changed files with 6 additions and 5 deletions
@@ -23,6 +23,7 @@
owner.special_role = special_role
if(give_objectives)
forge_traitor_objectives()
RegisterSignal(owner.current, COMSIG_MOVABLE_HEAR, .proc/handle_hearing)
finalize_traitor()
..()
@@ -48,6 +49,7 @@
A.verbs -= /mob/living/silicon/ai/proc/choose_modules
A.malf_picker.remove_malf_verbs(A)
qdel(A.malf_picker)
UnregisterSignal(owner.current, COMSIG_MOVABLE_HEAR, .proc/handle_hearing)
/datum/antagonist/traitor/proc/handle_hearing(datum/source, list/hearing_args)
var/message = hearing_args[HEARING_MESSAGE]
@@ -59,7 +61,6 @@
if(!silent && owner.current)
to_chat(owner.current,"<span class='userdanger'> You are no longer the [special_role]! </span>")
owner.special_role = null
..()
/datum/antagonist/traitor/proc/add_objective(datum/objective/O)
objectives += O
@@ -608,18 +608,18 @@
UnregisterSignal(owner, COMSIG_GLOB_LIVING_SAY_SPECIAL)
/datum/status_effect/chem/enthrall/proc/owner_hear(var/hearer, message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode)
/datum/status_effect/chem/enthrall/proc/owner_hear(datum/source, list/hearing_args)
if(owner.client?.prefs.lewdchem == FALSE)
return
if (cTriggered > 0)
return
var/mob/living/carbon/C = owner
raw_message = lowertext(raw_message)
var/raw_message = lowertext(hearing_args[HEARING_RAW_MESSAGE])
for (var/trigger in customTriggers)
var/cached_trigger = lowertext(trigger)
if (findtext(raw_message, cached_trigger))//if trigger1 is the message
cTriggered = 5 //Stops triggerparties and as a result, stops servercrashes.
log_game("FERMICHEM: MKULTRA: [owner] ckey: [owner.key] has been triggered with [cached_trigger] from [speaker] saying: \"[message]\". (their master being [master] ckey: [enthrallID].)")
log_game("FERMICHEM: MKULTRA: [owner] ckey: [owner.key] has been triggered with [cached_trigger] from [hearing_args[HEARING_SPEAKER]] saying: \"[hearing_args[HEARING_MESSAGE]]\". (their master being [master] ckey: [enthrallID].)")
//Speak (Forces player to talk)
if (lowertext(customTriggers[trigger][1]) == "speak")//trigger2
@@ -656,7 +656,7 @@
C.adjustArousalLoss(10)
to_chat(C, "<span class='love'><i>You feel a surge of arousal!</i></span>")
else
C.throw_at(get_step_towards(speaker,C), 3, 1) //cut this if it's too hard to get working
C.throw_at(get_step_towards(hearing_args[HEARING_SPEAKER],C), 3, 1) //cut this if it's too hard to get working
//kneel (knockdown)
else if (lowertext(customTriggers[trigger]) == "kneel")//as close to kneeling as you can get, I suppose.