Soap stops swearing (#20162)

* technically functional

* technically functional

* more logically coded, credit to Contra and Mira

* yes this is more logical

* Sean and Fox reviews

* webeditor heresy
This commit is contained in:
Coolrune206
2023-01-18 11:32:28 -05:00
committed by GitHub
parent 802408a923
commit bf4212d24a
5 changed files with 55 additions and 1 deletions
@@ -120,6 +120,30 @@
/mob/living/carbon/human/proc/GetSpecialVoice()
return special_voice
GLOBAL_LIST_INIT(soapy_words, list(
"shit" = "shoot",
"shitter" = "toilet",
"fuck" = "phooey",
"fucking" = "flipping",
"fucker" = "individual dedicated to the continuation of their species",
"motherfucker" = "family time enjoyer",
"balls" = "baloney",
"whore" = "overly experienced individual",
"dumbass" = "sweet, misunderstood person",
"ass" = "backside",
"bastard" = "individual born out of wedlock",
"bitch" = "female dog",
"cock" = "chicken",
"cunt" = "countryman",
"damn" = "beaver-constructed river-blockade",
"dick" = "detective",
"hell" = "HFIL",
"jesus" = "jesús",
"pussy" = "pusillanimous",
"twat" = "honorable and esteemed individual",
"wanker" = "sanguine individual"
))
/mob/living/carbon/human/handle_speech_problems(list/message_pieces, verb)
var/span = ""
var/obj/item/organ/internal/cyberimp/brain/speech_translator/translator = locate(/obj/item/organ/internal/cyberimp/brain/speech_translator) in internal_organs
@@ -151,6 +175,10 @@
if(hoers.voicechange)
S.message = pick("NEEIIGGGHHHH!", "NEEEIIIIGHH!", "NEIIIGGHH!", "HAAWWWWW!", "HAAAWWW!")
if(HAS_TRAIT(src, TRAIT_SOAPY_MOUTH))
var/static/regex/R = regex("\\b([GLOB.soapy_words.Join("|")])\\b", "gi")
S.message = R.Replace(S.message, /mob/living/carbon/human/proc/replace_speech)
if(dna)
for(var/mutation_type in active_mutations)
var/datum/mutation/mutation = GLOB.dna_mutations[mutation_type]
@@ -175,6 +203,9 @@
return list("verb" = verb)
/mob/living/carbon/human/proc/replace_speech(matched)
return GLOB.soapy_words[lowertext(matched)]
/mob/living/carbon/human/handle_message_mode(message_mode, list/message_pieces, verb, used_radios)
switch(message_mode)
if("intercom")
@@ -908,6 +908,20 @@
if(volume >= 5 && !isspaceturf(T))
new /obj/item/reagent_containers/food/snacks/breadslice(T)
/datum/reagent/soap
name = "Soap"
id = "soapreagent"
description = "Soap, fit to clean the mouth of a sailor."
reagent_state = SOLID
color = "#FFFFFF"
taste_description = "soap"
/datum/reagent/soap/on_mob_add(mob/living/L)
ADD_TRAIT(L, TRAIT_SOAPY_MOUTH, id)
/datum/reagent/soap/on_mob_delete(mob/living/L)
REMOVE_TRAIT(L, TRAIT_SOAPY_MOUTH, id)
///Vomit///
/datum/reagent/vomit