Files
Alexis 21b4095dfd [MDB IGNORE] [IDB IGNORE] Upstream Sync - 04/17/2026 (#5453)
Upstream 04/17/2026

fixes https://github.com/Bubberstation/Bubberstation/issues/5549

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: tgstation-ci[bot] <179393467+tgstation-ci[bot]@users.noreply.github.com>
Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Rhials <28870487+Rhials@users.noreply.github.com>
Co-authored-by: rageguy505 <54517726+rageguy505@users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Aliceee2ch <160794176+Aliceee2ch@users.noreply.github.com>
Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com>
Co-authored-by: Tsar-Salat <62388554+Tsar-Salat@users.noreply.github.com>
Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
Co-authored-by: Maxipat <108554989+Maxipat112@users.noreply.github.com>
Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com>
Co-authored-by: SimplyLogan <47579821+loganuk@users.noreply.github.com>
Co-authored-by: loganuk <fakeemail123@aol.com>
Co-authored-by: Leland Kemble <70413276+lelandkemble@users.noreply.github.com>
Co-authored-by: FalloutFalcon <86381784+FalloutFalcon@users.noreply.github.com>
Co-authored-by: Roxy <75404941+TealSeer@users.noreply.github.com>
Co-authored-by: Lucy <lucy@absolucy.moe>
Co-authored-by: siliconOpossum <138069572+siliconOpossum@users.noreply.github.com>
Co-authored-by: Isratosh <Isratosh@hotmail.com>
Co-authored-by: TheRyeGuyWhoWillNowDie <70169560+TheRyeGuyWhoWillNowDie@users.noreply.github.com>
Co-authored-by: Neocloudy <88008002+Neocloudy@users.noreply.github.com>
Co-authored-by: Alexander V. <volas@ya.ru>
Co-authored-by: ElGitificador <168473461+ElGitificador@users.noreply.github.com>
Co-authored-by: Twaticus <46540570+Twaticus@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
Co-authored-by: Tim <timothymtorres@gmail.com>
Co-authored-by: Iamgoofball <iamgoofball@gmail.com>
Co-authored-by: Layzu666 <121319428+Layzu666@users.noreply.github.com>
Co-authored-by: Arturlang <24881678+Arturlang@users.noreply.github.com>
Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com>
Co-authored-by: mrmanlikesbt <99309552+mrmanlikesbt@users.noreply.github.com>
Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
Co-authored-by: John F. Kennedy <54908920+MacaroniCritter@users.noreply.github.com>
Co-authored-by: Cursor <102828457+theselfish@users.noreply.github.com>
Co-authored-by: Josh <josh.adam.powell@gmail.com>
Co-authored-by: Josh Powell <josh.powell@softwire.com>
Co-authored-by: Yobrocharlie <Charliemiller5617@gmail.com>
Co-authored-by: Hardly3D <66234359+Hardly3D@users.noreply.github.com>
Co-authored-by: shayoki <96078776+shayoki@users.noreply.github.com>
Co-authored-by: LT3 <83487515+lessthnthree@users.noreply.github.com>
2026-05-16 00:56:00 +02:00

211 lines
10 KiB
Plaintext

// Admin Tab - Event Verbs
ADMIN_VERB_AND_CONTEXT_MENU(cmd_admin_subtle_message, R_ADMIN, "Subtle Message", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, mob/target in world)
message_admins("[key_name_admin(user)] has started answering [ADMIN_LOOKUPFLW(target)]'s prayer.")
var/msg = input(user, "Message:", "Subtle PM to [target.key]") as text|null
if(!msg)
message_admins("[key_name_admin(user)] decided not to answer [ADMIN_LOOKUPFLW(target)]'s prayer")
return
msg = user.reformat_narration(msg)
target.balloon_alert(target, "you hear a voice")
to_chat(target, "<i>You hear a voice in your head... <b>[msg]</i></b>", confidential = TRUE)
log_admin("SubtlePM: [key_name(user)] -> [key_name(target)] : [msg]")
msg = span_adminnotice("<b> SubtleMessage: [key_name_admin(user)] -> [key_name_admin(target)] :</b> [msg]")
message_admins(msg)
admin_ticket_log(target, msg)
BLACKBOX_LOG_ADMIN_VERB("Subtle Message")
ADMIN_VERB_AND_CONTEXT_MENU(cmd_admin_headset_message, R_ADMIN, "Headset Message", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, mob/target in world)
user.admin_headset_message(target)
/client/proc/admin_headset_message(mob/target in GLOB.mob_list, sender = null)
var/mob/living/carbon/human/human_recipient
var/mob/living/silicon/silicon_recipient
if(!check_rights(R_ADMIN))
return
if(ishuman(target))
human_recipient = target
if(!istype(human_recipient.ears, /obj/item/radio/headset))
to_chat(usr, "The person you are trying to contact is not wearing a headset.", confidential = TRUE)
return
else if(issilicon(target))
silicon_recipient = target
if(!istype(silicon_recipient.radio, /obj/item/radio))
to_chat(usr, "The silicon you are trying to contact does not have a radio installed.", confidential = TRUE)
return
else
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human or /mob/living/silicon", confidential = TRUE)
return
if (!sender)
sender = input("Who is the message from?", "Sender") as null|anything in list(RADIO_CHANNEL_CENTCOM,RADIO_CHANNEL_SYNDICATE)
if(!sender)
return
message_admins("[key_name_admin(src)] has started answering [key_name_admin(target)]'s [sender] request.")
var/input = input("Please enter a message to reply to [key_name(target)] via their headset.","Outgoing message from [sender]", "") as text|null
if(!input)
message_admins("[key_name_admin(src)] decided not to answer [key_name_admin(target)]'s [sender] request.")
return
input = reformat_narration(input)
log_directed_talk(mob, target, input, LOG_ADMIN, "reply")
message_admins("[key_name_admin(src)] replied to [key_name_admin(target)]'s [sender] message with: \"[input]\"")
target.balloon_alert(target, "you hear a voice")
to_chat(target, span_hear("You hear something crackle in your [human_recipient ? "ears" : "radio receiver"] for a moment before a voice speaks. \"Please stand by for a message from [sender == "Syndicate" ? "your benefactor" : "Central Command"]. Message as follows[sender == "Syndicate" ? ", agent." : ":"] <b>[input].</b> Message ends.\""), confidential = TRUE)
BLACKBOX_LOG_ADMIN_VERB("Headset Message")
ADMIN_VERB(cmd_admin_world_narrate, R_ADMIN, "Global Narrate", "Send a direct narration to all connected players.", ADMIN_CATEGORY_EVENTS)
var/msg = input(user, "Message:", "Enter the text you wish to appear to everyone:") as text|null
if (!msg)
return
msg = user.reformat_narration(msg)
to_chat(world, "[msg]", confidential = TRUE)
log_admin("GlobalNarrate: [key_name(user)] : [msg]")
message_admins(span_adminnotice("[key_name_admin(user)] Sent a global narrate"))
BLACKBOX_LOG_ADMIN_VERB("Global Narrate")
ADMIN_VERB_AND_CONTEXT_MENU(cmd_admin_local_narrate, R_ADMIN, "Local Narrate", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, atom/locale in world)
var/range = input(user, "Range:", "Narrate to mobs within how many tiles:", 7) as num|null
if(!range)
return
var/msg = input(user, "Message:", "Enter the text you wish to appear to everyone within view:") as text|null
if (!msg)
return
msg = user.reformat_narration(msg)
for(var/mob/M in view(range, locale))
to_chat(M, msg, confidential = TRUE)
log_admin("LocalNarrate: [key_name(user)] at [AREACOORD(locale)]: [msg]")
message_admins(span_adminnotice("<b> LocalNarrate: [key_name_admin(user)] at [ADMIN_VERBOSEJMP(locale)]:</b> [msg]<BR>"))
BLACKBOX_LOG_ADMIN_VERB("Local Narrate")
ADMIN_VERB_AND_CONTEXT_MENU(cmd_admin_direct_narrate, R_ADMIN, "Direct Narrate", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, mob/target)
var/msg = input(user, "Message:", "Enter the text you wish to appear to your target:") as text|null
if( !msg )
return
msg = user.reformat_narration(msg)
to_chat(target, msg, confidential = TRUE)
log_admin("DirectNarrate: [key_name(user)] to ([key_name(target)]): [msg]")
msg = span_adminnotice("<b> DirectNarrate: [key_name_admin(user)] to ([key_name_admin(target)]):</b> [msg]<BR>")
message_admins(msg)
admin_ticket_log(target, msg)
BLACKBOX_LOG_ADMIN_VERB("Direct Narrate")
ADMIN_VERB(cmd_admin_add_freeform_ai_law, R_ADMIN, "Add Custom AI Law", "Add a custom law to the Silicons.", ADMIN_CATEGORY_EVENTS)
var/input = input(user, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "") as text|null
if(!input)
return
log_admin("Admin [key_name(user)] has added a new AI law - [input]")
message_admins("Admin [key_name_admin(user)] has added a new AI law - [input]")
var/show_log = tgui_alert(user, "Show ion message?", "Message", list("Yes", "No"))
var/announce_ion_laws = (show_log == "Yes" ? 100 : 0)
var/datum/round_event/ion_storm/add_law_only/ion = new
ion.announce_chance = announce_ion_laws
ion.ionMessage = input
BLACKBOX_LOG_ADMIN_VERB("Add Custom AI Law")
ADMIN_VERB(toggle_nuke, R_DEBUG|R_ADMIN, "Toggle Nuke", "Arm or disarm a nuke.", ADMIN_CATEGORY_EVENTS)
var/list/nukes = list()
for (var/obj/machinery/nuclearbomb/bomb in world)
nukes += bomb
var/obj/machinery/nuclearbomb/nuke = tgui_input_list(user, "", "Toggle Nuke", nukes)
if (isnull(nuke))
return
if(!nuke.timing)
var/newtime = tgui_input_number(user, "Set activation timer.", "Activate Nuke", nuke.timer_set)
if(!newtime)
return
nuke.timer_set = newtime
nuke.toggle_nuke_safety()
nuke.toggle_nuke_armed()
log_admin("[key_name(user)] [nuke.timing ? "activated" : "deactivated"] a nuke at [AREACOORD(nuke)].")
message_admins("[ADMIN_LOOKUPFLW(user)] [nuke.timing ? "activated" : "deactivated"] a nuke at [ADMIN_VERBOSEJMP(nuke)].")
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Nuke", "[nuke.timing]")) // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
ADMIN_VERB(change_sec_level, R_ADMIN, "Set Security Level", "Changes the security level. Announcement effects only.", ADMIN_CATEGORY_EVENTS)
var/level = tgui_input_list(user, "Select Security Level:", "Set Security Level", SSsecurity_level.available_levels)
if(!level)
return
SSsecurity_level.set_level(level)
log_admin("[key_name(user)] changed the security level to [level]")
message_admins("[key_name_admin(user)] changed the security level to [level]")
BLACKBOX_LOG_ADMIN_VERB("Set Security Level [capitalize(level)]")
ADMIN_VERB(command_report_footnote, R_FUN, "Command Report Footnote", "Adds a footnote to the roundstart command report.", ADMIN_CATEGORY_EVENTS)
var/datum/command_footnote/command_report_footnote = new /datum/command_footnote()
GLOB.communications_controller.block_command_report += 1 //Add a blocking condition to the counter until the inputs are done.
command_report_footnote.message = tgui_input_text(
user,
"This message will be attached to the bottom of the roundstart threat report.",
"P.S.",
)
if(!command_report_footnote.message)
GLOB.communications_controller.block_command_report -= 1
qdel(command_report_footnote)
return
command_report_footnote.signature = tgui_input_text(
user,
"Whose signature will appear on this footnote?",
"Also sign here, here, aaand here.",
)
if(!command_report_footnote.signature)
command_report_footnote.signature = "Classified"
GLOB.communications_controller.command_report_footnotes += command_report_footnote
GLOB.communications_controller.block_command_report -= 1
message_admins("[user] has added a footnote to the command report: [command_report_footnote.message], signed [command_report_footnote.signature]")
/datum/command_footnote
var/message
var/signature
ADMIN_VERB(command_report_content, R_FUN, "Command Report Content", "Sets the main content of the roundstart command report.", ADMIN_CATEGORY_EVENTS)
GLOB.communications_controller.block_command_report += 1
GLOB.communications_controller.command_report_main_content = tgui_input_text(
user,
"This message will be the main content of the roundstart command report, above the threat report (if enabled).",
"To Whom It May Concern",
)
GLOB.communications_controller.block_command_report -= 1
message_admins("[key_name_admin(user)] has [GLOB.communications_controller.command_report_main_content ? "set" : "cleared"] the main content of the roundstart command report.")
ADMIN_VERB(delay_command_report, R_FUN, "Delay Command Report", "Prevents the roundstart command report from being sent; or forces it to send it delayed.", ADMIN_CATEGORY_EVENTS)
GLOB.communications_controller.block_command_report = !GLOB.communications_controller.block_command_report
message_admins("[key_name_admin(user)] has [(GLOB.communications_controller.block_command_report ? "delayed" : "sent")] the roundstart command report.")
///Reformats a narration message. First provides a prompt asking if the user wants to reformat their message, then allows them to pick from a list of spans to use.
/client/proc/reformat_narration(input)
if(tgui_alert(mob, "Set a custom text format?", "Make it snazzy!", list("Yes", "No")) == "Yes")
var/text_span = tgui_input_list(mob, "Select a span!", "Immersion! Yeah!", GLOB.spanname_to_formatting)
if(isnull(text_span)) //In case the user just quit the prompt.
return text_span
text_span = GLOB.spanname_to_formatting[text_span]
input = "<span class='[text_span]'>" + input + "</span>"
return input