test (#37263)
This commit is contained in:
@@ -71,7 +71,8 @@
|
||||
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)
|
||||
var/reg = regex("\[^\\l\][REGEX_QUOTE(word)]*s\[^\\l\]")
|
||||
var/reg = regex("(\\b|\\A)[REGEX_QUOTE(word)]'?s*(\\b|\\Z)", "i")
|
||||
|
||||
if(findtext(raw_message, reg))
|
||||
addtimer(CALLBACK(src, .proc/freak_out, null, word), 10) //to react AFTER the chat message
|
||||
break
|
||||
@@ -79,7 +80,8 @@
|
||||
|
||||
/datum/brain_trauma/mild/phobia/on_say(message)
|
||||
for(var/word in trigger_words)
|
||||
var/reg = regex("\[^\\l\][REGEX_QUOTE(word)]*s\[^\\l\]")
|
||||
var/reg = regex("(\\b|\\A)[REGEX_QUOTE(word)]'?s*(\\b|\\Z)", "i")
|
||||
|
||||
if(findtext(message, reg))
|
||||
to_chat(owner, "<span class='warning'>You can't bring yourself to say the word \"[word]\"!</span>")
|
||||
return ""
|
||||
|
||||
Reference in New Issue
Block a user