diff --git a/code/controllers/subsystem/chat.dm b/code/controllers/subsystem/chat.dm index 2861f592cc..5d4c0b7119 100644 --- a/code/controllers/subsystem/chat.dm +++ b/code/controllers/subsystem/chat.dm @@ -638,8 +638,8 @@ SUBSYSTEM_DEF(chat) /// - A color for the text background /// - A color for the header background /// and from this, we will make a furry dating sim style message that will be sent to the target *and* the speaker - var/m_name = mommy.speakername - var/m_verb = mommy.message_saymod_comma + var/m_name = mommy.speakername || mommy.source.name + var/m_verb = mommy.message_saymod_comma || "says, " var/m_rawmessage = mommy.original_message var/m_message = mommy.message var/m_mode = mommy.message_mode || MODE_SAY @@ -738,28 +738,34 @@ SUBSYSTEM_DEF(chat) target.heard_data[mommyquid] = list("last_heard" = world.time, "message_mode" = m_mode) var/nomessage = FALSE var/nobold_verb = FALSE - if(LAZYLEN(hidden_toe)) - if(!LAZYLEN(ckey(m_rawmessage))) - // so see if they have a CustomBlankVerb and CustomMessageVerb - // if they do, use that instead of the default message and verb - var/vess = hidden_toe["CustomBlankVerb"] - if(vess) - m_verb = vess - else - m_verb = "does something!" - nobold_verb = TRUE - nomessage = TRUE - else if(hidden_toe["CustomMessageVerb"]) - if(findtext(hidden_toe["CustomMessageVerb"], "|")) - var/list/verblist = splittext(hidden_toe["CustomMessageVerb"], "|") - if(LAZYLEN(verblist) > 1) - m_verb = pick(verblist) + var/no_boober_period = FALSE // the name and verb + if(mommy.is_emote || mommy.hide_name_n_verb) + no_boober_period = TRUE // message is self-contained, just show it raw without the head or the verb + if(mommy.partial) // for *scream stuff + giv_head = FALSE + else + if(LAZYLEN(hidden_toe)) + if(!LAZYLEN(ckey(m_rawmessage))) + // so see if they have a CustomBlankVerb and CustomMessageVerb + // if they do, use that instead of the default message and verb + var/vess = hidden_toe["CustomBlankVerb"] + if(vess) + m_verb = vess + else + m_verb = "does something!" + nobold_verb = TRUE + nomessage = TRUE + else if(hidden_toe["CustomMessageVerb"]) + if(findtext(hidden_toe["CustomMessageVerb"], "|")) + var/list/verblist = splittext(hidden_toe["CustomMessageVerb"], "|") + if(LAZYLEN(verblist) > 1) + m_verb = pick(verblist) + else + m_verb = hidden_toe["CustomMessageVerb"] + // nobold_verb = TRUE else m_verb = hidden_toe["CustomMessageVerb"] - // nobold_verb = TRUE - else - m_verb = hidden_toe["CustomMessageVerb"] - // nobold_verb = TRUE + // nobold_verb = TRUE /// Character Directory link // var/m_charlink = " @@ -806,9 +812,10 @@ SUBSYSTEM_DEF(chat) // now the body - the BottomBox if(giv_body) cum += "
" - cum += "

[m_name] [m_verb]

" + if(!no_boober_period) + cum += "

[m_name] [m_verb]

" if(!nomessage) - cum += "

[m_message]

" + cum += "

[m_message]

