Files
Bubberstation/code/_globalvars/admin.dm
Rhials 6c30e75656 Admin narrations now let you pick a text formatting span to use in your message (#84723)
## About The Pull Request

This adds a menu to all admin narrate verbs that allows you to select a
span type for your message. This includes global, direct, world, subtle,
and headset narrates.

This includes (nearly) all forms of text span. Some were not included,
like OOC announcements, centcom priority announcement headers, the span
used for hyperlink text, stuff like that. They're mostly all there, but
the stuff that probably shouldn't be showing up under a generic chat
message has been excluded. There's well over 100 of these things, so
pick whatever you want.

Due to the way this works, you can close the spans in the message
mid-string, in case you wanted to have multiple text formats in the
message. You can also just format text the old-fashioned way if you
really wanted.


![image](https://github.com/tgstation/tgstation/assets/28870487/3ef57ba8-972f-4cf6-95af-d0cfd6d7c169)

**_Fun fact -- When using admin OOC spans, the reply will copy whatever
your admin OOC color is._**

![image](https://github.com/tgstation/tgstation/assets/28870487/e9b5f7c0-5a07-49e8-bcc3-57e7adf6cf52)

Yeah I'm sure you can tell I'm a super mature person by what the test
messages I used here were. Laugh it up. Just know that I'm laughing too,
like a grade schooler who just learned their first swear words.
## Why It's Good For The Game

No more futzing about with copypastes and big long text files with the
span formatting already written out. Now, you can just pick them from a
list. Neato!

This will increase adminbus immersion by a factor of at least 3-5%
assuming all projections and the data we have been provided holds true.
## Changelog
🆑 Rhials
admin: Narrate verbs will now allow you to pick what text formatting
span you want to use before you send them, if any.
/🆑
2024-07-08 03:26:09 +00:00

151 lines
4.6 KiB
Plaintext

GLOBAL_LIST_EMPTY(stickybanadminexemptions) //stores a list of ckeys exempted from a stickyban (workaround for a bug)
GLOBAL_LIST_EMPTY(stickybanadmintexts) //stores the entire stickyban list temporarily
GLOBAL_VAR(stickbanadminexemptiontimerid) //stores the timerid of the callback that restores all stickybans after an admin joins
/proc/init_smites()
var/list/smites = list()
for (var/_smite_path in subtypesof(/datum/smite))
var/datum/smite/smite_path = _smite_path
smites[initial(smite_path.name)] = smite_path
return smites
GLOBAL_LIST_INIT_TYPED(smites, /datum/smite, init_smites())
GLOBAL_VAR_INIT(admin_notice, "") // Admin notice that all clients see when joining the server
// A list of all the special byond lists that need to be handled different by vv
GLOBAL_LIST_INIT(vv_special_lists, init_special_list_names())
/proc/init_special_list_names()
var/list/output = list()
var/obj/sacrifice = new
for(var/varname in sacrifice.vars)
var/value = sacrifice.vars[varname]
if(!islist(value))
if(!isdatum(value) && hascall(value, "Cut"))
output += varname
continue
if(isnull(locate(REF(value))))
output += varname
return output
///A giant associative list of span names, and the associated key to create the text span. Used for narrate verbs.
GLOBAL_LIST_INIT(spanname_to_formatting, list(
"Abductor" = "abductor",
"Admin" = "admin",
"Adminhelp" = "adminhelp",
"Admin Notice" = "adminnotice",
"Admin Observer OOC" = "adminobserverooc",
"Admin OOC" = "adminooc",
"Adminsay" = "adminsay",
"AI Private Radio" = "aiprivradio",
"Alert" = "alert",
"Alien Alert" = "alertalien",
"Syndie Alert" = "alertsyndie",
"Alert Warning" = "alertwarning",
"Alien" = "alien",
"Average" = "average",
"Bad" = "bad",
"Big" = "big",
"Binary Say" = "binarysay",
"Blob" = "blob",
"Blob Announce" = "blobannounce",
"Blue" = "blue",
"Blue Team Radio" = "blueteamradio",
"Bold" = "bold",
"Bold Announce" = "boldannounce",
"Bold Danger" = "bolddanger",
"Bold Italic" = "bolditalic",
"Bold Nice Green" = "boldnicegreen",
"Bold Notice" = "boldnotice",
"Bold Warning" = "boldwarning",
"Big Bold" = "big bold",
"Centcom Radio" = "centcomradio",
"Changeling" = "changeling",
"Clown" = "clown",
"Colossus" = "colossus",
"Command Headset" = "command_headset",
"Cult" = "cult",
"Cult Bold" = "cult_bold",
"Cult Bold Italic" = "cult_bold_italic",
"Cult Italic" = "cult_italic",
"Cult Large" = "cult_large",
"Danger" = "danger",
"Deadchat" = "deadsay",
"Deconversion Message" = "deconversion_message",
"Drone Radio" = "drone",
"Engineering Radio" = "engradio",
"Extremely Big" = "extremelybig",
"Game Say" = "game say",
"Ghost Alert" = "ghostalert",
"Green" = "green",
"Green Announce" = "greenannounce",
"Green Team Radio" = "greenteamradio",
"Greentext" = "greentext",
"Grey" = "grey",
"Hierophant" = "hierophant",
"Hierophant Warning" = "hierophant_warning",
"Highlight" = "highlight",
"His Grace" = "his_grace",
"Holoparasite" = "holoparasite",
"Holoparasite Bold" = "holoparasite bold",
"Hypnosis" = "hypnophrase",
"Icon" = "icon",
"Info" = "info",
"Info Plain" = "infoplain",
"Interface" = "interface",
"Looc" = "looc",
"Medal" = "medal",
"Medradio" = "medradio",
"Message" = "message",
"Mind Control" = "mind_control",
"Monkey" = "monkey",
"Narsie" = "narsie",
"Narsie Small" = "narsiesmall",
"Nice Green" = "nicegreen",
"Notice" = "notice",
"Notice Alien" = "noticealien",
"OOC" = "ooc",
"Papyrus" = "papyrus",
"Phobia" = "phobia",
"Prefix" = "prefix",
"Purple" = "purple",
"Radio" = "radio",
"Really Big" = "reallybig",
"Red" = "red",
"Red Team Radio" = "redteamradio",
"Red Text" = "redtext",
"Golem Resonate" = "resonate",
"Revenant Big Notice" = "revenbignotice",
"Revenant Bold Notice" = "revenboldnotice",
"Revenant Danger" = "revendanger",
"Revenant Minor" = "revenminor",
"Revenant Notice" = "revennotice",
"Revenant Warning" = "revenwarning",
"Robot" = "robot",
"Rose" = "rose",
"Comic Sans" = "sans",
"Science Radio" = "sciradio",
"Security Radio" = "secradio",
"Service Radio" = "servradio",
"Singing" = "singing",
"Slime" = "slime",
"Small" = "small",
"Small Notice" = "smallnotice",
"Small Notice Italic" = "smallnoticeital",
"Spider Broodmother" = "spiderbroodmother",
"Spider Scout" = "spiderscout",
"Spider Breacher" = "spiderbreacher",
"Suicide" = "suicide",
"Supply Radio" = "suppradio",
"Syndicate Radio" = "syndradio",
"Tape Recorder" = "tape_recorder",
"Tiny Notice" = "tinynotice",
"Tiny Notice Italic" = "tinynoticeital",
"Unconcious" = "unconscious",
"User Danger" = "userdanger",
"Warning" = "warning",
"Yelling" = "yell",
"Yellow Team Radio" = "yellowteamradio",
))