diff --git a/code/datums/chatmessage.dm b/code/datums/chatmessage.dm index 234eb1849c5..523543bc5a6 100644 --- a/code/datums/chatmessage.dm +++ b/code/datums/chatmessage.dm @@ -141,7 +141,10 @@ var/tgt_color = extra_classes.Find("italics") ? target.chat_color_darkened : target.chat_color // Approximate text height - var/complete_text = "[text]" + //SKYRAT EDIT CHANGE - ADMIN + //var/complete_text = "[text]" - ORIGINAL + var/complete_text = "[owner.say_emphasis(text)]" + //SKYRAT EDIT END var/mheight = WXH_TO_HEIGHT(owned_by.MeasureText(complete_text, null, CHAT_MESSAGE_WIDTH)) approx_lines = max(1, mheight / CHAT_MESSAGE_APPROX_LHEIGHT) diff --git a/code/game/say.dm b/code/game/say.dm index cddf4a41fa9..1f8a07d52f6 100644 --- a/code/game/say.dm +++ b/code/game/say.dm @@ -58,8 +58,10 @@ GLOBAL_LIST_INIT(freqtospan, list( var/endspanpart = "" //Message - var/messagepart = " [lang_treat(speaker, message_language, raw_message, spans, message_mods)]" - + //SKYRAT EDIT CHANGE - EMOTES + // var/messagepart = " [lang_treat(speaker, message_language, raw_message, spans, message_mods)]" - ORIGINAL + var/messagepart = " [say_emphasis(lang_treat(speaker, message_language, raw_message, spans, message_mods))]" + //SKYRAT EDIT END var/languageicon = "" var/datum/language/D = GLOB.language_datum_instances[message_language] if(istype(D) && D.display_icon(src)) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 7db3058e2b5..0f83b9798d6 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -6,6 +6,7 @@ GLOBAL_PROTECT(admin_verbs_default) return list( /client/proc/deadmin, /*destroys our own admin datum so we can play as a regular player*/ /client/proc/cmd_admin_say, /*admin-only ooc chat*/ + /client/proc/cmd_loud_admin_say, /*ditto except its annoying - SKYRAT EDIT ADDITION - ADMIN*/ /client/proc/hide_verbs, /*hides all our adminverbs*/ /client/proc/debug_variables, /*allows us to -see- the variables of any instance in the game. +VAREDIT needed to modify*/ /client/proc/dsay, /*talk in deadchat using our ckey/fakekey*/ diff --git a/code/modules/mob/living/emote.dm b/code/modules/mob/living/emote.dm index 8d5a223dca8..8f5dca7508d 100644 --- a/code/modules/mob/living/emote.dm +++ b/code/modules/mob/living/emote.dm @@ -451,6 +451,7 @@ message = params if(type_override) emote_type = type_override + message = user.say_emphasis(message) //SKYRAT EDIT ADDITION - EMOTES . = ..() message = null emote_type = EMOTE_VISIBLE diff --git a/modular_skyrat/modules/admin/admin_say.dm b/modular_skyrat/modules/admin/admin_say.dm new file mode 100644 index 00000000000..0953a2652d0 --- /dev/null +++ b/modular_skyrat/modules/admin/admin_say.dm @@ -0,0 +1,29 @@ +/client/proc/cmd_loud_admin_say(msg as text) + set category = "Admin" + set name = "Loud Asay" + set hidden = TRUE + if(!check_rights(0)) + return + + msg = emoji_parse(copytext_char(sanitize(msg), 1, MAX_MESSAGE_LEN)) + if(!msg) + return + + msg = emoji_parse(msg) + mob.log_talk(msg, LOG_ASAY) + + msg = keywords_lookup(msg) + var/custom_asay_color = (CONFIG_GET(flag/allow_admin_asaycolor) && prefs.asaycolor) ? "" : "" + msg = " ADMIN: [key_name(usr, 1)] [ADMIN_FLW(mob)]: [custom_asay_color][msg][custom_asay_color ? "":null]" + to_chat(GLOB.admins, + type = MESSAGE_TYPE_ADMINCHAT, + html = msg, + confidential = TRUE) + + for(var/client/I in GLOB.admins) + if(I.prefs.toggles & SOUND_ADMINHELP) + SEND_SOUND(I, sound('sound/effects/huuu.ogg')) //Stop using loud mode if you don't need to. + window_flash(I, ignorepref = TRUE) + + SSblackbox.record_feedback("tally", "admin_verb", 1, "loudAsay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + diff --git a/modular_skyrat/modules/admin/readme.md b/modular_skyrat/modules/admin/readme.md new file mode 100644 index 00000000000..34b14177194 --- /dev/null +++ b/modular_skyrat/modules/admin/readme.md @@ -0,0 +1,32 @@ +https://github.com/Skyrat-SS13/Skyrat-tg/pulls + +## Title: Admin + +MODULE ID: ADMIN + +### Description: + +Adds multuple admin features, loud asay. As well as bold/itallics/underline. + +### TG Proc Changes: + +- code\datums\chatmessage.dm > /datum/chatmessage/proc/generate_image +- code\game\say.dm > /atom/movable/proc/compose_message +- code\modules\admin\admin_verbs.dm +- code\modules\mob\living\emote.dm > /datum/emote/living/custom/run_emote + +### Defines: + +- N/A + +### Master file additions + +- N/A + +### Included files that are not contained in this module: + +- N/A + +### Credits: +Gandalf2k15 - Porting and Refactoring +Akrilla - OG code diff --git a/tgstation.dme b/tgstation.dme index fbd63cf3c6d..e1b84670432 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -3252,6 +3252,7 @@ #include "modular_skyrat\master_files\code\modules\clothing\anthro_clothes.dm" #include "modular_skyrat\master_files\code\modules\clothing\non_anthro_clothes.dm" #include "modular_skyrat\master_files\code\modules\power\lighting.dm" +#include "modular_skyrat\modules\admin\admin_say.dm" #include "modular_skyrat\modules\altborgs\code\game\objects\items\robot_items.dm" #include "modular_skyrat\modules\altborgs\code\modules\mob\living\silicon\robot\inventory.dm" #include "modular_skyrat\modules\altborgs\code\modules\mob\living\silicon\robot\robot.dm"