" cum += "
" cum += "" // now we need to send it to the target diff --git a/code/controllers/subsystem/datumrentals.dm b/code/controllers/subsystem/datumrentals.dm index 6abd480e93..62f166eb64 100644 --- a/code/controllers/subsystem/datumrentals.dm +++ b/code/controllers/subsystem/datumrentals.dm @@ -131,6 +131,9 @@ SUBSYSTEM_DEF(rentaldatums) var/source_ckey var/datum/preferences/prefs_override var/dummy + var/is_emote + var/partial + var/hide_name_n_verb /datum/rental_mommy/chat/copy_mommy(datum/rental_mommy/chat/mommy) if(!..()) @@ -185,6 +188,9 @@ SUBSYSTEM_DEF(rentaldatums) source_ckey = mommy.source_ckey prefs_override = mommy.prefs_override dummy = mommy.dummy + is_emote = mommy.is_emote + partial = mommy.partial + hide_name_n_verb = mommy.hide_name_n_verb /datum/rental_mommy/chat/wipe() original_message = "" @@ -237,4 +243,7 @@ SUBSYSTEM_DEF(rentaldatums) source_ckey = null prefs_override = null dummy = null + is_emote = null + partial = null + hide_name_n_verb = null diff --git a/code/datums/emotes.dm b/code/datums/emotes.dm index aa64e57526..522a3286fb 100644 --- a/code/datums/emotes.dm +++ b/code/datums/emotes.dm @@ -3,6 +3,7 @@ var/key_third_person = "" //This will also call the emote var/no_message = FALSE var/message = "" //Message displayed when emote is used + var/original_message = "" //Original message before any changes var/message_alien = "" //Message displayed if the user is a grown alien var/message_larva = "" //Message displayed if the user is an alien larva var/message_robot = "" //Message displayed if the user is a robot @@ -17,6 +18,8 @@ var/list/mob_type_blacklist_typecache //Types that are NOT allowed to use that emote var/list/mob_type_ignore_stat_typecache var/stat_allowed = SOFT_CRIT + var/mommychat = TRUE + var/mommychat_partial = TRUE var/static/list/emote_list = list() var/static/regex/stop_bad_mime = regex(@"says|exclaims|yells|asks") /// Sound to play when emote is called. @@ -89,14 +92,37 @@ msg = "[msg]" + var/datum/rental_mommy/chat/mommy = (mommychat || mommychat_partial) && (user && user.client) && BuildMommy(user, msg) if(!omit_left_name) ENABLE_BITFIELD(message_flags, PUT_NAME_IN) if(emote_type == EMOTE_AUDIBLE) - user.audible_message(msg, deaf_message = msg, audible_message_flags = message_flags, hearing_distance = message_range) + user.audible_message(msg, deaf_message = msg, audible_message_flags = message_flags, hearing_distance = message_range, data = list("mom" = mommy)) else - user.visible_message(msg, blind_message = msg, visible_message_flags = message_flags, vision_distance = message_range) + user.visible_message(msg, blind_message = msg, visible_message_flags = message_flags, vision_distance = message_range, data = list("mom" = mommy)) + if(mommy) + mommy.checkin() +// OI WHAT IF YE MUM WERE BUILT ON BA'REYS +/datum/emote/proc/BuildMommy(mob/user, message) + if(!user || !user.client) + return + var/datum/rental_mommy/chat/mommy = SSrentaldatums.CheckoutMommy("chat_datums") + if(!mommy) + return + mommy.original_message = message + mommy.message = message + mommy.original_speakername = user.name + mommy.speakername = user.name + mommy.source = user + mommy.message_mode = null // it'll be set by the chat system + mommy.message_key = null // it'll be set by the chat system + mommy.is_emote = TRUE + mommy.partial = mommychat_partial + if(mommy.partial) + mommy.hide_name_n_verb = TRUE + mommy.furry_dating_sim = TRUE + return mommy /// Sends the given emote message for all ghosts with ghost sight enabled, excluding close enough to listen normally. /mob/proc/emote_for_ghost_sight(message, admin_only, message_range) diff --git a/code/modules/mob/living/emote.dm b/code/modules/mob/living/emote.dm index d65c5c2e34..2c8fd9285b 100644 --- a/code/modules/mob/living/emote.dm +++ b/code/modules/mob/living/emote.dm @@ -665,6 +665,8 @@ key_third_person = "custom" message = null emote_type = EMOTE_VISIBLE + mommychat = TRUE + mommychat_partial = FALSE // full blown /datum/emote/living/custom/proc/check_invalid(mob/user, input) if(stop_bad_mime.Find(input, 1, 1)) @@ -692,14 +694,18 @@ message = params if(type_override) emote_type = type_override + original_message = message message = user.say_emphasis(message) var/msg_check = user.say_narrate_replace(message, user) if(msg_check) message = msg_check - omit_left_name = TRUE + else + message = "[user] [message]" // die(t) + omit_left_name = TRUE . = ..() omit_left_name = FALSE message = null + original_message = null /datum/emote/living/custom/replace_pronoun(mob/user, message) return message diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index d8262f63bc..13b5d889c3 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -582,7 +582,7 @@ return mind.get_language_holder() . = ..() -/mob/proc/should_hornify(datum/rental_mommy/chat/mommy) +/atom/proc/should_hornify(datum/rental_mommy/chat/mommy) return FALSE // quit seducing ghosts in the lobby, wacky /mob/living/should_hornify(datum/rental_mommy/chat/mommy) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm index fcff447dc8..9d244922b9 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm @@ -92,7 +92,7 @@ Difficulty: Medium return FALSE return ..() -/mob/living/simple_animal/hostile/megafauna/dragon/visible_message(message, self_message, blind_message, vision_distance = DEFAULT_MESSAGE_RANGE, list/ignored_mobs, mob/target, target_message, visible_message_flags = NONE) +/mob/living/simple_animal/hostile/megafauna/dragon/visible_message(message, self_message, blind_message, vision_distance = DEFAULT_MESSAGE_RANGE, list/ignored_mobs, mob/target, target_message, visible_message_flags = NONE, data = null) if(swooping & SWOOP_INVULNERABLE) //to suppress attack messages without overriding every single proc that could send a message saying we got hit return return ..() diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index eaa17211b8..a9bc1bd36b 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -156,7 +156,8 @@ mob/target, target_message, visible_message_flags = NONE, - pref_check + pref_check, + list/data = list() ) var/turf/T = get_turf(src) if(!T) @@ -165,6 +166,7 @@ if(!length(hearers)) // yes, hearers is correct return hearers -= ignored_mobs + var/datum/rental_mommy/chat/momchat = LAZYLEN(data) ? data["mom"] : null var/saycolor = src.get_chat_color() var/targetsaycolor = null @@ -198,6 +200,9 @@ //if(visible_message_flags & EMOTE_MESSAGE) // message = "[src] [message]" + if(momchat) + momchat.message = message + for(var/mob/M in hearers) if(!M.client) continue @@ -222,10 +227,20 @@ if(!!target) var/sanitizedtargetsaycolor = M.client.sanitize_chat_color(targetsaycolor) msg = color_keyword(msg, sanitizedtargetsaycolor, target.name) - M.show_message(msg, MSG_VISUAL, msg, MSG_AUDIBLE) + var/datum/rental_mommy/chat/yourmom + if(momchat && M.should_hornify(momchat)) + yourmom = SSrentaldatums.CheckoutMommy("chat_datums") + yourmom.copy_mommy(momchat) + yourmom.recipiant = M + yourmom.message = msg + yourmom.hide_name_n_verb = TRUE + M.show_message(msg, MSG_VISUAL, msg, MSG_AUDIBLE, momchat = yourmom) + if(yourmom) + yourmom.checkin() + momchat?.checkin() ///Adds the functionality to self_message. -/mob/visible_message(message, self_message, blind_message, vision_distance = DEFAULT_MESSAGE_RANGE, list/ignored_mobs, mob/target, target_message, visible_message_flags = NONE, pref_check) +/mob/visible_message(message, self_message, blind_message, vision_distance = DEFAULT_MESSAGE_RANGE, list/ignored_mobs, mob/target, target_message, visible_message_flags = NONE, pref_check, list/data = list()) . = ..() // if(self_message && target != src) // show_message(self_message, null, blind_message, null, pref_check) @@ -248,7 +263,8 @@ self_message, ignored_mobs, audible_message_flags = NONE, - pref_check + pref_check, + list/data = list() ) var/turf/T = get_turf(src) if(!T) @@ -267,6 +283,8 @@ //if(audible_message_flags & EMOTE_MESSAGE) // message = "[src] [message]" + var/datum/rental_mommy/chat/momchat = LAZYLEN(data) ? data["mom"] : null + var/saycolor = src.get_chat_color() for(var/mob/M in hearers) @@ -275,6 +293,13 @@ var/msg = message //if(M == src) //msg = self_message + var/datum/rental_mommy/chat/yamum = null + if(momchat && M.should_hornify(momchat)) + yamum = SSrentaldatums.CheckoutMommy("chat_datums") + yamum.copy_mommy(momchat) + yamum.recipiant = M + yamum.message = message + yamum.hide_name_n_verb = TRUE if(!M.can_hear()) msg = deaf_message if(M.client?.prefs.color_chat_log) @@ -283,7 +308,10 @@ if(audible_message_flags & EMOTE_MESSAGE && runechat_prefs_check(M, audible_message_flags)) M.create_chat_message(src, raw_message = msg, runechat_flags = audible_message_flags) if(!CHECK_BITFIELD(audible_message_flags, ONLY_OVERHEAD)) - M.show_message(msg, MSG_AUDIBLE, msg, MSG_VISUAL) + M.show_message(msg, MSG_AUDIBLE, msg, MSG_VISUAL, momchat = yamum) + if(yamum) + yamum.checkin() + momchat?.checkin() /** * Show a message to all mobs in earshot of this one @@ -297,7 +325,7 @@ * * hearing_distance (optional) is the range, how many tiles away the message can be heard. * * ignored_mobs (optional) doesn't show any message to any given mob in the list. */ -/mob/audible_message(message, deaf_message, hearing_distance = DEFAULT_MESSAGE_RANGE, self_message, list/ignored_mobs, audible_message_flags = NONE, pref_check) +/mob/audible_message(message, deaf_message, hearing_distance = DEFAULT_MESSAGE_RANGE, self_message, list/ignored_mobs, audible_message_flags = NONE, pref_check, list/data = list()) . = ..() // if(self_message) // show_message(self_message, null, deaf_message, null, pref_check) diff --git a/code/modules/mob/say_vr.dm b/code/modules/mob/say_vr.dm index bb90db99e0..7e492b1eca 100644 --- a/code/modules/mob/say_vr.dm +++ b/code/modules/mob/say_vr.dm @@ -38,6 +38,7 @@ key = "subtler" key_third_person = "subtler" subtler = TRUE + mommychat_partial = FALSE // full blown /datum/emote/living/subtle/proc/check_invalid(mob/user, input) if(stop_bad_mime.Find(input, 1, 1)) @@ -65,6 +66,8 @@ . = TRUE if(!can_run_emote(user)) return FALSE + + var/original_message = message user.log_message(message, subtler ? LOG_SUBTLER : LOG_SUBTLE) var/msg_check = user.say_narrate_replace(message, user) @@ -83,13 +86,17 @@ if(!check_rights_for(ghostie.client, R_ADMIN)) non_admin_ghosts += ghostie + var/datum/rental_mommy/chat/mommy = BuildMommy(user, message) + mommy.original_message = original_message + // Everyone in range can see it user.visible_message( message = message, blind_message = message, self_message = message, vision_distance = message_range, - ignored_mobs = non_admin_ghosts) + ignored_mobs = non_admin_ghosts, + data = list("mom" = mommy)) //broadcast to ghosts, if they have a client, are dead, arent in the lobby, allow ghostsight, and, if subtler, are admemes user.emote_for_ghost_sight(message, subtler, message_range)