Merge pull request #6163 from Citadel-Station-13/upstream-merge-36457
[MIRROR] Fixes phobia word recognition
This commit is contained in:
@@ -71,14 +71,16 @@
|
||||
if(!owner.can_hear() || world.time < next_scare) //words can't trigger you if you can't hear them *taps head*
|
||||
return message
|
||||
for(var/word in trigger_words)
|
||||
if(findtext(raw_message, word))
|
||||
var/reg = regex(@"[^\l][REGEX_QUOTE(word)]*s[^\l]")
|
||||
if(findtext(raw_message, reg))
|
||||
addtimer(CALLBACK(src, .proc/freak_out, null, word), 10) //to react AFTER the chat message
|
||||
break
|
||||
return message
|
||||
|
||||
/datum/brain_trauma/mild/phobia/on_say(message)
|
||||
for(var/word in trigger_words)
|
||||
if(findtext(message, word))
|
||||
var/reg = regex(@"[^\l][REGEX_QUOTE(word)]*s[^\l]")
|
||||
if(findtext(message, reg))
|
||||
to_chat(owner, "<span class='warning'>You can't bring yourself to say the word \"[word]\"!</span>")
|
||||
return ""
|
||||
return message
|
||||
@@ -114,4 +116,4 @@
|
||||
owner.dizziness += 10
|
||||
owner.confused += 10
|
||||
owner.Jitter(10)
|
||||
owner.stuttering += 10
|
||||
owner.stuttering += 10
|
||||
|
||||
+15
-9
@@ -15,7 +15,7 @@
|
||||
],
|
||||
|
||||
"security": [
|
||||
" sec ",
|
||||
"sec",
|
||||
"security",
|
||||
"shitcurity",
|
||||
"baton",
|
||||
@@ -32,22 +32,22 @@
|
||||
"chain of command",
|
||||
"heads of staff",
|
||||
"head of security",
|
||||
" hos ",
|
||||
"hos",
|
||||
"head of personnel",
|
||||
" hop ",
|
||||
"hop",
|
||||
"head of research",
|
||||
" rd ",
|
||||
"rd",
|
||||
"chief medical officer",
|
||||
" cmo ",
|
||||
"cmo",
|
||||
"chief engineer",
|
||||
" ce ",
|
||||
"ce",
|
||||
"captain",
|
||||
"deathsquad",
|
||||
"death squad",
|
||||
"alien",
|
||||
"xeno",
|
||||
"abductor",
|
||||
" ayy",
|
||||
"ayy",
|
||||
"gray",
|
||||
"grey",
|
||||
"ufo",
|
||||
@@ -66,7 +66,9 @@
|
||||
"clown",
|
||||
"honk",
|
||||
"banana",
|
||||
"slip"
|
||||
"slip",
|
||||
"slipped",
|
||||
"slipping"
|
||||
],
|
||||
|
||||
"greytide": [
|
||||
@@ -84,7 +86,11 @@
|
||||
"lizard",
|
||||
"ligger",
|
||||
"hiss",
|
||||
"wag"
|
||||
"hissed",
|
||||
"hissing",
|
||||
"wag",
|
||||
"wagged",
|
||||
"wagging"
|
||||
],
|
||||
|
||||
"skeletons": [
|
||||
|
||||
Reference in New Issue
Block a user