mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 13:07:46 +01:00
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:
@@ -196,8 +196,10 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
|
||||
#define TRAIT_REPEATSURGERY "master_surgeon" // Lets you automatically repeat surgeries regardless of tool
|
||||
#define TRAIT_EDIBLE_BUG "edible_bug" // Lets lizards and other animals that can eat bugs eat ya
|
||||
#define TRAIT_ELITE_CHALLENGER "elite_challenger"
|
||||
#define TRAIT_SOAPY_MOUTH "soapy_mouth"
|
||||
#define TRAIT_UNREVIVABLE "unrevivable" // Prevents changeling revival
|
||||
|
||||
|
||||
//***** ITEM TRAITS *****//
|
||||
/// Show what machine/door wires do when held.
|
||||
#define TRAIT_SHOW_WIRE_INFO "show_wire_info"
|
||||
|
||||
@@ -68,6 +68,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
|
||||
"TRAIT_EMOTE_MUTE" = TRAIT_EMOTE_MUTE,
|
||||
"TRAIT_AI_UNTRACKABLE" = TRAIT_AI_UNTRACKABLE,
|
||||
"TRAIT_ELITE_CHALLENGER" = TRAIT_ELITE_CHALLENGER,
|
||||
"TRAIT_SOAPY_MOUTH" = TRAIT_SOAPY_MOUTH,
|
||||
"TRAIT_UNREVIVABLE" = TRAIT_UNREVIVABLE
|
||||
),
|
||||
/obj/item = list(
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
/obj/item/soap/afterattack(atom/target, mob/user, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if(user.zone_selected == "mouth") // cleaning out someone's mouth is a different act
|
||||
return
|
||||
if(target == user && user.a_intent == INTENT_GRAB && ishuman(target))
|
||||
var/mob/living/carbon/human/muncher = user
|
||||
if(muncher && isdrask(muncher))
|
||||
@@ -33,6 +35,7 @@
|
||||
times_eaten++
|
||||
playsound(user.loc, 'sound/items/eatfood.ogg', 50, 0)
|
||||
user.adjust_nutrition(5)
|
||||
user.reagents.add_reagent("soapreagent", 3)
|
||||
if(times_eaten < max_bites)
|
||||
to_chat(user, "<span class='notice'>You take a bite of [src]. Delicious!</span>")
|
||||
else
|
||||
@@ -54,7 +57,10 @@
|
||||
|
||||
/obj/item/soap/attack(mob/target as mob, mob/user as mob)
|
||||
if(target && user && ishuman(target) && ishuman(user) && !target.stat && !user.stat && user.zone_selected == "mouth" )
|
||||
user.visible_message("<span class='warning'>\the [user] washes \the [target]'s mouth out with [name]!</span>")
|
||||
user.visible_message("<span class='warning'>[user] starts washing [target]'s mouth out with [name]!</span>")
|
||||
if(do_after(user, cleanspeed, target = target))
|
||||
user.visible_message("<span class='warning'>[user] washes [target]'s mouth out with [name]!</span>")
|
||||
target.reagents.add_reagent("soapreagent", 6)
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user