Refactors most spans into span procs (#59645)

Converts most spans into span procs. Mostly used regex for this and sorted out any compile time errors afterwards so there could be some bugs.
Was initially going to do defines, but ninja said to make it into a proc, and if there's any overhead, they can easily be changed to defines.

Makes it easier to control the formatting and prevents typos when creating spans as it'll runtime if you misspell instead of silently failing.
Reduces the code you need to write when writing spans, as you don't need to close the span as that's automatically handled by the proc.

(Note from Lemon: This should be converted to defines once we update the minimum version to 514. Didn't do it now because byond pain and such)
This commit is contained in:
Watermelon914
2021-06-14 21:03:53 +01:00
committed by GitHub
parent b9982f6970
commit 375a20e49b
1676 changed files with 15455 additions and 15226 deletions
+15 -15
View File
@@ -203,7 +203,7 @@
/client/proc/SDQL2_query(query_text as message)
set category = "Debug"
if(!check_rights(R_DEBUG)) //Shouldn't happen... but just to be safe.
message_admins("<span class='danger'>ERROR: Non-admin [key_name(usr)] attempted to execute a SDQL query!</span>")
message_admins(span_danger("ERROR: Non-admin [key_name(usr)] attempted to execute a SDQL query!"))
log_admin("Non-admin [key_name(usr)] attempted to execute a SDQL query!")
return FALSE
var/list/results = world.SDQL2_query(query_text, key_name_admin(usr), "[key_name(usr)]")
@@ -248,7 +248,7 @@
running += query
var/msg = "Starting query #[query.id] - [query.get_query_text()]."
if(usr)
to_chat(usr, "<span class='admin'>[msg]</span>", confidential = TRUE)
to_chat(usr, span_admin("[msg]"), confidential = TRUE)
log_admin(msg)
query.ARun()
else //Start all
@@ -256,7 +256,7 @@
running += query
var/msg = "Starting query #[query.id] - [query.get_query_text()]."
if(usr)
to_chat(usr, "<span class='admin'>[msg]</span>", confidential = TRUE)
to_chat(usr, span_admin("[msg]"), confidential = TRUE)
log_admin(msg)
query.ARun()
@@ -277,7 +277,7 @@
finished = FALSE
if(query.state == SDQL2_STATE_ERROR)
if(usr)
to_chat(usr, "<span class='admin'>SDQL query [query.get_query_text()] errored. It will NOT be automatically garbage collected. Please remove manually.</span>", confidential = TRUE)
to_chat(usr, span_admin("SDQL query [query.get_query_text()] errored. It will NOT be automatically garbage collected. Please remove manually."), confidential = TRUE)
running -= query
else
if(query.finished)
@@ -294,19 +294,19 @@
running += next_query
var/msg = "Starting query #[next_query.id] - [next_query.get_query_text()]."
if(usr)
to_chat(usr, "<span class='admin'>[msg]</span>", confidential = TRUE)
to_chat(usr, span_admin("[msg]"), confidential = TRUE)
log_admin(msg)
next_query.ARun()
else
if(usr)
to_chat(usr, "<span class='admin'>SDQL query [query.get_query_text()] was halted. It will NOT be automatically garbage collected. Please remove manually.</span>", confidential = TRUE)
to_chat(usr, span_admin("SDQL query [query.get_query_text()] was halted. It will NOT be automatically garbage collected. Please remove manually."), confidential = TRUE)
running -= query
while(!finished)
var/end_time_total = REALTIMEOFDAY - start_time_total
return list("<span class='admin'>SDQL query combined results: [query_text]</span>",\
"<span class='admin'>SDQL query completed: [objs_all] objects selected by path, and [selectors_used ? objs_eligible : objs_all] objects executed on after WHERE filtering/MAPping if applicable.</span>",\
"<span class='admin'>SDQL combined querys took [DisplayTimeText(end_time_total)] to complete.</span>") + combined_refs
return list(span_admin("SDQL query combined results: [query_text]"),\
span_admin("SDQL query completed: [objs_all] objects selected by path, and [selectors_used ? objs_eligible : objs_all] objects executed on after WHERE filtering/MAPping if applicable."),\
span_admin("SDQL combined querys took [DisplayTimeText(end_time_total)] to complete.")) + combined_refs
GLOBAL_LIST_INIT(sdql2_queries, GLOB.sdql2_queries || list())
GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/sdql2_vv_all, new(null, "VIEW VARIABLES (all)", null))
@@ -860,7 +860,7 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/sdql2_vv_all, new(null
if("or", "||")
result = (result || val)
else
to_chat(usr, "<span class='danger'>SDQL2: Unknown op [op]</span>", confidential = TRUE)
to_chat(usr, span_danger("SDQL2: Unknown op [op]"), confidential = TRUE)
result = null
else
result = val
@@ -970,7 +970,7 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/sdql2_vv_all, new(null
querys[querys_pos] = parsed_tree
querys_pos++
else //There was an error so don't run anything, and tell the user which query has errored.
to_chat(usr, "<span class='danger'>Parsing error on [querys_pos]\th query. Nothing was executed.</span>", confidential = TRUE)
to_chat(usr, span_danger("Parsing error on [querys_pos]\th query. Nothing was executed."), confidential = TRUE)
return list()
query_tree = list()
do_parse = 0
@@ -1016,16 +1016,16 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/sdql2_vv_all, new(null
D = object
if (object == world && (!long || expression[start + 1] == ".") && !(expression[start] in exclude) && copytext(expression[start], 1, 3) != "SS") //3 == length("SS") + 1
to_chat(usr, "<span class='danger'>World variables are not allowed to be accessed. Use global.</span>", confidential = TRUE)
to_chat(usr, span_danger("World variables are not allowed to be accessed. Use global."), confidential = TRUE)
return null
else if(expression [start] == "{" && long)
if(lowertext(copytext(expression[start + 1], 1, 3)) != "0x") //3 == length("0x") + 1
to_chat(usr, "<span class='danger'>Invalid pointer syntax: [expression[start + 1]]</span>", confidential = TRUE)
to_chat(usr, span_danger("Invalid pointer syntax: [expression[start + 1]]"), confidential = TRUE)
return null
v = locate("\[[expression[start + 1]]]")
if(!v)
to_chat(usr, "<span class='danger'>Invalid pointer: [expression[start + 1]]</span>", confidential = TRUE)
to_chat(usr, span_danger("Invalid pointer: [expression[start + 1]]"), confidential = TRUE)
return null
start++
long = start < expression.len
@@ -1088,7 +1088,7 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/sdql2_vv_all, new(null
var/list/L = v
var/index = query.SDQL_expression(source, expression[start + 2])
if(isnum(index) && (!ISINTEGER(index) || L.len < index))
to_chat(usr, "<span class='danger'>Invalid list index: [index]</span>", confidential = TRUE)
to_chat(usr, span_danger("Invalid list index: [index]"), confidential = TRUE)
return null
return L[index]
return v
@@ -63,7 +63,7 @@
/datum/sdql_parser/proc/parse_error(error_message)
error = 1
to_chat(usr, "<span class='warning'>SDQL2 Parsing Error: [error_message]</span>", confidential = TRUE)
to_chat(usr, span_warning("SDQL2 Parsing Error: [error_message]"), confidential = TRUE)
return query.len + 1
/datum/sdql_parser/proc/parse()
@@ -213,7 +213,7 @@
var/datum/give_sdql_spell/ui = new(usr, target)
ui.ui_interact(usr)
else
to_chat(usr, "<span class='warning'>SDQL spells are disabled.</span>")
to_chat(usr, span_warning("SDQL spells are disabled."))
/datum/give_sdql_spell
@@ -306,7 +306,7 @@
/datum/give_sdql_spell/New(_user, target)
if(!CONFIG_GET(flag/sdql_spells))
to_chat(_user, "<span class='warning'>SDQL spells are disabled.</span>")
to_chat(_user, span_warning("SDQL spells are disabled."))
qdel(src)
return
user = CLIENT_FROM_VAR(_user)
@@ -845,4 +845,4 @@
target_mob.mind.AddSpell(new_spell)
else
target_mob.AddSpell(new_spell)
to_chat(user, "<span class='danger'>Spells given to mindless mobs will not be transferred in mindswap or cloning!</span>")
to_chat(user, span_danger("Spells given to mindless mobs will not be transferred in mindswap or cloning!"))
+10 -10
View File
@@ -83,7 +83,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
dat += "<A href='?_src_=holder;[HrefToken()];ahelp_tickets=[state]'>Refresh</A><br><br>"
for(var/I in l2b)
var/datum/admin_help/AH = I
dat += "<span class='adminnotice'><span class='adminhelp'>Ticket #[AH.id]</span>: <A href='?_src_=holder;[HrefToken()];ahelp=[REF(AH)];ahelp_action=ticket'>[AH.initiator_key_name]: [AH.name]</A></span><br>"
dat += "[span_adminnotice("[span_adminhelp("Ticket #[AH.id]")]: <A href='?_src_=holder;[HrefToken()];ahelp=[REF(AH)];ahelp_action=ticket'>[AH.initiator_key_name]: [AH.name]</A>")]<br>"
usr << browse(dat.Join(), "window=ahelp_list[state];size=600x480")
@@ -211,7 +211,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
var/admin_number_present = send2tgs_adminless_only(initiator_ckey, "Ticket #[id]: [msg]")
log_admin_private("Ticket #[id]: [key_name(initiator)]: [name] - heard by [admin_number_present] non-AFK admins who have +BAN.")
if(admin_number_present <= 0)
to_chat(C, "<span class='notice'>No active admins are online, your adminhelp was sent through TGS to admins who are available. This may use IRC or Discord.</span>", confidential = TRUE)
to_chat(C, span_notice("No active admins are online, your adminhelp was sent through TGS to admins who are available. This may use IRC or Discord."), confidential = TRUE)
heard_by_no_admins = TRUE
GLOB.ahelp_tickets.active_tickets += src
@@ -267,7 +267,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
msg = sanitize(copytext_char(msg, 1, MAX_MESSAGE_LEN))
var/ref_src = "[REF(src)]"
//Message to be sent to all admins
var/admin_msg = "<span class='adminnotice'><span class='adminhelp'>Ticket [TicketHref("#[id]", ref_src)]</span><b>: [LinkedReplyName(ref_src)] [FullMonty(ref_src)]:</b> <span class='linkify'>[keywords_lookup(msg)]</span></span>"
var/admin_msg = span_adminnotice(span_adminhelp("Ticket [TicketHref("#[id]", ref_src)]</span><b>: [LinkedReplyName(ref_src)] [FullMonty(ref_src)]:</b> <span class='linkify'>[keywords_lookup(msg)]"))
AddInteraction("<font color='red'>[LinkedReplyName(ref_src)]: [msg]</font>")
log_admin_private("Ticket #[id]: [key_name(initiator)]: [msg]")
@@ -285,18 +285,18 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
//show it to the person adminhelping too
to_chat(initiator,
type = MESSAGE_TYPE_ADMINPM,
html = "<span class='adminnotice'>PM to-<b>Admins</b>: <span class='linkify'>[msg]</span></span>",
html = span_adminnotice("PM to-<b>Admins</b>: <span class='linkify'>[msg]</span>"),
confidential = TRUE)
SSblackbox.LogAhelp(id, "Ticket Opened", msg, null, initiator.ckey)
//Reopen a closed ticket
/datum/admin_help/proc/Reopen()
if(state == AHELP_ACTIVE)
to_chat(usr, "<span class='warning'>This ticket is already open.</span>", confidential = TRUE)
to_chat(usr, span_warning("This ticket is already open."), confidential = TRUE)
return
if(GLOB.ahelp_tickets.CKey2ActiveTicket(initiator_ckey))
to_chat(usr, "<span class='warning'>This user already has an active ticket, cannot reopen this one.</span>", confidential = TRUE)
to_chat(usr, span_warning("This user already has an active ticket, cannot reopen this one."), confidential = TRUE)
return
statclick = new(null, src)
@@ -314,7 +314,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
initiator.current_ticket = src
AddInteraction("<font color='purple'>Reopened by [key_name_admin(usr)]</font>")
var/msg = "<span class='adminhelp'>Ticket [TicketHref("#[id]")] reopened by [key_name_admin(usr)].</span>"
var/msg = span_adminhelp("Ticket [TicketHref("#[id]")] reopened by [key_name_admin(usr)].")
message_admins(msg)
log_admin_private(msg)
SSblackbox.LogAhelp(id, "Reopened", "Reopened by [usr.key]", usr.ckey)
@@ -357,7 +357,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
addtimer(CALLBACK(initiator, /client/proc/giveadminhelpverb), 50)
AddInteraction("<font color='green'>Resolved by [key_name].</font>")
to_chat(initiator, "<span class='adminhelp'>Your ticket has been resolved by an admin. The Adminhelp verb will be returned to you shortly.</span>", confidential = TRUE)
to_chat(initiator, span_adminhelp("Your ticket has been resolved by an admin. The Adminhelp verb will be returned to you shortly."), confidential = TRUE)
if(!silent)
SSblackbox.record_feedback("tally", "ahelp_stats", 1, "resolved")
var/msg = "Ticket [TicketHref("#[id]")] resolved by [key_name]"
@@ -509,12 +509,12 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
set name = "Adminhelp"
if(GLOB.say_disabled) //This is here to try to identify lag problems
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>", confidential = TRUE)
to_chat(usr, span_danger("Speech is currently admin-disabled."), confidential = TRUE)
return
//handle muting and automuting
if(prefs.muted & MUTE_ADMINHELP)
to_chat(src, "<span class='danger'>Error: Admin-PM: You cannot send adminhelps (Muted).</span>", confidential = TRUE)
to_chat(src, span_danger("Error: Admin-PM: You cannot send adminhelps (Muted)."), confidential = TRUE)
return
if(handle_spam_prevention(msg,MUTE_ADMINHELP))
return
+28 -28
View File
@@ -7,7 +7,7 @@
if(!holder)
to_chat(src,
type = MESSAGE_TYPE_ADMINPM,
html = "<span class='danger'>Error: Admin-PM-Context: Only administrators may use this command.</span>",
html = span_danger("Error: Admin-PM-Context: Only administrators may use this command."),
confidential = TRUE)
return
if(!ismob(M) || !M.client)
@@ -22,7 +22,7 @@
if(!holder)
to_chat(src,
type = MESSAGE_TYPE_ADMINPM,
html = "<span class='danger'>Error: Admin-PM-Panel: Only administrators may use this command.</span>",
html = span_danger("Error: Admin-PM-Panel: Only administrators may use this command."),
confidential = TRUE)
return
var/list/client/targets[0]
@@ -44,7 +44,7 @@
if(prefs.muted & MUTE_ADMINHELP)
to_chat(src,
type = MESSAGE_TYPE_ADMINPM,
html = "<span class='danger'>Error: Admin-PM: You are unable to use admin PM-s (muted).</span>",
html = span_danger("Error: Admin-PM: You are unable to use admin PM-s (muted)."),
confidential = TRUE)
return
var/client/C
@@ -58,7 +58,7 @@
if(holder)
to_chat(src,
type = MESSAGE_TYPE_ADMINPM,
html = "<span class='danger'>Error: Admin-PM: Client not found.</span>",
html = span_danger("Error: Admin-PM: Client not found."),
confidential = TRUE)
return
@@ -76,11 +76,11 @@
else
to_chat(src,
type = MESSAGE_TYPE_ADMINPM,
html = "<span class='danger'>Error: Admin-PM: Client not found.</span>",
html = span_danger("Error: Admin-PM: Client not found."),
confidential = TRUE)
to_chat(src,
type = MESSAGE_TYPE_ADMINPM,
html = "<span class='danger'><b>Message not sent:</b></span><br>[msg]",
html = "[span_danger("<b>Message not sent:</b>")]<br>[msg]",
confidential = TRUE)
AH.AddInteraction("<b>No client found, message not sent:</b><br>[msg]")
return
@@ -92,18 +92,18 @@
if(prefs.muted & MUTE_ADMINHELP)
to_chat(src,
type = MESSAGE_TYPE_ADMINPM,
html = "<span class='danger'>Error: Admin-PM: You are unable to use admin PM-s (muted).</span>",
html = span_danger("Error: Admin-PM: You are unable to use admin PM-s (muted)."),
confidential = TRUE)
return
if(!holder && !current_ticket) //no ticket? https://www.youtube.com/watch?v=iHSPf6x1Fdo
to_chat(src,
type = MESSAGE_TYPE_ADMINPM,
html = "<span class='danger'>You can no longer reply to this ticket, please open another one by using the Adminhelp verb if need be.</span>",
html = span_danger("You can no longer reply to this ticket, please open another one by using the Adminhelp verb if need be."),
confidential = TRUE)
to_chat(src,
type = MESSAGE_TYPE_ADMINPM,
html = "<span class='notice'>Message: [msg]</span>",
html = span_notice("Message: [msg]"),
confidential = TRUE)
return
@@ -124,7 +124,7 @@
if(!recipient)
to_chat(src,
type = MESSAGE_TYPE_ADMINPM,
html = "<span class='danger'>Error: Admin-PM: Client not found.</span>",
html = span_danger("Error: Admin-PM: Client not found."),
confidential = TRUE)
return
@@ -142,7 +142,7 @@
if(holder)
to_chat(src,
type = MESSAGE_TYPE_ADMINPM,
html = "<span class='danger'>Error: Use the admin IRC/Discord channel, nerd.</span>",
html = span_danger("Error: Use the admin IRC/Discord channel, nerd."),
confidential = TRUE)
return
@@ -162,11 +162,11 @@
if(holder)
to_chat(src,
type = MESSAGE_TYPE_ADMINPM,
html = "<span class='danger'>Error: Admin-PM: Client not found.</span>",
html = span_danger("Error: Admin-PM: Client not found."),
confidential = TRUE)
to_chat(src,
type = MESSAGE_TYPE_ADMINPM,
html = "<span class='danger'><b>Message not sent:</b></span><br>[msg]",
html = "[span_danger("<b>Message not sent:</b>")]<br>[msg]",
confidential = TRUE)
if(recipient_ticket)
recipient_ticket.AddInteraction("<b>No client found, message not sent:</b><br>[msg]")
@@ -179,7 +179,7 @@
if(prefs.muted & MUTE_ADMINHELP)
to_chat(src,
type = MESSAGE_TYPE_ADMINPM,
html = "<span class='danger'>Error: Admin-PM: You are unable to use admin PM-s (muted).</span>",
html = span_danger("Error: Admin-PM: You are unable to use admin PM-s (muted)."),
confidential = TRUE)
return
@@ -202,7 +202,7 @@
if(external)
to_chat(src,
type = MESSAGE_TYPE_ADMINPM,
html = "<span class='notice'>PM to-<b>Admins</b>: <span class='linkify'>[rawmsg]</span></span>",
html = span_notice("PM to-<b>Admins</b>: <span class='linkify'>[rawmsg]</span>"),
confidential = TRUE)
var/datum/admin_help/AH = admin_ticket_log(src, "<font color='red'>Reply PM from-<b>[key_name(src, TRUE, TRUE)]</b> to <i>External</i>: [keywordparsedmsg]</font>")
externalreplyamount--
@@ -215,11 +215,11 @@
if(holder)
to_chat(recipient,
type = MESSAGE_TYPE_ADMINPM,
html = "<span class='danger'>Admin PM from-<b>[key_name(src, recipient, 1)]</b>: <span class='linkify'>[keywordparsedmsg]</span></span>",
html = span_danger("Admin PM from-<b>[key_name(src, recipient, 1)]</b>: <span class='linkify'>[keywordparsedmsg]</span>"),
confidential = TRUE)
to_chat(src,
type = MESSAGE_TYPE_ADMINPM,
html = "<span class='notice'>Admin PM to-<b>[key_name(recipient, src, 1)]</b>: <span class='linkify'>[keywordparsedmsg]</span></span>",
html = span_notice("Admin PM to-<b>[key_name(recipient, src, 1)]</b>: <span class='linkify'>[keywordparsedmsg]</span>"),
confidential = TRUE)
//omg this is dumb, just fill in both their tickets
var/interaction_message = "<font color='purple'>PM from-<b>[key_name(src, recipient, 1)]</b> to-<b>[key_name(recipient, src, 1)]</b>: [keywordparsedmsg]</font>"
@@ -232,11 +232,11 @@
admin_ticket_log(src, "<font color='red'>[replymsg]</font>")
to_chat(recipient,
type = MESSAGE_TYPE_ADMINPM,
html = "<span class='danger'>[replymsg]</span>",
html = span_danger("[replymsg]"),
confidential = TRUE)
to_chat(src,
type = MESSAGE_TYPE_ADMINPM,
html = "<span class='notice'>PM to-<b>Admins</b>: <span class='linkify'>[msg]</span></span>",
html = span_notice("PM to-<b>Admins</b>: <span class='linkify'>[msg]</span>"),
confidential = TRUE)
SSblackbox.LogAhelp(current_ticket.id, "Reply", msg, recipient.ckey, src.ckey)
@@ -258,15 +258,15 @@
confidential = TRUE)
to_chat(recipient,
type = MESSAGE_TYPE_ADMINPM,
html = "<span class='adminsay'>Admin PM from-<b>[key_name(src, recipient, 0)]</b>: <span class='linkify'>[msg]</span></span>",
html = span_adminsay("Admin PM from-<b>[key_name(src, recipient, 0)]</b>: <span class='linkify'>[msg]</span>"),
confidential = TRUE)
to_chat(recipient,
type = MESSAGE_TYPE_ADMINPM,
html = "<span class='adminsay'><i>Click on the administrator's name to reply.</i></span>",
html = span_adminsay("<i>Click on the administrator's name to reply.</i>"),
confidential = TRUE)
to_chat(src,
type = MESSAGE_TYPE_ADMINPM,
html = "<span class='notice'>Admin PM to-<b>[key_name(recipient, src, 1)]</b>: <span class='linkify'>[msg]</span></span>",
html = span_notice("Admin PM to-<b>[key_name(recipient, src, 1)]</b>: <span class='linkify'>[msg]</span>"),
confidential = TRUE)
admin_ticket_log(recipient, "<font color='purple'>PM From [key_name_admin(src)]: [keywordparsedmsg]</font>")
@@ -285,11 +285,11 @@
if(!current_ticket)
to_chat(src,
type = MESSAGE_TYPE_ADMINPM,
html = "<span class='danger'>Error: Admin-PM: Non-admin to non-admin PM communication is forbidden.</span>",
html = span_danger("Error: Admin-PM: Non-admin to non-admin PM communication is forbidden."),
confidential = TRUE)
to_chat(src,
type = MESSAGE_TYPE_ADMINPM,
html = "<span class='danger'><b>Message not sent:</b></span><br>[msg]",
html = "[span_danger("<b>Message not sent:</b>")]<br>[msg]",
confidential = TRUE)
return
current_ticket.MessageNoRecipient(msg)
@@ -299,7 +299,7 @@
for(var/client/X in GLOB.admins)
to_chat(X,
type = MESSAGE_TYPE_ADMINPM,
html = "<span class='notice'><B>PM: [key_name(src, X, 0)]-&gt;External:</B> [keywordparsedmsg]</span>",
html = span_notice("<B>PM: [key_name(src, X, 0)]-&gt;External:</B> [keywordparsedmsg]"),
confidential = TRUE)
else
window_flash(recipient, ignorepref = TRUE)
@@ -309,7 +309,7 @@
if(X.key!=key && X.key!=recipient.key) //check client/X is an admin and isn't the sender or recipient
to_chat(X,
type = MESSAGE_TYPE_ADMINPM,
html = "<span class='notice'><B>PM: [key_name(src, X, 0)]-&gt;[key_name(recipient, X, 0)]:</B> [keywordparsedmsg]</span>" ,
html = span_notice("<B>PM: [key_name(src, X, 0)]-&gt;[key_name(recipient, X, 0)]:</B> [keywordparsedmsg]") ,
confidential = TRUE)
/client/proc/popup_admin_pm(client/recipient, msg)
@@ -406,11 +406,11 @@
confidential = TRUE)
to_chat(C,
type = MESSAGE_TYPE_ADMINPM,
html = "<span class='adminsay'>Admin PM from-<b><a href='?priv_msg=[stealthkey]'>[adminname]</A></b>: [msg]</span>",
html = span_adminsay("Admin PM from-<b><a href='?priv_msg=[stealthkey]'>[adminname]</A></b>: [msg]"),
confidential = TRUE)
to_chat(C,
type = MESSAGE_TYPE_ADMINPM,
html = "<span class='adminsay'><i>Click on the administrator's name to reply.</i></span>",
html = span_adminsay("<i>Click on the administrator's name to reply.</i>"),
confidential = TRUE)
admin_ticket_log(C, "<font color='purple'>PM From [tgs_tagged]: [msg]</font>")
+1 -1
View File
@@ -12,7 +12,7 @@
mob.log_talk(msg, LOG_ASAY)
msg = keywords_lookup(msg)
var/custom_asay_color = (CONFIG_GET(flag/allow_admin_asaycolor) && prefs.asaycolor) ? "<font color=[prefs.asaycolor]>" : "<font color='#FF4500'>"
msg = "<span class='adminsay'><span class='prefix'>ADMIN:</span> <EM>[key_name(usr, 1)]</EM> [ADMIN_FLW(mob)]: [custom_asay_color]<span class='message linkify'>[msg]</span></span>[custom_asay_color ? "</font>":null]"
msg = "[span_adminsay("[span_prefix("ADMIN:")] <EM>[key_name(usr, 1)]</EM> [ADMIN_FLW(mob)]: [custom_asay_color]<span class='message linkify'>[msg]")]</span>[custom_asay_color ? "</font>":null]"
to_chat(GLOB.admins,
type = MESSAGE_TYPE_ADMINCHAT,
html = msg,
+1 -1
View File
@@ -45,4 +45,4 @@ GLOBAL_DATUM(triple_ai_controller, /datum/triple_ai_controller)
else
QDEL_NULL(GLOB.triple_ai_controller)
to_chat(usr, "There will[GLOB.triple_ai_controller ? "" : "not"] be an AI Triumvirate at round start.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has toggled [GLOB.triple_ai_controller ? "on" : "off"] triple AIs at round start.</span>")
message_admins(span_adminnotice("[key_name_admin(usr)] has toggled [GLOB.triple_ai_controller ? "on" : "off"] triple AIs at round start."))
+2 -2
View File
@@ -15,7 +15,7 @@ GLOBAL_DATUM(current_anonymous_theme, /datum/anonymous_theme)
var/response = tgui_alert(usr, "Anon mode is currently enabled. Disable?", "cold feet", list("Disable Anon Names", "Keep it Enabled"))
if(response != "Disable Anon Names")
return
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has disabled anonymous names.</span>")
message_admins(span_adminnotice("[key_name_admin(usr)] has disabled anonymous names."))
QDEL_NULL(GLOB.current_anonymous_theme)
return
var/list/input_list = list("Cancel")
@@ -36,7 +36,7 @@ GLOBAL_DATUM(current_anonymous_theme, /datum/anonymous_theme)
extras_enabled = extras_enabled == "Yes"
alert_players = alert_players == "Yes"
GLOB.current_anonymous_theme = new chosen_theme(extras_enabled, alert_players)
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has enabled anonymous names. THEME: [GLOB.current_anonymous_theme].</span>")
message_admins(span_adminnotice("[key_name_admin(usr)] has enabled anonymous names. THEME: [GLOB.current_anonymous_theme]."))
/* Datum singleton initialized by the client proc to hold the naming generation */
/datum/anonymous_theme
+1 -1
View File
@@ -9,7 +9,7 @@
if (!istype(borgo, /mob/living/silicon/robot))
borgo = input("Select a borg", "Select a borg", null, null) as null|anything in sortNames(GLOB.silicon_mobs)
if (!istype(borgo, /mob/living/silicon/robot))
to_chat(usr, "<span class='warning'>Borg is required for borgpanel</span>", confidential = TRUE)
to_chat(usr, span_warning("Borg is required for borgpanel"), confidential = TRUE)
var/datum/borgpanel/borgpanel = new(usr, borgo)
+2 -2
View File
@@ -104,10 +104,10 @@
announce_contents = !announce_contents
if("submit_report")
if(!command_name)
to_chat(ui_user, "<span class='danger'>You can't send a report with no command name.</span>")
to_chat(ui_user, span_danger("You can't send a report with no command name."))
return
if(!command_report_content)
to_chat(ui_user, "<span class='danger'>You can't send a report with no contents.</span>")
to_chat(ui_user, span_danger("You can't send a report with no contents."))
return
send_announcement()
+2 -2
View File
@@ -8,7 +8,7 @@
if(!mob)
return
if(prefs.muted & MUTE_DEADCHAT)
to_chat(src, "<span class='danger'>You cannot send DSAY messages (muted).</span>", confidential = TRUE)
to_chat(src, span_danger("You cannot send DSAY messages (muted)."), confidential = TRUE)
return
if (handle_spam_prevention(msg,MUTE_DEADCHAT))
@@ -24,7 +24,7 @@
if(holder.fakekey)
rank_name = pick(strings("admin_nicknames.json", "ranks", "config"))
admin_name = pick(strings("admin_nicknames.json", "names", "config"))
var/rendered = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <span class='name'>[rank_name]([admin_name])</span> says, <span class='message'>\"[emoji_parse(msg)]\"</span></span>"
var/rendered = "<span class='game deadsay'>[span_prefix("DEAD:")] [span_name("[rank_name]([admin_name])")] says, <span class='message'>\"[emoji_parse(msg)]\"</span></span>"
for (var/mob/M in GLOB.player_list)
if(isnewplayer(M))
+30 -30
View File
@@ -131,7 +131,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
INVOKE_ASYNC(M, /mob/living/carbon/human/proc/Alienize)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Make Alien") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] made [key_name(M)] into an alien at [AREACOORD(M)].")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] made [ADMIN_LOOKUPFLW(M)] into an alien.</span>")
message_admins(span_adminnotice("[key_name_admin(usr)] made [ADMIN_LOOKUPFLW(M)] into an alien."))
else
tgui_alert(usr,"Invalid mob")
@@ -146,7 +146,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
INVOKE_ASYNC(M, /mob/living/carbon/human/proc/slimeize)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Make Slime") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] made [key_name(M)] into a slime at [AREACOORD(M)].")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] made [ADMIN_LOOKUPFLW(M)] into a slime.</span>")
message_admins(span_adminnotice("[key_name_admin(usr)] made [ADMIN_LOOKUPFLW(M)] into a slime."))
else
tgui_alert(usr,"Invalid mob")
@@ -226,7 +226,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
tgui_alert(usr,"Invalid mob")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Grant Full Access") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(src)] has granted [M.key] full access.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has granted [M.key] full access.</span>")
message_admins(span_adminnotice("[key_name_admin(usr)] has granted [M.key] full access."))
/client/proc/cmd_assume_direct_control(mob/M in GLOB.mob_list)
set category = "Admin.Game"
@@ -237,9 +237,9 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if(tgui_alert(usr,"This mob is being controlled by [M.key]. Are you sure you wish to assume control of it? [M.key] will be made a ghost.",,list("Yes","No")) != "Yes")
return
if(!M || QDELETED(M))
to_chat(usr, "<span class='warning'>The target mob no longer exists.</span>")
to_chat(usr, span_warning("The target mob no longer exists."))
return
message_admins("<span class='adminnotice'>[key_name_admin(usr)] assumed direct control of [M].</span>")
message_admins(span_adminnotice("[key_name_admin(usr)] assumed direct control of [M]."))
log_admin("[key_name(usr)] assumed direct control of [M].")
var/mob/adminmob = mob
if(M.ckey)
@@ -265,7 +265,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if((isobserver(oldmob) || tgui_alert(usr,"Do you want to delete [newkey]'s old mob?","Delete?",list("Yes","No")) != "No"))
delmob = TRUE
if(!M || QDELETED(M))
to_chat(usr, "<span class='warning'>The target mob no longer exists, aborting.</span>")
to_chat(usr, span_warning("The target mob no longer exists, aborting."))
return
if(M.ckey)
M.ghostize(FALSE)
@@ -273,7 +273,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.client?.init_verbs()
if(delmob)
qdel(oldmob)
message_admins("<span class='adminnotice'>[key_name_admin(usr)] gave away direct control of [M] to [newkey].</span>")
message_admins(span_adminnotice("[key_name_admin(usr)] gave away direct control of [M] to [newkey]."))
log_admin("[key_name(usr)] gave away direct control of [M] to [newkey].")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Give Direct Control") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -287,7 +287,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
to_chat(usr, "Game still loading, please hold!", confidential = TRUE)
return
message_admins("<span class='adminnotice'>[key_name_admin(usr)] used the Test Atmos Monitor debug command.</span>")
message_admins(span_adminnotice("[key_name_admin(usr)] used the Test Atmos Monitor debug command."))
log_admin("[key_name(usr)] used the Test Atmos Monitor debug command.")
var/bad_shit = 0
@@ -340,7 +340,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
else
log_message = "all z-levels"
message_admins("<span class='adminnotice'>[key_name_admin(usr)] used the Test Areas debug command checking [log_message].</span>")
message_admins(span_adminnotice("[key_name_admin(usr)] used the Test Areas debug command checking [log_message]."))
log_admin("[key_name(usr)] used the Test Areas debug command checking [log_message].")
for(var/area/A in world)
@@ -649,7 +649,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if(istype(landmark))
var/datum/map_template/ruin/template = landmark.ruin_template
usr.forceMove(get_turf(landmark))
to_chat(usr, "<span class='name'>[template.name]</span>", confidential = TRUE)
to_chat(usr, span_name("[template.name]"), confidential = TRUE)
to_chat(usr, "<span class='italics'>[template.description]</span>", confidential = TRUE)
/client/proc/place_ruin()
@@ -697,10 +697,10 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
var/obj/effect/landmark/ruin/landmark = GLOB.ruin_landmarks[GLOB.ruin_landmarks.len]
log_admin("[key_name(src)] randomly spawned ruin [ruinname] at [COORD(landmark)].")
usr.forceMove(get_turf(landmark))
to_chat(src, "<span class='name'>[template.name]</span>", confidential = TRUE)
to_chat(src, span_name("[template.name]"), confidential = TRUE)
to_chat(src, "<span class='italics'>[template.description]</span>", confidential = TRUE)
else
to_chat(src, "<span class='warning'>Failed to place [template.name].</span>", confidential = TRUE)
to_chat(src, span_warning("Failed to place [template.name]."), confidential = TRUE)
/client/proc/clear_dynamic_transit()
set category = "Debug"
@@ -711,7 +711,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
var/answer = tgui_alert(usr,"WARNING: THIS WILL WIPE ALL RESERVED SPACE TO A CLEAN SLATE! ANY MOVING SHUTTLES, ELEVATORS, OR IN-PROGRESS PHOTOGRAPHY WILL BE DELETED!", "Really wipe dynamic turfs?", list("YES", "NO"))
if(answer != "YES")
return
message_admins("<span class='adminnotice'>[key_name_admin(src)] cleared dynamic transit space.</span>")
message_admins(span_adminnotice("[key_name_admin(src)] cleared dynamic transit space."))
SSblackbox.record_feedback("tally", "admin_verb", 1, "Clear Dynamic Transit") // If...
log_admin("[key_name(src)] cleared dynamic transit space.")
SSmapping.wipe_reservations() //this goes after it's logged, incase something horrible happens.
@@ -726,7 +726,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
SSachievements.achievements_enabled = !SSachievements.achievements_enabled
message_admins("<span class='adminnotice'>[key_name_admin(src)] [SSachievements.achievements_enabled ? "disabled" : "enabled"] the medal hub lockout.</span>")
message_admins(span_adminnotice("[key_name_admin(src)] [SSachievements.achievements_enabled ? "disabled" : "enabled"] the medal hub lockout."))
SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle Medal Disable") // If...
log_admin("[key_name(src)] [SSachievements.achievements_enabled ? "disabled" : "enabled"] the medal hub lockout.")
@@ -749,7 +749,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
SSevents.scheduled = world.time
message_admins("<span class='adminnotice'>[key_name_admin(src)] pumped a random event.</span>")
message_admins(span_adminnotice("[key_name_admin(src)] pumped a random event."))
SSblackbox.record_feedback("tally", "admin_verb", 1, "Pump Random Event")
log_admin("[key_name(src)] pumped a random event.")
@@ -760,7 +760,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
LINE_PROFILE_START
message_admins("<span class='adminnotice'>[key_name_admin(src)] started line by line profiling.</span>")
message_admins(span_adminnotice("[key_name_admin(src)] started line by line profiling."))
SSblackbox.record_feedback("tally", "admin_verb", 1, "Start Line Profiling")
log_admin("[key_name(src)] started line by line profiling.")
@@ -771,7 +771,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
LINE_PROFILE_STOP
message_admins("<span class='adminnotice'>[key_name_admin(src)] stopped line by line profiling.</span>")
message_admins(span_adminnotice("[key_name_admin(src)] stopped line by line profiling."))
SSblackbox.record_feedback("tally", "admin_verb", 1, "Stop Line Profiling")
log_admin("[key_name(src)] stopped line by line profiling.")
@@ -873,55 +873,55 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
//Is there an explicit worn_icon to pick against the worn_icon_state? Easy street expected behavior.
if(sprite.worn_icon)
if(!(sprite.icon_state in icon_states(sprite.worn_icon)))
to_chat(src, "<span class='warning'>ERROR sprites for [sprite.type]. Slot Flags are [sprite.slot_flags].</span>", confidential = TRUE)
to_chat(src, span_warning("ERROR sprites for [sprite.type]. Slot Flags are [sprite.slot_flags]."), confidential = TRUE)
else if(sprite.worn_icon_state)
if(sprite.slot_flags & ITEM_SLOT_MASK)
actual_file_name = 'icons/mob/clothing/mask.dmi'
if(!(sprite.worn_icon_state in icon_states(actual_file_name)))
to_chat(src, "<span class='warning'>ERROR sprites for [sprite.type]. Mask slot.</span>", confidential = TRUE)
to_chat(src, span_warning("ERROR sprites for [sprite.type]. Mask slot."), confidential = TRUE)
if(sprite.slot_flags & ITEM_SLOT_NECK)
actual_file_name = 'icons/mob/clothing/neck.dmi'
if(!(sprite.worn_icon_state in icon_states(actual_file_name)))
to_chat(src, "<span class='warning'>ERROR sprites for [sprite.type]. Neck slot.</span>", confidential = TRUE)
to_chat(src, span_warning("ERROR sprites for [sprite.type]. Neck slot."), confidential = TRUE)
if(sprite.slot_flags & ITEM_SLOT_BACK)
actual_file_name = 'icons/mob/clothing/back.dmi'
if(!(sprite.worn_icon_state in icon_states(actual_file_name)))
to_chat(src, "<span class='warning'>ERROR sprites for [sprite.type]. Back slot.</span>", confidential = TRUE)
to_chat(src, span_warning("ERROR sprites for [sprite.type]. Back slot."), confidential = TRUE)
if(sprite.slot_flags & ITEM_SLOT_HEAD)
actual_file_name = 'icons/mob/clothing/head.dmi'
if(!(sprite.worn_icon_state in icon_states(actual_file_name)))
to_chat(src, "<span class='warning'>ERROR sprites for [sprite.type]. Head slot.</span>", confidential = TRUE)
to_chat(src, span_warning("ERROR sprites for [sprite.type]. Head slot."), confidential = TRUE)
if(sprite.slot_flags & ITEM_SLOT_BELT)
actual_file_name = 'icons/mob/clothing/belt.dmi'
if(!(sprite.worn_icon_state in icon_states(actual_file_name)))
to_chat(src, "<span class='warning'>ERROR sprites for [sprite.type]. Belt slot.</span>", confidential = TRUE)
to_chat(src, span_warning("ERROR sprites for [sprite.type]. Belt slot."), confidential = TRUE)
if(sprite.slot_flags & ITEM_SLOT_SUITSTORE)
actual_file_name = 'icons/mob/clothing/belt_mirror.dmi'
if(!(sprite.worn_icon_state in icon_states(actual_file_name)))
to_chat(src, "<span class='warning'>ERROR sprites for [sprite.type]. Suit Storage slot.</span>", confidential = TRUE)
to_chat(src, span_warning("ERROR sprites for [sprite.type]. Suit Storage slot."), confidential = TRUE)
else if(sprite.icon_state)
if(sprite.slot_flags & ITEM_SLOT_MASK)
actual_file_name = 'icons/mob/clothing/mask.dmi'
if(!(sprite.icon_state in icon_states(actual_file_name)))
to_chat(src, "<span class='warning'>ERROR sprites for [sprite.type]. Mask slot.</span>", confidential = TRUE)
to_chat(src, span_warning("ERROR sprites for [sprite.type]. Mask slot."), confidential = TRUE)
if(sprite.slot_flags & ITEM_SLOT_NECK)
actual_file_name = 'icons/mob/clothing/neck.dmi'
if(!(sprite.icon_state in icon_states(actual_file_name)))
to_chat(src, "<span class='warning'>ERROR sprites for [sprite.type]. Neck slot.</span>", confidential = TRUE)
to_chat(src, span_warning("ERROR sprites for [sprite.type]. Neck slot."), confidential = TRUE)
if(sprite.slot_flags & ITEM_SLOT_BACK)
actual_file_name = 'icons/mob/clothing/back.dmi'
if(!(sprite.icon_state in icon_states(actual_file_name)))
to_chat(src, "<span class='warning'>ERROR sprites for [sprite.type]. Back slot.</span>", confidential = TRUE)
to_chat(src, span_warning("ERROR sprites for [sprite.type]. Back slot."), confidential = TRUE)
if(sprite.slot_flags & ITEM_SLOT_HEAD)
actual_file_name = 'icons/mob/clothing/head.dmi'
if(!(sprite.icon_state in icon_states(actual_file_name)))
to_chat(src, "<span class='warning'>ERROR sprites for [sprite.type]. Head slot.</span>", confidential = TRUE)
to_chat(src, span_warning("ERROR sprites for [sprite.type]. Head slot."), confidential = TRUE)
if(sprite.slot_flags & ITEM_SLOT_BELT)
actual_file_name = 'icons/mob/clothing/belt.dmi'
if(!(sprite.icon_state in icon_states(actual_file_name)))
to_chat(src, "<span class='warning'>ERROR sprites for [sprite.type]. Belt slot.</span>", confidential = TRUE)
to_chat(src, span_warning("ERROR sprites for [sprite.type]. Belt slot."), confidential = TRUE)
if(sprite.slot_flags & ITEM_SLOT_SUITSTORE)
actual_file_name = 'icons/mob/clothing/belt_mirror.dmi'
if(!(sprite.icon_state in icon_states(actual_file_name)))
to_chat(src, "<span class='warning'>ERROR sprites for [sprite.type]. Suit Storage slot.</span>", confidential = TRUE)
to_chat(src, span_warning("ERROR sprites for [sprite.type]. Suit Storage slot."), confidential = TRUE)
#endif
+1 -1
View File
@@ -95,7 +95,7 @@
message_admins("[key_name_admin(usr)] re-enabled the CDN asset transport")
log_admin("[key_name(usr)] re-enabled the CDN asset transport")
else
to_chat(usr, "<span class='adminnotice'>The CDN is not enabled!</span>")
to_chat(usr, span_adminnotice("The CDN is not enabled!"))
if (tgui_alert(usr, "The CDN asset transport is not enabled! If you having issues with assets you can also try disabling filename mutations.", "The CDN asset transport is not enabled!", list("Try disabling filename mutations", "Nevermind")) == "Try disabling filename mutations")
SSassets.transport.dont_mutate_filenames = !SSassets.transport.dont_mutate_filenames
message_admins("[key_name_admin(usr)] [(SSassets.transport.dont_mutate_filenames ? "disabled" : "re-enabled")] asset filename transforms")
+1 -1
View File
@@ -11,7 +11,7 @@
var/new_fps = round(input("Sets game frames-per-second. Can potentially break the game (default: [cfg_fps])","FPS", world.fps) as num|null)
if(new_fps <= 0)
to_chat(src, "<span class='danger'>Error: set_server_fps(): Invalid world.fps value. No changes made.</span>", confidential = TRUE)
to_chat(src, span_danger("Error: set_server_fps(): Invalid world.fps value. No changes made."), confidential = TRUE)
return
if(new_fps > cfg_fps * 1.5)
if(tgui_alert(usr, "You are setting fps to a high value:\n\t[new_fps] frames-per-second\n\tconfig.fps = [cfg_fps]","Warning!",list("Confirm","ABORT-ABORT-ABORT")) != "Confirm")
+6 -6
View File
@@ -11,7 +11,7 @@ GLOBAL_DATUM(highlander_controller, /datum/highlander_controller)
. = ..()
RegisterSignal(SSdcs, COMSIG_GLOB_CREWMEMBER_JOINED, .proc/new_highlander)
sound_to_playing_players('sound/misc/highlander.ogg')
send_to_playing_players("<span class='boldannounce'><font size=6>THERE CAN BE ONLY ONE</font></span>")
send_to_playing_players(span_boldannounce("<font size=6>THERE CAN BE ONLY ONE</font>"))
for(var/obj/item/disk/nuclear/fukkendisk in GLOB.poi_list)
var/datum/component/stationloving/component = fukkendisk.GetComponent(/datum/component/stationloving)
component?.relocate() //Gets it out of bags and such
@@ -59,7 +59,7 @@ GLOBAL_DATUM(highlander_controller, /datum/highlander_controller)
/datum/highlander_controller/proc/new_highlander(mob/living/carbon/human/new_crewmember, rank)
SIGNAL_HANDLER
to_chat(new_crewmember, "<span class='userdanger'><i>THERE CAN BE ONLY ONE!!!</i></span>")
to_chat(new_crewmember, span_userdanger("<i>THERE CAN BE ONLY ONE!!!</i>"))
new_crewmember.make_scottish()
/**
@@ -76,17 +76,17 @@ GLOBAL_DATUM(highlander_controller, /datum/highlander_controller)
return
if(was_delayed) //sends more accurate logs
message_admins("<span class='adminnotice'>[key_name_admin(usr)]'s delayed THERE CAN ONLY BE ONE started!</span>")
message_admins(span_adminnotice("[key_name_admin(usr)]'s delayed THERE CAN ONLY BE ONE started!"))
log_admin("[key_name(usr)] delayed THERE CAN ONLY BE ONE started.")
else
message_admins("<span class='adminnotice'>[key_name_admin(usr)] used THERE CAN BE ONLY ONE!</span>")
message_admins(span_adminnotice("[key_name_admin(usr)] used THERE CAN BE ONLY ONE!"))
log_admin("[key_name(usr)] used THERE CAN BE ONLY ONE.")
GLOB.highlander_controller = new /datum/highlander_controller
/client/proc/only_one_delayed()
send_to_playing_players("<span class='userdanger'>Bagpipes begin to blare. You feel Scottish pride coming over you.</span>")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] used (delayed) THERE CAN BE ONLY ONE!</span>")
send_to_playing_players(span_userdanger("Bagpipes begin to blare. You feel Scottish pride coming over you."))
message_admins(span_adminnotice("[key_name_admin(usr)] used (delayed) THERE CAN BE ONLY ONE!"))
log_admin("[key_name(usr)] used delayed THERE CAN BE ONLY ONE.")
addtimer(CALLBACK(src, .proc/only_one, TRUE), 42 SECONDS)
@@ -37,7 +37,7 @@
template.post_load(P)
break
message_admins("<span class='adminnotice'>[key_name_admin(src)] has placed a map template ([template.name]) at [ADMIN_COORDJMP(T)]</span>")
message_admins(span_adminnotice("[key_name_admin(src)] has placed a map template ([template.name]) at [ADMIN_COORDJMP(T)]"))
else
to_chat(src, "Failed to place map", confidential = TRUE)
images -= preview
@@ -50,7 +50,7 @@
if(!map)
return
if(copytext("[map]", -4) != ".dmm")//4 == length(".dmm")
to_chat(src, "<span class='warning'>Filename must end in '.dmm': [map]</span>", confidential = TRUE)
to_chat(src, span_warning("Filename must end in '.dmm': [map]"), confidential = TRUE)
return
var/datum/map_template/M
switch(tgui_alert(usr, "What kind of map is this?", "Map type", list("Normal", "Shuttle", "Cancel")))
@@ -61,7 +61,7 @@
else
return
if(!M.cached_map)
to_chat(src, "<span class='warning'>Map template '[map]' failed to parse properly.</span>", confidential = TRUE)
to_chat(src, span_warning("Map template '[map]' failed to parse properly."), confidential = TRUE)
return
var/datum/map_report/report = M.cached_map.check_for_errors()
@@ -69,7 +69,7 @@
if(report)
report.show_to(src)
report_link = " - <a href='?src=[REF(report)];[HrefToken(TRUE)];show=1'>validation report</a>"
to_chat(src, "<span class='warning'>Map template '[map]' <a href='?src=[REF(report)];[HrefToken()];show=1'>failed validation</a>.</span>", confidential = TRUE)
to_chat(src, span_warning("Map template '[map]' <a href='?src=[REF(report)];[HrefToken()];show=1'>failed validation</a>."), confidential = TRUE)
if(report.loadable)
var/response = tgui_alert(usr, "The map failed validation, would you like to load it anyways?", "Map Errors", list("Cancel", "Upload Anyways"))
if(response != "Upload Anyways")
@@ -79,5 +79,5 @@
return
SSmapping.map_templates[M.name] = M
message_admins("<span class='adminnotice'>[key_name_admin(src)] has uploaded a map template '[map]' ([M.width]x[M.height])[report_link].</span>")
to_chat(src, "<span class='notice'>Map template '[map]' ready to place ([M.width]x[M.height])</span>", confidential = TRUE)
message_admins(span_adminnotice("[key_name_admin(src)] has uploaded a map template '[map]' ([M.width]x[M.height])[report_link]."))
to_chat(src, span_notice("Map template '[map]' ready to place ([M.width]x[M.height])"), confidential = TRUE)
+4 -4
View File
@@ -50,7 +50,7 @@
return
if(copytext("[map_file]", -4) != ".dmm")//4 == length(".dmm")
to_chat(src, "<span class='warning'>Filename must end in '.dmm': [map_file]</span>")
to_chat(src, span_warning("Filename must end in '.dmm': [map_file]"))
return
if(!fcopy(map_file, "_maps/custom/[map_file]"))
@@ -59,11 +59,11 @@
// This is to make sure the map works so the server does not start without a map.
var/datum/parsed_map/M = new (map_file)
if(!M)
to_chat(src, "<span class='warning'>Map '[map_file]' failed to parse properly.</span>")
to_chat(src, span_warning("Map '[map_file]' failed to parse properly."))
return
if(!M.bounds)
to_chat(src, "<span class='warning'>Map '[map_file]' has non-existant bounds.</span>")
to_chat(src, span_warning("Map '[map_file]' has non-existant bounds."))
qdel(M)
return
@@ -76,7 +76,7 @@
if(!shuttle)
continue
if(!SSmapping.shuttle_templates[shuttle])
to_chat(usr, "<span class='warning'>No such shuttle as '[shuttle]' exists, using default.</span>")
to_chat(usr, span_warning("No such shuttle as '[shuttle]' exists, using default."))
continue
VM.shuttles[s] = shuttle
+2 -2
View File
@@ -2,7 +2,7 @@
set category = "Server"
set name = "Toggle Panic Bunker"
if (!CONFIG_GET(flag/sql_enabled))
to_chat(usr, "<span class='adminnotice'>The Database is not enabled!</span>", confidential = TRUE)
to_chat(usr, span_adminnotice("The Database is not enabled!"), confidential = TRUE)
return
var/new_pb = !CONFIG_GET(flag/panic_bunker)
@@ -30,7 +30,7 @@
set category = "Server"
set name = "Toggle PB Interviews"
if (!CONFIG_GET(flag/panic_bunker))
to_chat(usr, "<span class='adminnotice'>NOTE: The panic bunker is not enabled, so this change will not effect anything until it is enabled.</span>", confidential = TRUE)
to_chat(usr, span_adminnotice("NOTE: The panic bunker is not enabled, so this change will not effect anything until it is enabled."), confidential = TRUE)
var/new_interview = !CONFIG_GET(flag/panic_bunker_interview)
CONFIG_SET(flag/panic_bunker_interview, new_interview)
log_admin("[key_name(usr)] has toggled the Panic Bunker's interview system, it is now [new_interview ? "enabled" : "disabled"].")
+11 -11
View File
@@ -23,7 +23,7 @@
var/res = tgui_alert(usr, "Show the title of this song to the players?",, list("Yes","No", "Cancel"))
switch(res)
if("Yes")
to_chat(world, "<span class='boldannounce'>An admin played: [S]</span>", confidential = TRUE)
to_chat(world, span_boldannounce("An admin played: [S]"), confidential = TRUE)
if("Cancel")
return
@@ -73,7 +73,7 @@
var/ytdl = CONFIG_GET(string/invoke_youtubedl)
if(!ytdl)
to_chat(src, "<span class='boldwarning'>Youtube-dl was not configured, action unavailable</span>", confidential = TRUE) //Check config.txt for the INVOKE_YOUTUBEDL value
to_chat(src, span_boldwarning("Youtube-dl was not configured, action unavailable"), confidential = TRUE) //Check config.txt for the INVOKE_YOUTUBEDL value
return
var/web_sound_input = input("Enter content URL (supported sites only, leave blank to stop playing)", "Play Internet Sound via youtube-dl") as text|null
@@ -85,8 +85,8 @@
web_sound_input = trim(web_sound_input)
if(findtext(web_sound_input, ":") && !findtext(web_sound_input, GLOB.is_http_protocol))
to_chat(src, "<span class='boldwarning'>Non-http(s) URIs are not allowed.</span>", confidential = TRUE)
to_chat(src, "<span class='warning'>For youtube-dl shortcuts like ytsearch: please use the appropriate full url from the website.</span>", confidential = TRUE)
to_chat(src, span_boldwarning("Non-http(s) URIs are not allowed."), confidential = TRUE)
to_chat(src, span_warning("For youtube-dl shortcuts like ytsearch: please use the appropriate full url from the website."), confidential = TRUE)
return
var/shell_scrubbed_input = shell_url_scrub(web_sound_input)
var/list/output = world.shelleo("[ytdl] --geo-bypass --format \"bestaudio\[ext=mp3]/best\[ext=mp4]\[height<=360]/bestaudio\[ext=m4a]/bestaudio\[ext=aac]\" --dump-single-json --no-playlist -- \"[shell_scrubbed_input]\"")
@@ -98,8 +98,8 @@
try
data = json_decode(stdout)
catch(var/exception/e)
to_chat(src, "<span class='boldwarning'>Youtube-dl JSON parsing FAILED:</span>", confidential = TRUE)
to_chat(src, "<span class='warning'>[e]: [stdout]</span>", confidential = TRUE)
to_chat(src, span_boldwarning("Youtube-dl JSON parsing FAILED:"), confidential = TRUE)
to_chat(src, span_warning("[e]: [stdout]"), confidential = TRUE)
return
if (data["url"])
@@ -116,7 +116,7 @@
var/res = tgui_alert(usr, "Show the title of and link to this song to the players?\n[title]",, list("No", "Yes", "Cancel"))
switch(res)
if("Yes")
to_chat(world, "<span class='boldannounce'>An admin played: [webpage_url]</span>", confidential = TRUE)
to_chat(world, span_boldannounce("An admin played: [webpage_url]"), confidential = TRUE)
if("Cancel")
return
@@ -124,8 +124,8 @@
log_admin("[key_name(src)] played web sound: [web_sound_input]")
message_admins("[key_name(src)] played web sound: [web_sound_input]")
else
to_chat(src, "<span class='boldwarning'>Youtube-dl URL retrieval FAILED:</span>", confidential = TRUE)
to_chat(src, "<span class='warning'>[stderr]</span>", confidential = TRUE)
to_chat(src, span_boldwarning("Youtube-dl URL retrieval FAILED:"), confidential = TRUE)
to_chat(src, span_warning("[stderr]"), confidential = TRUE)
else //pressed ok with blank
log_admin("[key_name(src)] stopped web sound")
@@ -134,8 +134,8 @@
stop_web_sounds = TRUE
if(web_sound_url && !findtext(web_sound_url, GLOB.is_http_protocol))
to_chat(src, "<span class='boldwarning'>BLOCKED: Content URL not using http(s) protocol</span>", confidential = TRUE)
to_chat(src, "<span class='warning'>The media provider returned a content URL that isn't using the HTTP or HTTPS protocol</span>", confidential = TRUE)
to_chat(src, span_boldwarning("BLOCKED: Content URL not using http(s) protocol"), confidential = TRUE)
to_chat(src, span_warning("The media provider returned a content URL that isn't using the HTTP or HTTPS protocol"), confidential = TRUE)
return
if(web_sound_url || stop_web_sounds)
for(var/m in GLOB.player_list)
+7 -7
View File
@@ -3,7 +3,7 @@
set name = "Pray"
if(GLOB.say_disabled) //This is here to try to identify lag problems
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>", confidential = TRUE)
to_chat(usr, span_danger("Speech is currently admin-disabled."), confidential = TRUE)
return
msg = copytext_char(sanitize(msg), 1, MAX_MESSAGE_LEN)
@@ -12,7 +12,7 @@
log_prayer("[src.key]/([src.name]): [msg]")
if(usr.client)
if(usr.client.prefs.muted & MUTE_PRAY)
to_chat(usr, "<span class='danger'>You cannot pray (muted).</span>", confidential = TRUE)
to_chat(usr, span_danger("You cannot pray (muted)."), confidential = TRUE)
return
if(src.client.handle_spam_prevention(msg,MUTE_PRAY))
return
@@ -40,7 +40,7 @@
prayer_type = "SPIRITUAL PRAYER"
var/msg_tmp = msg
msg = "<span class='adminnotice'>[icon2html(cross, GLOB.admins)]<b><font color=[font_color]>[prayer_type][deity ? " (to [deity])" : ""]: </font>[ADMIN_FULLMONTY(src)] [ADMIN_SC(src)]:</b> <span class='linkify'>[msg]</span></span>"
msg = span_adminnotice("[icon2html(cross, GLOB.admins)]<b><font color=[font_color]>[prayer_type][deity ? " (to [deity])" : ""]: </font>[ADMIN_FULLMONTY(src)] [ADMIN_SC(src)]:</b> <span class='linkify'>[msg]</span>")
for(var/client/C in GLOB.admins)
if(C.prefs.chat_toggles & CHAT_PRAYER)
@@ -48,7 +48,7 @@
if(C.prefs.toggles & SOUND_PRAYERS)
if(usr.job == "Chaplain")
SEND_SOUND(C, sound('sound/effects/pray.ogg'))
to_chat(usr, "<span class='info'>You pray to the gods: \"[msg_tmp]\"</span>", confidential = TRUE)
to_chat(usr, span_info("You pray to the gods: \"[msg_tmp]\""), confidential = TRUE)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Prayer") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
//log_admin("HELP: [key_name(src)]: [msg]")
@@ -56,7 +56,7 @@
/// Used by communications consoles to message CentCom
/proc/message_centcom(text, mob/sender)
var/msg = copytext_char(sanitize(text), 1, MAX_MESSAGE_LEN)
msg = "<span class='adminnotice'><b><font color=orange>CENTCOM:</font>[ADMIN_FULLMONTY(sender)] [ADMIN_CENTCOM_REPLY(sender)]:</b> [msg]</span>"
msg = span_adminnotice("<b><font color=orange>CENTCOM:</font>[ADMIN_FULLMONTY(sender)] [ADMIN_CENTCOM_REPLY(sender)]:</b> [msg]")
to_chat(GLOB.admins, msg, confidential = TRUE)
for(var/obj/machinery/computer/communications/console in GLOB.machines)
console.override_cooldown()
@@ -64,7 +64,7 @@
/// Used by communications consoles to message the Syndicate
/proc/message_syndicate(text, mob/sender)
var/msg = copytext_char(sanitize(text), 1, MAX_MESSAGE_LEN)
msg = "<span class='adminnotice'><b><font color=crimson>SYNDICATE:</font>[ADMIN_FULLMONTY(sender)] [ADMIN_SYNDICATE_REPLY(sender)]:</b> [msg]</span>"
msg = span_adminnotice("<b><font color=crimson>SYNDICATE:</font>[ADMIN_FULLMONTY(sender)] [ADMIN_SYNDICATE_REPLY(sender)]:</b> [msg]")
to_chat(GLOB.admins, msg, confidential = TRUE)
for(var/obj/machinery/computer/communications/console in GLOB.machines)
console.override_cooldown()
@@ -72,7 +72,7 @@
/// Used by communications consoles to request the nuclear launch codes
/proc/nuke_request(text, mob/sender)
var/msg = copytext_char(sanitize(text), 1, MAX_MESSAGE_LEN)
msg = "<span class='adminnotice'><b><font color=orange>NUKE CODE REQUEST:</font>[ADMIN_FULLMONTY(sender)] [ADMIN_CENTCOM_REPLY(sender)] [ADMIN_SET_SD_CODE]:</b> [msg]</span>"
msg = span_adminnotice("<b><font color=orange>NUKE CODE REQUEST:</font>[ADMIN_FULLMONTY(sender)] [ADMIN_CENTCOM_REPLY(sender)] [ADMIN_SET_SD_CODE]:</b> [msg]")
to_chat(GLOB.admins, msg, confidential = TRUE)
for(var/obj/machinery/computer/communications/console in GLOB.machines)
console.override_cooldown()
+27 -27
View File
@@ -40,7 +40,7 @@
to_chat(M, "<i>You hear a voice in your head... <b>[msg]</i></b>", confidential = TRUE)
log_admin("SubtlePM: [key_name(usr)] -> [key_name(M)] : [msg]")
msg = "<span class='adminnotice'><b> SubtleMessage: [key_name_admin(usr)] -> [key_name_admin(M)] :</b> [msg]</span>"
msg = span_adminnotice("<b> SubtleMessage: [key_name_admin(usr)] -> [key_name_admin(M)] :</b> [msg]")
message_admins(msg)
admin_ticket_log(M, msg)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Subtle Message") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -77,7 +77,7 @@
log_directed_talk(mob, H, input, LOG_ADMIN, "reply")
message_admins("[key_name_admin(src)] replied to [key_name_admin(H)]'s [sender] message with: \"[input]\"")
to_chat(H, "<span class='hear'>You hear something crackle in your ears 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.\"</span>", confidential = TRUE)
to_chat(H, span_hear("You hear something crackle in your ears 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)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Headset Message") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -94,7 +94,7 @@
return
to_chat(world, "[msg]", confidential = TRUE)
log_admin("GlobalNarrate: [key_name(usr)] : [msg]")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] Sent a global narrate</span>")
message_admins(span_adminnotice("[key_name_admin(usr)] Sent a global narrate"))
SSblackbox.record_feedback("tally", "admin_verb", 1, "Global Narrate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_direct_narrate(mob/M)
@@ -117,7 +117,7 @@
to_chat(M, msg, confidential = TRUE)
log_admin("DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]")
msg = "<span class='adminnotice'><b> DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]):</b> [msg]<BR></span>"
msg = span_adminnotice("<b> DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]):</b> [msg]<BR>")
message_admins(msg)
admin_ticket_log(M, msg)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Direct Narrate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -140,7 +140,7 @@
to_chat(M, msg, confidential = TRUE)
log_admin("LocalNarrate: [key_name(usr)] at [AREACOORD(A)]: [msg]")
message_admins("<span class='adminnotice'><b> LocalNarrate: [key_name_admin(usr)] at [ADMIN_VERBOSEJMP(A)]:</b> [msg]<BR></span>")
message_admins(span_adminnotice("<b> LocalNarrate: [key_name_admin(usr)] at [ADMIN_VERBOSEJMP(A)]:</b> [msg]<BR>"))
SSblackbox.record_feedback("tally", "admin_verb", 1, "Local Narrate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_godmode(mob/M in GLOB.mob_list)
@@ -150,7 +150,7 @@
return
M.status_flags ^= GODMODE
to_chat(usr, "<span class='adminnotice'>Toggled [(M.status_flags & GODMODE) ? "ON" : "OFF"]</span>", confidential = TRUE)
to_chat(usr, span_adminnotice("Toggled [(M.status_flags & GODMODE) ? "ON" : "OFF"]"), confidential = TRUE)
log_admin("[key_name(usr)] has toggled [key_name(M)]'s nodamage to [(M.status_flags & GODMODE) ? "On" : "Off"]")
var/msg = "[key_name_admin(usr)] has toggled [ADMIN_LOOKUPFLW(M)]'s nodamage to [(M.status_flags & GODMODE) ? "On" : "Off"]"
@@ -252,7 +252,7 @@
if(candidates.len)
ckey = input("Pick the player you want to respawn as a xeno.", "Suitable Candidates") as null|anything in sortKey(candidates)
else
to_chat(usr, "<span class='danger'>Error: create_xeno(): no suitable candidates.</span>", confidential = TRUE)
to_chat(usr, span_danger("Error: create_xeno(): no suitable candidates."), confidential = TRUE)
if(!istext(ckey))
return FALSE
@@ -278,7 +278,7 @@
SSjob.SendToLateJoin(new_xeno, FALSE)
new_xeno.ckey = ckey
var/msg = "<span class='notice'>[key_name_admin(usr)] has spawned [ckey] as a filthy xeno [alien_caste].</span>"
var/msg = span_notice("[key_name_admin(usr)] has spawned [ckey] as a filthy xeno [alien_caste].")
message_admins(msg)
admin_ticket_log(new_xeno, msg)
return TRUE
@@ -340,7 +340,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
G_found.mind.transfer_to(new_xeno) //be careful when doing stuff like this! I've already checked the mind isn't in use
new_xeno.key = G_found.key
to_chat(new_xeno, "You have been fully respawned. Enjoy the game.", confidential = TRUE)
var/msg = "<span class='adminnotice'>[key_name_admin(usr)] has respawned [new_xeno.key] as a filthy xeno.</span>"
var/msg = span_adminnotice("[key_name_admin(usr)] has respawned [new_xeno.key] as a filthy xeno.")
message_admins(msg)
admin_ticket_log(new_xeno, msg)
return //all done. The ghost is auto-deleted
@@ -353,7 +353,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
G_found.mind.transfer_to(new_monkey) //be careful when doing stuff like this! I've already checked the mind isn't in use
new_monkey.key = G_found.key
to_chat(new_monkey, "You have been fully respawned. Enjoy the game.", confidential = TRUE)
var/msg = "<span class='adminnotice'>[key_name_admin(usr)] has respawned [new_monkey.key] as a filthy monkey.</span>"
var/msg = span_adminnotice("[key_name_admin(usr)] has respawned [new_monkey.key] as a filthy monkey.")
message_admins(msg)
admin_ticket_log(new_monkey, msg)
return //all done. The ghost is auto-deleted
@@ -447,7 +447,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(tgui_alert(new_character,"Would you like an active AI to announce this character?",,list("No","Yes"))=="Yes")
AnnounceArrival(new_character, new_character.mind.assigned_role)
var/msg = "<span class='adminnotice'>[admin] has respawned [player_key] as [new_character.real_name].</span>"
var/msg = span_adminnotice("[admin] has respawned [player_key] as [new_character.real_name].")
message_admins(msg)
admin_ticket_log(new_character, msg)
@@ -494,7 +494,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
M.revive(full_heal = TRUE, admin_revive = TRUE)
log_admin("[key_name(usr)] healed / revived [key_name(M)]")
var/msg = "<span class='danger'>Admin [key_name_admin(usr)] healed / revived [ADMIN_LOOKUPFLW(M)]!</span>"
var/msg = span_danger("Admin [key_name_admin(usr)] healed / revived [ADMIN_LOOKUPFLW(M)]!")
message_admins(msg)
admin_ticket_log(M, msg)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Rejuvenate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -615,7 +615,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/confirm = tgui_alert(usr, "You sure?", "Confirm", list("Yes", "No"))
if(confirm == "Yes")
log_admin("[key_name(usr)] used gibself.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] used gibself.</span>")
message_admins(span_adminnotice("[key_name_admin(usr)] used gibself."))
SSblackbox.record_feedback("tally", "admin_verb", 1, "Gib Self") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
var/mob/living/ourself = mob
@@ -667,7 +667,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
SSshuttle.emergency.request()
SSblackbox.record_feedback("tally", "admin_verb", 1, "Call Shuttle") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] admin-called the emergency shuttle.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] admin-called the emergency shuttle[confirm == "Yes (No Recall)" ? " (non-recallable)" : ""].</span>")
message_admins(span_adminnotice("[key_name_admin(usr)] admin-called the emergency shuttle[confirm == "Yes (No Recall)" ? " (non-recallable)" : ""]."))
return
/client/proc/admin_cancel_shuttle()
@@ -687,7 +687,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
SSshuttle.emergency.cancel()
SSblackbox.record_feedback("tally", "admin_verb", 1, "Cancel Shuttle") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] admin-recalled the emergency shuttle.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] admin-recalled the emergency shuttle.</span>")
message_admins(span_adminnotice("[key_name_admin(usr)] admin-recalled the emergency shuttle."))
return
@@ -699,13 +699,13 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
if(SSshuttle.emergency.mode == SHUTTLE_DISABLED)
to_chat(usr, "<span class='warning'>Error, shuttle is already disabled.</span>")
to_chat(usr, span_warning("Error, shuttle is already disabled."))
return
if(tgui_alert(usr, "You sure?", "Confirm", list("Yes", "No")) != "Yes")
return
message_admins("<span class='adminnotice'>[key_name_admin(usr)] disabled the shuttle.</span>")
message_admins(span_adminnotice("[key_name_admin(usr)] disabled the shuttle."))
SSshuttle.lastMode = SSshuttle.emergency.mode
SSshuttle.lastCallTime = SSshuttle.emergency.timeLeft(1)
@@ -722,13 +722,13 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
if(SSshuttle.emergency.mode != SHUTTLE_DISABLED)
to_chat(usr, "<span class='warning'>Error, shuttle not disabled.</span>")
to_chat(usr, span_warning("Error, shuttle not disabled."))
return
if(tgui_alert(usr, "You sure?", "Confirm", list("Yes", "No")) != "Yes")
return
message_admins("<span class='adminnotice'>[key_name_admin(usr)] enabled the emergency shuttle.</span>")
message_admins(span_adminnotice("[key_name_admin(usr)] enabled the emergency shuttle."))
SSshuttle.adminEmergencyNoRecall = FALSE
SSshuttle.emergencyNoRecall = FALSE
if(SSshuttle.lastMode == SHUTTLE_DISABLED) //If everything goes to shit, fix it.
@@ -765,7 +765,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
message_admins("Admin [key_name_admin(usr)] has forced the players to have random appearances.")
if(notifyplayers == "Yes")
to_chat(world, "<span class='adminnotice'>Admin [usr.key] has forced the players to have completely random identities!</span>", confidential = TRUE)
to_chat(world, span_adminnotice("Admin [usr.key] has forced the players to have completely random identities!"), confidential = TRUE)
to_chat(usr, "<i>Remember: you can always disable the randomness by using the verb again, assuming the round hasn't started yet</i>.", confidential = TRUE)
@@ -945,7 +945,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!M)
continue
M.audible_message("<span class='hear'>...wabbajack...wabbajack...</span>")
M.audible_message(span_hear("...wabbajack...wabbajack..."))
playsound(M.loc, 'sound/magic/staff_change.ogg', 50, TRUE, -1)
wabbajack(M)
@@ -1098,7 +1098,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
if(!CONFIG_GET(flag/use_exp_tracking))
to_chat(usr, "<span class='warning'>Tracking is disabled in the server configuration file.</span>", confidential = TRUE)
to_chat(usr, span_warning("Tracking is disabled in the server configuration file."), confidential = TRUE)
return
var/list/msg = list()
@@ -1114,10 +1114,10 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_ADMIN))
return
if(!client_to_check)
to_chat(usr, "<span class='danger'>ERROR: Client not found.</span>", confidential = TRUE)
to_chat(usr, span_danger("ERROR: Client not found."), confidential = TRUE)
return
if(!CONFIG_GET(flag/use_exp_tracking))
to_chat(usr, "<span class='warning'>Tracking is disabled in the server configuration file.</span>", confidential = TRUE)
to_chat(usr, span_warning("Tracking is disabled in the server configuration file."), confidential = TRUE)
return
new /datum/job_report_menu(client_to_check, usr)
@@ -1126,11 +1126,11 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_ADMIN))
return
if(!C)
to_chat(usr, "<span class='danger'>ERROR: Client not found.</span>", confidential = TRUE)
to_chat(usr, span_danger("ERROR: Client not found."), confidential = TRUE)
return
if(!C.set_db_player_flags())
to_chat(usr, "<span class='danger'>ERROR: Unable read player flags from database. Please check logs.</span>", confidential = TRUE)
to_chat(usr, span_danger("ERROR: Unable read player flags from database. Please check logs."), confidential = TRUE)
var/dbflags = C.prefs.db_flags
var/newstate = FALSE
if(dbflags & DB_FLAG_EXEMPT)
@@ -1139,7 +1139,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
newstate = TRUE
if(C.update_flag_db(DB_FLAG_EXEMPT, newstate))
to_chat(usr, "<span class='danger'>ERROR: Unable to update player flags. Please check logs.</span>", confidential = TRUE)
to_chat(usr, span_danger("ERROR: Unable to update player flags. Please check logs."), confidential = TRUE)
else
message_admins("[key_name_admin(usr)] has [newstate ? "activated" : "deactivated"] job exp exempt status on [key_name_admin(C)]")
log_admin("[key_name(usr)] has [newstate ? "activated" : "deactivated"] job exp exempt status on [key_name(C)]")
@@ -2,7 +2,7 @@
set category = "Server"
set name = "Reestablish DB Connection"
if (!CONFIG_GET(flag/sql_enabled))
to_chat(usr, "<span class='adminnotice'>The Database is not enabled!</span>", confidential = TRUE)
to_chat(usr, span_adminnotice("The Database is not enabled!"), confidential = TRUE)
return
if (SSdbcore.IsConnected())
+13 -13
View File
@@ -151,7 +151,7 @@
return
log_admin("[key_name(holder)] reset the thunderdome to default with delete_mobs==[delete_mobs].", 1)
message_admins("<span class='adminnotice'>[key_name_admin(holder)] reset the thunderdome to default with delete_mobs==[delete_mobs].</span>")
message_admins(span_adminnotice("[key_name_admin(holder)] reset the thunderdome to default with delete_mobs==[delete_mobs]."))
var/area/thunderdome = GLOB.areas_by_type[/area/tdome/arena]
if(delete_mobs == "Yes")
@@ -169,13 +169,13 @@
return
set_station_name(new_name)
log_admin("[key_name(holder)] renamed the station to \"[new_name]\".")
message_admins("<span class='adminnotice'>[key_name_admin(holder)] renamed the station to: [new_name].</span>")
message_admins(span_adminnotice("[key_name_admin(holder)] renamed the station to: [new_name]."))
priority_announce("[command_name()] has renamed the station to \"[new_name]\".")
if("reset_name")
var/new_name = new_station_name()
set_station_name(new_name)
log_admin("[key_name(holder)] reset the station name.")
message_admins("<span class='adminnotice'>[key_name_admin(holder)] reset the station name.</span>")
message_admins(span_adminnotice("[key_name_admin(holder)] reset the station name."))
priority_announce("[command_name()] has renamed the station to \"[new_name]\".")
if("night_shift_set")
var/val = tgui_alert(holder, "What do you want to set night shift to? This will override the automatic system until set to automatic again.", "Night Shift", list("On", "Off", "Automatic"))
@@ -206,7 +206,7 @@
message_admins("[key_name_admin(holder)] [new_perma ? "stopped" : "started"] the arrivals shuttle")
log_admin("[key_name(holder)] [new_perma ? "stopped" : "started"] the arrivals shuttle")
else
to_chat(holder, "<span class='admin'>There is no arrivals shuttle.</span>", confidential = TRUE)
to_chat(holder, span_admin("There is no arrivals shuttle."), confidential = TRUE)
if("movelaborshuttle")
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Send Labor Shuttle"))
if(!SSshuttle.toggleShuttle("laborcamp","laborcamp_home","laborcamp_away"))
@@ -246,21 +246,21 @@
return
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Power All APCs"))
log_admin("[key_name(holder)] made all areas powered", 1)
message_admins("<span class='adminnotice'>[key_name_admin(holder)] made all areas powered</span>")
message_admins(span_adminnotice("[key_name_admin(holder)] made all areas powered"))
power_restore()
if("unpower")
if(!is_funmin)
return
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Depower All APCs"))
log_admin("[key_name(holder)] made all areas unpowered", 1)
message_admins("<span class='adminnotice'>[key_name_admin(holder)] made all areas unpowered</span>")
message_admins(span_adminnotice("[key_name_admin(holder)] made all areas unpowered"))
power_failure()
if("quickpower")
if(!is_funmin)
return
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Power All SMESs"))
log_admin("[key_name(holder)] made all SMESs powered", 1)
message_admins("<span class='adminnotice'>[key_name_admin(holder)] made all SMESs powered</span>")
message_admins(span_adminnotice("[key_name_admin(holder)] made all SMESs powered"))
power_restore_quick()
if("anon_name")
if(!is_funmin)
@@ -384,7 +384,7 @@
var/list/prefs = settings["mainsettings"]
if (prefs["amount"]["value"] < 1 || prefs["portalnum"]["value"] < 1)
to_chat(holder, "<span class='warning'>Number of portals and mobs to spawn must be at least 1.</span>", confidential = TRUE)
to_chat(holder, span_warning("Number of portals and mobs to spawn must be at least 1."), confidential = TRUE)
return
var/mob/pathToSpawn = prefs["typepath"]["value"]
@@ -392,7 +392,7 @@
pathToSpawn = text2path(pathToSpawn)
if (!ispath(pathToSpawn))
to_chat(holder, "<span class='notice'>Invalid path [pathToSpawn].</span>", confidential = TRUE)
to_chat(holder, span_notice("Invalid path [pathToSpawn]."), confidential = TRUE)
return
var/list/candidates = list()
@@ -434,7 +434,7 @@
if (!CONFIG_SET(number/bombcap, newBombCap))
return
message_admins("<span class='boldannounce'>[key_name_admin(holder)] changed the bomb cap to [GLOB.MAX_EX_DEVESTATION_RANGE], [GLOB.MAX_EX_HEAVY_RANGE], [GLOB.MAX_EX_LIGHT_RANGE]</span>")
message_admins(span_boldannounce("[key_name_admin(holder)] changed the bomb cap to [GLOB.MAX_EX_DEVESTATION_RANGE], [GLOB.MAX_EX_HEAVY_RANGE], [GLOB.MAX_EX_LIGHT_RANGE]"))
log_admin("[key_name(holder)] changed the bomb cap to [GLOB.MAX_EX_DEVESTATION_RANGE], [GLOB.MAX_EX_HEAVY_RANGE], [GLOB.MAX_EX_LIGHT_RANGE]")
//buttons that are fun for exactly you and nobody else.
if("monkey")
@@ -470,14 +470,14 @@
new_objective.explanation_text = objective
traitor_datum.objectives += new_objective
player.mind.add_antag_datum(traitor_datum)
message_admins("<span class='adminnotice'>[key_name_admin(holder)] used everyone is a traitor secret. Objective is [objective]</span>")
message_admins(span_adminnotice("[key_name_admin(holder)] used everyone is a traitor secret. Objective is [objective]"))
log_admin("[key_name(holder)] used everyone is a traitor secret. Objective is [objective]")
if("massbraindamage")
if(!is_funmin)
return
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Mass Braindamage"))
for(var/mob/living/carbon/human/H in GLOB.player_list)
to_chat(H, "<span class='boldannounce'>You suddenly feel stupid.</span>", confidential = TRUE)
to_chat(H, span_boldannounce("You suddenly feel stupid."), confidential = TRUE)
H.adjustOrganLoss(ORGAN_SLOT_BRAIN, 60, 80)
message_admins("[key_name_admin(holder)] made everybody brain damaged")
if("floorlava")
@@ -521,7 +521,7 @@
if(droptype == "Yes")
ADD_TRAIT(I, TRAIT_NODROP, ADMIN_TRAIT)
else
to_chat(H, "<span class='warning'>You're not kawaii enough for this!</span>", confidential = TRUE)
to_chat(H, span_warning("You're not kawaii enough for this!"), confidential = TRUE)
if("masspurrbation")
if(!is_funmin)
return
+1 -1
View File
@@ -221,6 +221,6 @@
human_target.regenerate_icons()
log_admin("[key_name(usr)] changed the equipment of [key_name(human_target)] to [dresscode].")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] changed the equipment of [ADMIN_LOOKUPFLW(human_target)] to [dresscode].</span>")
message_admins(span_adminnotice("[key_name_admin(usr)] changed the equipment of [ADMIN_LOOKUPFLW(human_target)] to [dresscode]."))
return dresscode