mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
[MIRROR] refactors most spans (#9139)
Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: Kashargul <KashL@t-online.de>
This commit is contained in:
@@ -31,6 +31,4 @@
|
||||
var/F = file("broken_icons.txt")
|
||||
fdel(F)
|
||||
F << text
|
||||
to_world("<span class='filter_system'>Completeled successfully and written to [F]</span>")
|
||||
|
||||
|
||||
to_world(span_filter_system("Completeled successfully and written to [F]"))
|
||||
|
||||
@@ -190,7 +190,7 @@ Example: USING PROCCALL = BLOCKING, SELECT = FORCE_NULLS, PRIORITY = HIGH SELECT
|
||||
/client/proc/SDQL2_query(query_text as message)
|
||||
set category = "Debug.Misc" //CHOMPEdit
|
||||
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)]")
|
||||
@@ -224,7 +224,7 @@ Example: USING PROCCALL = BLOCKING, SELECT = FORCE_NULLS, PRIORITY = HIGH SELECT
|
||||
running += query
|
||||
var/msg = "Starting query #[query.id] - [query.get_query_text()]."
|
||||
if(usr)
|
||||
to_chat(usr, "<span class='admin'>[msg]</span>")
|
||||
to_chat(usr, span_admin("[msg]"))
|
||||
log_admin(msg)
|
||||
query.ARun()
|
||||
var/finished = FALSE
|
||||
@@ -243,7 +243,7 @@ Example: USING PROCCALL = BLOCKING, SELECT = FORCE_NULLS, PRIORITY = HIGH SELECT
|
||||
finished = FALSE
|
||||
else 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>")
|
||||
to_chat(usr, span_admin("SDQL query [query.get_query_text()] errored. It will NOT be automatically garbage collected. Please remove manually."))
|
||||
running -= query
|
||||
else
|
||||
if(query.finished)
|
||||
@@ -256,14 +256,14 @@ Example: USING PROCCALL = BLOCKING, SELECT = FORCE_NULLS, PRIORITY = HIGH SELECT
|
||||
//QDEL_IN(query, 50) Maybe when vorestation finally ports timers..
|
||||
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>")
|
||||
to_chat(usr, span_admin("SDQL query [query.get_query_text()] was halted. It will NOT be automatically garbage collected. Please remove manually."))
|
||||
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))
|
||||
@@ -801,7 +801,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>")
|
||||
to_chat(usr, span_danger("SDQL2: Unknown op [op]"))
|
||||
result = null
|
||||
else
|
||||
result = val
|
||||
@@ -895,7 +895,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>")
|
||||
to_chat(usr, span_danger("Parsing error on [querys_pos]\th query. Nothing was executed."))
|
||||
return list()
|
||||
query_tree = list()
|
||||
do_parse = 0
|
||||
@@ -941,16 +941,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))
|
||||
to_chat(usr, "<span class='danger'>World variables are not allowed to be accessed. Use global.</span>")
|
||||
to_chat(usr, span_danger("World variables are not allowed to be accessed. Use global."))
|
||||
return null
|
||||
|
||||
else if(expression [start] == "{" && long)
|
||||
if(lowertext(copytext(expression[start + 1], 1, 3)) != "0x")
|
||||
to_chat(usr, "<span class='danger'>Invalid pointer syntax: [expression[start + 1]]</span>")
|
||||
to_chat(usr, span_danger("Invalid pointer syntax: [expression[start + 1]]"))
|
||||
return null
|
||||
v = locate("\[[expression[start + 1]]]")
|
||||
if(!v)
|
||||
to_chat(usr, "<span class='danger'>Invalid pointer: [expression[start + 1]]</span>")
|
||||
to_chat(usr, span_danger("Invalid pointer: [expression[start + 1]]"))
|
||||
return null
|
||||
start++
|
||||
long = start < expression.len
|
||||
@@ -995,7 +995,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) && (!(round(index) == index) || L.len < index))
|
||||
to_chat(usr, "<span class='danger'>Invalid list index: [index]</span>")
|
||||
to_chat(usr, span_danger("Invalid list index: [index]"))
|
||||
return null
|
||||
return L[index]
|
||||
return v
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
/datum/SDQL_parser/proc/parse_error(error_message)
|
||||
error = 1
|
||||
to_chat(usr, "<span class='warning'>SQDL2 Parsing Error: [error_message]</span>")
|
||||
to_chat(usr, span_warning("SQDL2 Parsing Error: [error_message]"))
|
||||
return query.len + 1
|
||||
|
||||
/datum/SDQL_parser/proc/parse()
|
||||
@@ -632,4 +632,4 @@
|
||||
else
|
||||
i = variable(i, node)
|
||||
|
||||
return i
|
||||
return i
|
||||
|
||||
@@ -212,13 +212,13 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
MessageNoRecipient(parsed_message)
|
||||
send2adminchat() //VOREStation Add
|
||||
//show it to the person adminhelping too
|
||||
to_chat(C, "<span class='pm adminnotice'>PM to-<b>Admins</b>: [name]</span>")
|
||||
to_chat(C, span_pm(span_adminnotice("PM to-<b>Admins</b>: [name]")))
|
||||
|
||||
//send it to irc if nobody is on and tell us how many were on
|
||||
var/admin_number_present = send2irc_adminless_only(initiator_ckey, name)
|
||||
log_admin("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='pm notice'>No active admins are online, your adminhelp was sent to the admin discord.</span>") //VOREStation Edit
|
||||
to_chat(C, span_pm(span_notice("No active admins are online, your adminhelp was sent to the admin discord."))) //VOREStation Edit
|
||||
send2adminchat() //VOREStation Add
|
||||
//YW EDIT START
|
||||
var/list/adm = get_admin_counts()
|
||||
@@ -291,7 +291,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
//won't bug irc
|
||||
/datum/admin_help/proc/MessageNoRecipient(msg)
|
||||
var/ref_src = "\ref[src]"
|
||||
var/chat_msg = "<span class='pm adminnotice'><span class='adminhelp'>Ticket [TicketHref("#[id]", ref_src)]</span><b>: [LinkedReplyName(ref_src)] [FullMonty(ref_src)]:</b> [msg]</span>"
|
||||
var/chat_msg = span_pm(span_adminnotice("<span class='adminhelp'>Ticket [TicketHref("#[id]", ref_src)]</span><b>: [LinkedReplyName(ref_src)] [FullMonty(ref_src)]:</b> [msg]"))
|
||||
|
||||
AddInteraction("<font color='red'>[LinkedReplyName(ref_src)]: [msg]</font>")
|
||||
//send this msg to all admins
|
||||
@@ -307,11 +307,11 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
//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>")
|
||||
to_chat(usr, span_warning("This ticket is already open."))
|
||||
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>")
|
||||
to_chat(usr, span_warning("This user already has an active ticket, cannot reopen this one."))
|
||||
return
|
||||
|
||||
statclick = new(null, src)
|
||||
@@ -330,8 +330,8 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
|
||||
AddInteraction("<font color='purple'>Reopened by [key_name_admin(usr)]</font>")
|
||||
if(initiator)
|
||||
to_chat(initiator, "<span class='filter_adminlog'>[span_purple("Ticket [TicketHref("#[id]")] was reopened by [key_name(usr,FALSE,FALSE)].")]</span>")
|
||||
var/msg = "<span class='adminhelp'>Ticket [TicketHref("#[id]")] reopened by [key_name_admin(usr)].</span>"
|
||||
to_chat(initiator, span_filter_adminlog("[span_purple("Ticket [TicketHref("#[id]")] was reopened by [key_name(usr,FALSE,FALSE)].")]"))
|
||||
var/msg = span_adminhelp("Ticket [TicketHref("#[id]")] reopened by [key_name_admin(usr)].")
|
||||
message_admins(msg)
|
||||
log_admin(msg)
|
||||
feedback_inc("ahelp_reopen")
|
||||
@@ -362,9 +362,9 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
RemoveActive()
|
||||
state = AHELP_CLOSED
|
||||
GLOB.ahelp_tickets.ListInsert(src)
|
||||
AddInteraction("<span class='filter_adminlog'><font color='red'>Closed by [key_name_admin(usr)].</font></span>")
|
||||
AddInteraction(span_filter_adminlog("<font color='red'>Closed by [key_name_admin(usr)].</font>"))
|
||||
if(initiator)
|
||||
to_chat(initiator, "<span class='filter_adminlog'>[span_red("Ticket [TicketHref("#[id]")] was closed by [key_name(usr,FALSE,FALSE)].")]</span>")
|
||||
to_chat(initiator, span_filter_adminlog("[span_red("Ticket [TicketHref("#[id]")] was closed by [key_name(usr,FALSE,FALSE)].")]"))
|
||||
if(!silent)
|
||||
feedback_inc("ahelp_close")
|
||||
var/msg = "Ticket [TicketHref("#[id]")] closed by [key_name_admin(usr)]."
|
||||
@@ -387,9 +387,9 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
state = AHELP_RESOLVED
|
||||
GLOB.ahelp_tickets.ListInsert(src)
|
||||
|
||||
AddInteraction("<span class='filter_adminlog'><font color='green'>Resolved by [key_name_admin(usr)].</font></span>")
|
||||
AddInteraction(span_filter_adminlog("<font color='green'>Resolved by [key_name_admin(usr)].</font>"))
|
||||
if(initiator)
|
||||
to_chat(initiator, "<span class='filter_adminlog'>[span_green("Ticket [TicketHref("#[id]")] was marked resolved by [key_name(usr,FALSE,FALSE)].")]</span>")
|
||||
to_chat(initiator, span_filter_adminlog("[span_green("Ticket [TicketHref("#[id]")] was marked resolved by [key_name(usr,FALSE,FALSE)].")]"))
|
||||
if(!silent)
|
||||
feedback_inc("ahelp_resolve")
|
||||
var/msg = "Ticket [TicketHref("#[id]")] resolved by [key_name_admin(usr)]"
|
||||
@@ -640,12 +640,12 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
set name = "Adminhelp"
|
||||
|
||||
if(say_disabled) //This is here to try to identify lag problems
|
||||
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>")
|
||||
to_chat(usr, span_danger("Speech is currently admin-disabled."))
|
||||
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>")
|
||||
to_chat(src, span_danger("Error: Admin-PM: You cannot send adminhelps (Muted)."))
|
||||
return
|
||||
if(handle_spam_prevention(msg,MUTE_ADMINHELP))
|
||||
return
|
||||
@@ -666,10 +666,10 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
if(input == "Yes")
|
||||
if(current_ticket)
|
||||
current_ticket.MessageNoRecipient(msg)
|
||||
to_chat(usr, "<span class='pm adminnotice'>PM to-<b>Admins</b>: [msg]</span>")
|
||||
to_chat(usr, span_pm(span_adminnotice("PM to-<b>Admins</b>: [msg]")))
|
||||
return
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>Ticket not found, creating new one...</span>")
|
||||
to_chat(usr, span_warning("Ticket not found, creating new one..."))
|
||||
else
|
||||
current_ticket.AddInteraction("[key_name_admin(usr)] opened a new ticket.")
|
||||
current_ticket.Close()
|
||||
|
||||
@@ -29,14 +29,14 @@ Reason: Replaced with "Tickets System"
|
||||
|
||||
//handle muting and automuting
|
||||
if(prefs.muted & MUTE_ADMINHELP)
|
||||
to_chat(usr, "<span class='danger'>Error: You cannot request spice (muted from adminhelps).</span>")
|
||||
to_chat(usr, span_danger("Error: You cannot request spice (muted from adminhelps)."))
|
||||
return
|
||||
|
||||
if(tgui_alert(usr, "Are you sure you want to request the admins spice things up for you? You accept the consequences if you do.","Spicy!",list("Yes","No")) == "Yes")
|
||||
message_admins("[ADMIN_FULLMONTY(usr)] has requested the round be spiced up a little.")
|
||||
to_chat(usr, "<span class='notice'>You have requested some more spice in your round.</span>")
|
||||
to_chat(usr, span_notice("You have requested some more spice in your round."))
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>Spice request cancelled.</span>")
|
||||
to_chat(usr, span_notice("Spice request cancelled."))
|
||||
return
|
||||
|
||||
//if they requested spice, then remove spice verb temporarily to prevent spamming
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1)
|
||||
feedback_add_details("admin_verb","JM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
else
|
||||
to_chat(A, "<span class='filter_adminlog'>This mob is not located in the game world.</span>")
|
||||
to_chat(A, span_filter_adminlog("This mob is not located in the game world."))
|
||||
|
||||
/client/proc/jumptocoord(tx as num, ty as num, tz as num)
|
||||
set category = "Admin.Game" //CHOMPEdit
|
||||
@@ -92,7 +92,7 @@
|
||||
A.on_mob_jump()
|
||||
var/turf/T = locate(tx, ty, tz)
|
||||
if(!T)
|
||||
to_chat(usr, "<span class='warning'>Those coordinates are outside the boundaries of the map.</span>")
|
||||
to_chat(usr, span_warning("Those coordinates are outside the boundaries of the map."))
|
||||
return
|
||||
A.forceMove(T)
|
||||
feedback_add_details("admin_verb","JC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -220,7 +220,7 @@
|
||||
if(!tz) return
|
||||
var/turf/T = locate(tx, ty, tz)
|
||||
if(!T)
|
||||
to_chat(usr, "<span class='warning'>Those coordinates are outside the boundaries of the map.</span>")
|
||||
to_chat(usr, span_warning("Those coordinates are outside the boundaries of the map."))
|
||||
return
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
set category = null
|
||||
set name = "Admin PM Mob"
|
||||
if(!holder) //CHOMP Edit: Reverting this to let all staff respond to ahelps
|
||||
to_chat(src, "<span class='pm warning'>Error: Admin-PM-Context: Only administrators may use this command.</span>")
|
||||
to_chat(src, span_pm(span_warning("Error: Admin-PM-Context: Only administrators may use this command.")))
|
||||
return
|
||||
if( !ismob(M) || !M.client )
|
||||
return
|
||||
@@ -18,7 +18,7 @@
|
||||
set category = "Admin"
|
||||
set name = "Admin PM"
|
||||
if(!holder) //CHOMP Edit: Reverting this to let all staff respond to ahelps
|
||||
to_chat(src, "<span class='pm warning'>Error: Admin-PM-Panel: Only administrators may use this command.</span>")
|
||||
to_chat(src, span_pm(span_warning("Error: Admin-PM-Panel: Only administrators may use this command.")))
|
||||
return
|
||||
var/list/client/targets[0]
|
||||
for(var/client/T)
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
/client/proc/cmd_ahelp_reply(whom)
|
||||
if(prefs.muted & MUTE_ADMINHELP)
|
||||
to_chat(src, "<span class='pm warning'>Error: Admin-PM: You are unable to use admin PM-s (muted).</span>")
|
||||
to_chat(src, span_pm(span_warning("Error: Admin-PM: You are unable to use admin PM-s (muted).")))
|
||||
return
|
||||
var/client/C
|
||||
if(istext(whom))
|
||||
@@ -50,16 +50,16 @@
|
||||
C = whom
|
||||
if(!C)
|
||||
if(holder)
|
||||
to_chat(src, "<span class='pm warning'>Error: Admin-PM: Client not found.</span>")
|
||||
to_chat(src, span_pm(span_warning("Error: Admin-PM: Client not found.")))
|
||||
return
|
||||
|
||||
var/datum/ticket/T = C.current_ticket // CHOMPedit - Ticket System
|
||||
|
||||
if(T) // CHOMPedit - Ticket System
|
||||
message_admins("<span class='pm'>[key_name_admin(src)] has started replying to [key_name(C, 0, 0)]'s admin help.</span>")
|
||||
message_admins(span_pm("[key_name_admin(src)] has started replying to [key_name(C, 0, 0)]'s admin help."))
|
||||
var/msg = tgui_input_text(src,"Message:", "Private message to [key_name(C, 0, 0)]", multiline = TRUE)
|
||||
if (!msg)
|
||||
message_admins("<span class='pm'>[key_name_admin(src)] has cancelled their reply to [key_name(C, 0, 0)]'s admin help.</span>")
|
||||
message_admins(span_pm("[key_name_admin(src)] has cancelled their reply to [key_name(C, 0, 0)]'s admin help."))
|
||||
return
|
||||
cmd_admin_pm(whom, msg, T) // CHOMPedit - Ticket System
|
||||
|
||||
@@ -67,12 +67,12 @@
|
||||
//Fetching a message if needed. src is the sender and C is the target client
|
||||
/client/proc/cmd_admin_pm(whom, msg, datum/ticket/T) // CHOMPedit - Ticket System
|
||||
if(prefs.muted & MUTE_ADMINHELP)
|
||||
to_chat(src, "<span class='pm warning'>Error: Admin-PM: You are unable to use admin PM-s (muted).</span>")
|
||||
to_chat(src, span_pm(span_warning("Error: Admin-PM: You are unable to use admin PM-s (muted).")))
|
||||
return
|
||||
|
||||
if(!holder && !current_ticket) //no ticket? https://www.youtube.com/watch?v=iHSPf6x1Fdo
|
||||
to_chat(src, "<span class='pm warning'>You can no longer reply to this ticket, please open another one by using the Adminhelp verb if need be.</span>")
|
||||
to_chat(src, "<span class='pm notice'>Message: [msg]</span>")
|
||||
to_chat(src, span_pm(span_warning("You can no longer reply to this ticket, please open another one by using the Adminhelp verb if need be.")))
|
||||
to_chat(src, span_pm(span_notice("Message: [msg]")))
|
||||
return
|
||||
|
||||
var/client/recipient
|
||||
@@ -97,14 +97,14 @@
|
||||
if(!msg)
|
||||
return
|
||||
if(holder)
|
||||
to_chat(src, "<span class='pm warning'>Error: Use the admin IRC channel, nerd.</span>")
|
||||
to_chat(src, span_pm(span_warning("Error: Use the admin IRC channel, nerd.")))
|
||||
return
|
||||
|
||||
|
||||
else
|
||||
if(!recipient)
|
||||
if(holder)
|
||||
to_chat(src, "<span class='pm warning'>Error: Admin-PM: Client not found.</span>")
|
||||
to_chat(src, span_pm(span_warning("Error: Admin-PM: Client not found.")))
|
||||
to_chat(src, msg)
|
||||
else
|
||||
current_ticket.MessageNoRecipient(msg)
|
||||
@@ -118,12 +118,12 @@
|
||||
return
|
||||
|
||||
if(prefs.muted & MUTE_ADMINHELP)
|
||||
to_chat(src, "<span class='pm warning'>Error: Admin-PM: You are unable to use admin PM-s (muted).</span>")
|
||||
to_chat(src, span_pm(span_warning("Error: Admin-PM: You are unable to use admin PM-s (muted).")))
|
||||
return
|
||||
|
||||
if(!recipient)
|
||||
if(holder)
|
||||
to_chat(src, "<span class='pm warning'>Error: Admin-PM: Client not found.</span>")
|
||||
to_chat(src, span_pm(span_warning("Error: Admin-PM: Client not found.")))
|
||||
else
|
||||
current_ticket.MessageNoRecipient(msg)
|
||||
return
|
||||
@@ -142,27 +142,27 @@
|
||||
var/keywordparsedmsg = keywords_lookup(msg)
|
||||
|
||||
if(irc)
|
||||
to_chat(src, "<span class='pm notice'>PM to-<b>Admins</b>: [rawmsg]</span>")
|
||||
admin_ticket_log(src, "<span class='pm warning'>Reply PM from-<b>[key_name(src, TRUE, TRUE)]</b> to <i>IRC</i>: [keywordparsedmsg]</span>")
|
||||
to_chat(src, span_pm(span_notice("PM to-<b>Admins</b>: [rawmsg]")))
|
||||
admin_ticket_log(src, span_pm(span_warning("Reply PM from-<b>[key_name(src, TRUE, TRUE)]</b> to <i>IRC</i>: [keywordparsedmsg]")))
|
||||
ircreplyamount--
|
||||
send2irc("Reply: [ckey]",rawmsg)
|
||||
else
|
||||
if(recipient.holder)
|
||||
if(holder) //both are admins
|
||||
to_chat(recipient, "<span class='pm warning'>Admin PM from-<b>[key_name(src, recipient, 1)]</b>: [keywordparsedmsg]</span>")
|
||||
to_chat(src, "<span class='pm notice'>Admin PM to-<b>[key_name(recipient, src, 1)]</b>: [keywordparsedmsg]</span>")
|
||||
to_chat(recipient, span_pm(span_warning("Admin PM from-<b>[key_name(src, recipient, 1)]</b>: [keywordparsedmsg]")))
|
||||
to_chat(src, span_pm(span_notice("Admin PM to-<b>[key_name(recipient, src, 1)]</b>: [keywordparsedmsg]")))
|
||||
|
||||
//omg this is dumb, just fill in both their tickets
|
||||
var/interaction_message = "<span class='pm notice'>PM from-<b>[key_name(src, recipient, 1)]</b> to-<b>[key_name(recipient, src, 1)]</b>: [keywordparsedmsg]</span>"
|
||||
var/interaction_message = span_pm(span_notice("PM from-<b>[key_name(src, recipient, 1)]</b> to-<b>[key_name(recipient, src, 1)]</b>: [keywordparsedmsg]"))
|
||||
admin_ticket_log(src, interaction_message)
|
||||
if(recipient != src) //reeee
|
||||
admin_ticket_log(recipient, interaction_message)
|
||||
|
||||
else //recipient is an admin but sender is not
|
||||
var/replymsg = "<span class='pm warning'>Reply PM from-<b>[key_name(src, recipient, 1)]</b>: [keywordparsedmsg]</span>"
|
||||
var/replymsg = span_pm(span_warning("Reply PM from-<b>[key_name(src, recipient, 1)]</b>: [keywordparsedmsg]"))
|
||||
admin_ticket_log(src, replymsg)
|
||||
to_chat(recipient, replymsg)
|
||||
to_chat(src, "<span class='pm notice'>PM to-<b>Admins</b>: [msg]</span>")
|
||||
to_chat(src, span_pm(span_notice("PM to-<b>Admins</b>: [msg]")))
|
||||
|
||||
//play the recieving admin the adminhelp sound (if they have them enabled)
|
||||
if(recipient.prefs?.read_preference(/datum/preference/toggle/holder/play_adminhelp_ping))
|
||||
@@ -173,12 +173,12 @@
|
||||
if(!recipient.current_ticket)
|
||||
new /datum/ticket(msg, recipient, TRUE, 0) // CHOMPedit - Ticket System
|
||||
|
||||
to_chat(recipient, "<span class='pm warning' size='4'><b>-- Administrator private message --</b></span>")
|
||||
to_chat(recipient, "<span class='pm warning'>Admin PM from-<b>[key_name(src, recipient, 0)]</b>: [msg]</span>")
|
||||
to_chat(recipient, "<span class='pm warning'><i>Click on the administrator's name to reply.</i></span>")
|
||||
to_chat(src, "<span class='pm notice'>Admin PM to-<b>[key_name(recipient, src, 1)]</b>: [msg]</span>")
|
||||
to_chat(recipient, span_pm(span_warning(span_huge("<b>-- Administrator private message --</b>"))))
|
||||
to_chat(recipient, span_pm(span_warning("Admin PM from-<b>[key_name(src, recipient, 0)]</b>: [msg]")))
|
||||
to_chat(recipient, span_pm(span_warning("<i>Click on the administrator's name to reply.</i>")))
|
||||
to_chat(src, span_pm(span_notice("Admin PM to-<b>[key_name(recipient, src, 1)]</b>: [msg]")))
|
||||
|
||||
admin_ticket_log(recipient, "<span class='pm notice'>PM From [key_name_admin(src)]: [keywordparsedmsg]</span>")
|
||||
admin_ticket_log(recipient, span_pm(span_notice("PM From [key_name_admin(src)]: [keywordparsedmsg]")))
|
||||
|
||||
//always play non-admin recipients the adminhelp sound
|
||||
recipient << 'sound/effects/adminhelp.ogg'
|
||||
@@ -197,7 +197,7 @@
|
||||
return
|
||||
|
||||
else //neither are admins
|
||||
to_chat(src, "<span class='pm warning'>Error: Admin-PM: Non-admin to non-admin PM communication is forbidden.</span>")
|
||||
to_chat(src, span_pm(span_warning("Error: Admin-PM: Non-admin to non-admin PM communication is forbidden.")))
|
||||
return
|
||||
|
||||
if(irc)
|
||||
@@ -205,7 +205,7 @@
|
||||
for(var/client/X in GLOB.admins)
|
||||
if(!check_rights(R_ADMIN|R_SERVER, 0, X)) //CHOMPEdit
|
||||
continue
|
||||
to_chat(X, "<span class='pm notice'><B>PM: [key_name(src, X, 0)]->IRC:</B> [keywordparsedmsg]</span>")
|
||||
to_chat(X, span_pm(span_notice("<B>PM: [key_name(src, X, 0)]->IRC:</B> [keywordparsedmsg]")))
|
||||
else
|
||||
log_admin("PM: [key_name(src)]->[key_name(recipient)]: [rawmsg]")
|
||||
//we don't use message_admins here because the sender/receiver might get it too
|
||||
@@ -213,7 +213,7 @@
|
||||
if(!check_rights(R_ADMIN|R_SERVER, 0, X)) //CHOMPEdit
|
||||
continue
|
||||
if(X.key!=key && X.key!=recipient.key) //check client/X is an admin and isn't the sender or recipient
|
||||
to_chat(X, "<span class='pm notice'><B>PM: [key_name(src, X, 0)]->[key_name(recipient, X, 0)]:</B> [keywordparsedmsg]</span>" )
|
||||
to_chat(X, span_pm(span_notice("<B>PM: [key_name(src, X, 0)]->[key_name(recipient, X, 0)]:</B> [keywordparsedmsg]")))
|
||||
|
||||
/proc/IrcPm(target,msg,sender)
|
||||
var/client/C = GLOB.directory[target]
|
||||
@@ -262,11 +262,11 @@
|
||||
message_admins("IRC message from [sender] to [key_name_admin(C)] : [msg]")
|
||||
log_admin("IRC PM: [sender] -> [key_name(C)] : [msg]")
|
||||
|
||||
to_chat(C, "<span class='pm warning'><font size='4'><b>-- Administrator private message --</b></font></span>")
|
||||
to_chat(C, "<span class='pm warning'>Admin PM from-<b><a href='?priv_msg=[stealthkey]'>[adminname]</A></b>: [msg]</span>")
|
||||
to_chat(C, "<span class='pm warning'><i>Click on the administrator's name to reply.</i></span>")
|
||||
to_chat(C, span_pm(span_warning(span_huge("<b>-- Administrator private message --</b>"))))
|
||||
to_chat(C, span_pm(span_warning("Admin PM from-<b><a href='?priv_msg=[stealthkey]'>[adminname]</A></b>: [msg]")))
|
||||
to_chat(C, span_pm(span_warning("<i>Click on the administrator's name to reply.</i>")))
|
||||
|
||||
admin_ticket_log(C, "<span class='pm notice'>PM From [irc_tagged]: [msg]</span>")
|
||||
admin_ticket_log(C, span_pm(span_notice("PM From [irc_tagged]: [msg]")))
|
||||
|
||||
window_flash(C)
|
||||
//always play non-admin recipients the adminhelp sound
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
for(var/client/C in GLOB.admins)
|
||||
if(check_rights(R_ADMIN, 0, C))
|
||||
to_chat(C, "<span class='admin_channel'>" + create_text_tag("admin", "ADMIN:", C) + " <span class='name'>[key_name(usr, 1)]</span>([admin_jump_link(mob, src)]): <span class='message'>[msg]</span></span>")
|
||||
to_chat(C, span_admin_channel("" + create_text_tag("admin", "ADMIN:", C) + " <span class='name'>[key_name(usr, 1)]</span>([admin_jump_link(mob, src)]): <span class='message'>[msg]</span>"))
|
||||
|
||||
feedback_add_details("admin_verb","M") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -33,10 +33,10 @@
|
||||
|
||||
var/sender_name = key_name(usr, 1)
|
||||
if(check_rights(R_ADMIN, 0))
|
||||
sender_name = "<span class='admin'>[sender_name]</span>"
|
||||
sender_name = span_admin("[sender_name]")
|
||||
for(var/client/C in GLOB.admins)
|
||||
if(check_rights(R_ADMIN|R_MOD|R_SERVER)) //VOREStation Edit
|
||||
to_chat(C, "<span class='mod_channel'>" + create_text_tag("mod", "MOD:", C) + " <span class='name'>[sender_name]</span>([admin_jump_link(mob, C.holder)]): <span class='message'>[msg]</span></span>")
|
||||
to_chat(C, span_mod_channel("" + create_text_tag("mod", "MOD:", C) + " <span class='name'>[sender_name]</span>([admin_jump_link(mob, C.holder)]): <span class='message'>[msg]</span>"))
|
||||
|
||||
feedback_add_details("admin_verb","MS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -56,8 +56,8 @@
|
||||
|
||||
var/sender_name = key_name(usr, 1)
|
||||
if(check_rights(R_ADMIN, 0))
|
||||
sender_name = "<span class='admin'>[sender_name]</span>"
|
||||
sender_name = span_admin("[sender_name]")
|
||||
for(var/client/C in GLOB.admins)
|
||||
to_chat(C, "<span class='event_channel'>" + create_text_tag("event", "EVENT:", C) + " <span class='name'>[sender_name]</span>([admin_jump_link(mob, C.holder)]): <span class='message'>[msg]</span></span>")
|
||||
to_chat(C, span_event_channel("" + create_text_tag("event", "EVENT:", C) + " <span class='name'>[sender_name]</span>([admin_jump_link(mob, C.holder)]): <span class='message'>[msg]</span>"))
|
||||
|
||||
feedback_add_details("admin_verb","GS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
var/is_antag = usr.mind && usr.mind.special_role
|
||||
|
||||
if(!is_antag && !is_admin) // Non-antagonists and non-admins have no business using this.
|
||||
to_chat(usr, "<span class='warning'>Sorry, but only certain antagonists or administrators can use this verb.</span>")
|
||||
to_chat(usr, span_warning("Sorry, but only certain antagonists or administrators can use this verb."))
|
||||
return
|
||||
|
||||
else if(is_antag && !is_admin) // Is an antag, and not an admin, meaning we need to check if their antag type allows AOOC.
|
||||
var/datum/antagonist/A = get_antag_data(usr.mind.special_role)
|
||||
if(!A || !A.can_speak_aooc || !A.can_hear_aooc)
|
||||
to_chat(usr, "<span class='warning'>Sorry, but your antagonist type is not allowed to speak in AOOC.</span>")
|
||||
to_chat(usr, span_warning("Sorry, but your antagonist type is not allowed to speak in AOOC."))
|
||||
return
|
||||
|
||||
msg = sanitize(msg)
|
||||
@@ -31,12 +31,12 @@
|
||||
|
||||
for(var/mob/M in mob_list)
|
||||
if(check_rights(R_ADMIN|R_MOD|R_EVENT, 0, M)) // Staff can see AOOC unconditionally, and with more details.
|
||||
to_chat(M, "<span class='ooc'><span class='aooc'>[create_text_tag("aooc", "Antag-OOC:", M.client)] <EM>[get_options_bar(src, 0, 1, 1)]([admin_jump_link(usr, M.client.holder)]):</EM> <span class='message'>[msg]</span></span></span>")
|
||||
to_chat(M, span_ooc(span_aooc("[create_text_tag("aooc", "Antag-OOC:", M.client)] <EM>[get_options_bar(src, 0, 1, 1)]([admin_jump_link(usr, M.client.holder)]):</EM> <span class='message'>[msg]</span>")))
|
||||
else if(M.client) // Players can only see AOOC if observing, or if they are an antag type allowed to use AOOC.
|
||||
var/datum/antagonist/A = null
|
||||
if(M.mind) // Observers don't have minds, but they should still see AOOC.
|
||||
A = get_antag_data(M.mind.special_role)
|
||||
if((M.mind && M.mind.special_role && A && A.can_hear_aooc) || isobserver(M)) // Antags must have their type be allowed to AOOC to see AOOC. This prevents, say, ERT from seeing AOOC.
|
||||
to_chat(M, "<span class='ooc'><span class='aooc'>[create_text_tag("aooc", "Antag-OOC:", M.client)] <EM>[player_display]:</EM> <span class='message'>[msg]</span></span></span>")
|
||||
to_chat(M, span_ooc(span_aooc("[create_text_tag("aooc", "Antag-OOC:", M.client)] <EM>[player_display]:</EM> <span class='message'>[msg]</span>")))
|
||||
|
||||
log_aooc(msg,src)
|
||||
|
||||
@@ -14,17 +14,17 @@
|
||||
//all plumbing - yes, some things might get stated twice, doesn't matter.
|
||||
for (var/obj/machinery/atmospherics/plumbing in machines)
|
||||
if (plumbing.nodealert)
|
||||
to_chat(usr, "<span class='filter_adminlog warning'>Unconnected [plumbing.name] located at [plumbing.x],[plumbing.y],[plumbing.z] ([get_area(plumbing.loc)])</span>")
|
||||
to_chat(usr, span_filter_adminlog(span_warning("Unconnected [plumbing.name] located at [plumbing.x],[plumbing.y],[plumbing.z] ([get_area(plumbing.loc)])")))
|
||||
|
||||
//Manifolds
|
||||
for (var/obj/machinery/atmospherics/pipe/manifold/pipe in machines)
|
||||
if (!pipe.node1 || !pipe.node2 || !pipe.node3)
|
||||
to_chat(usr, "<span class='filter_adminlog warning'>Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])</span>")
|
||||
to_chat(usr, span_filter_adminlog(span_warning("Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])")))
|
||||
|
||||
//Pipes
|
||||
for (var/obj/machinery/atmospherics/pipe/simple/pipe in machines)
|
||||
if (!pipe.node1 || !pipe.node2)
|
||||
to_chat(usr, "<span class='filter_adminlog warning'>Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])</span>")
|
||||
to_chat(usr, span_filter_adminlog(span_warning("Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])")))
|
||||
|
||||
to_chat(usr, "Checking for overlapping pipes...")
|
||||
next_turf:
|
||||
@@ -36,7 +36,7 @@
|
||||
for(var/connect_type in pipe.connect_types)
|
||||
connect_types[connect_type] += 1
|
||||
if(connect_types[1] > 1 || connect_types[2] > 1 || connect_types[3] > 1)
|
||||
to_chat(usr, "<span class='filter_adminlog warning'>Overlapping pipe ([pipe.name]) located at [T.x],[T.y],[T.z] ([get_area(T)])</span>")
|
||||
to_chat(usr, span_filter_adminlog(span_warning("Overlapping pipe ([pipe.name]) located at [T.x],[T.y],[T.z] ([get_area(T)])")))
|
||||
continue next_turf
|
||||
to_chat(usr, "Done")
|
||||
|
||||
@@ -52,9 +52,9 @@
|
||||
if (!PN.nodes || !PN.nodes.len)
|
||||
if(PN.cables && (PN.cables.len > 1))
|
||||
var/obj/structure/cable/C = PN.cables[1]
|
||||
to_chat(usr, "<span class='filter_adminlog'>Powernet with no nodes! (number [PN.number]) - example cable at [C.x], [C.y], [C.z] in area [get_area(C.loc)]</span>")
|
||||
to_chat(usr, span_filter_adminlog("Powernet with no nodes! (number [PN.number]) - example cable at [C.x], [C.y], [C.z] in area [get_area(C.loc)]"))
|
||||
|
||||
if (!PN.cables || (PN.cables.len < 10))
|
||||
if(PN.cables && (PN.cables.len > 1))
|
||||
var/obj/structure/cable/C = PN.cables[1]
|
||||
to_chat(usr, "<span class='filter_adminlog'>Powernet with fewer than 10 cables! (number [PN.number]) - example cable at [C.x], [C.y], [C.z] in area [get_area(C.loc)]</span>")
|
||||
to_chat(usr, span_filter_adminlog("Powernet with fewer than 10 cables! (number [PN.number]) - example cable at [C.x], [C.y], [C.z] in area [get_area(C.loc)]"))
|
||||
|
||||
@@ -301,7 +301,7 @@
|
||||
area_enabled = 1
|
||||
area_name = tgui_input_text(usr, "New area name", "Room Buildmode", max_length = MAX_NAME_LEN)
|
||||
if(isnull(area_name))
|
||||
to_chat(usr, "<span class='notice'>You must enter a non-null name.</span>")
|
||||
to_chat(usr, span_notice("You must enter a non-null name."))
|
||||
area_enabled = 0
|
||||
return
|
||||
area_name = sanitize(area_name,MAX_NAME_LEN)
|
||||
@@ -418,7 +418,7 @@ CHOMP Remove end */
|
||||
qdel(object)
|
||||
else if(pa.Find("ctrl"))
|
||||
holder.buildmode.objholder = object.type
|
||||
to_chat(user, "<span class='notice'>[object]([object.type]) copied to buildmode.</span>")
|
||||
to_chat(user, span_notice("[object]([object.type]) copied to buildmode."))
|
||||
if(pa.Find("middle"))
|
||||
holder.buildmode.objholder = text2path("[object.type]")
|
||||
if(holder.buildmode.objsay)
|
||||
@@ -430,13 +430,13 @@ CHOMP Remove end */
|
||||
log_admin("[key_name(usr)] modified [object.name]'s [holder.buildmode.varholder] to [holder.buildmode.valueholder]")
|
||||
object.vars[holder.buildmode.varholder] = holder.buildmode.valueholder
|
||||
else
|
||||
to_chat(user, "<span class='danger'>[initial(object.name)] does not have a var called '[holder.buildmode.varholder]'</span>")
|
||||
to_chat(user, span_danger("[initial(object.name)] does not have a var called '[holder.buildmode.varholder]'"))
|
||||
if(pa.Find("right"))
|
||||
if(object.vars.Find(holder.buildmode.varholder))
|
||||
log_admin("[key_name(usr)] modified [object.name]'s [holder.buildmode.varholder] to [holder.buildmode.valueholder]")
|
||||
object.vars[holder.buildmode.varholder] = initial(object.vars[holder.buildmode.varholder])
|
||||
else
|
||||
to_chat(user, "<span class='danger'>[initial(object.name)] does not have a var called '[holder.buildmode.varholder]'</span>")
|
||||
to_chat(user, span_danger("[initial(object.name)] does not have a var called '[holder.buildmode.varholder]'"))
|
||||
|
||||
if(BUILDMODE_THROW)
|
||||
if(pa.Find("left"))
|
||||
@@ -450,19 +450,19 @@ CHOMP Remove end */
|
||||
if(BUILDMODE_ROOM)
|
||||
if(pa.Find("left"))
|
||||
holder.buildmode.coordA = get_turf(object)
|
||||
to_chat(user, "<span class='notice'>Defined [object] ([object.type]) as point A.</span>")
|
||||
to_chat(user, span_notice("Defined [object] ([object.type]) as point A."))
|
||||
|
||||
if(pa.Find("right"))
|
||||
holder.buildmode.coordB = get_turf(object)
|
||||
to_chat(user, "<span class='notice'>Defined [object] ([object.type]) as point B.</span>")
|
||||
to_chat(user, span_notice("Defined [object] ([object.type]) as point B."))
|
||||
|
||||
if(holder.buildmode.coordA && holder.buildmode.coordB)
|
||||
if(isnull(holder.buildmode.area_name))
|
||||
to_chat(user, "<span class='notice'>ERROR: Insert area name before use.</span>")
|
||||
to_chat(user, span_notice("ERROR: Insert area name before use."))
|
||||
holder.buildmode.coordA = null
|
||||
holder.buildmode.coordB = null
|
||||
return
|
||||
to_chat(user, "<span class='notice'>A and B set, creating rectangle.</span>")
|
||||
to_chat(user, span_notice("A and B set, creating rectangle."))
|
||||
holder.buildmode.make_rectangle(
|
||||
holder.buildmode.coordA,
|
||||
holder.buildmode.coordB,
|
||||
@@ -476,14 +476,14 @@ CHOMP Remove end */
|
||||
if(BUILDMODE_LADDER)
|
||||
if(pa.Find("left"))
|
||||
holder.buildmode.coordA = get_turf(object)
|
||||
to_chat(user, "<span class='notice'>Defined [object] ([object.type]) as upper ladder location.</span>")
|
||||
to_chat(user, span_notice("Defined [object] ([object.type]) as upper ladder location."))
|
||||
|
||||
if(pa.Find("right"))
|
||||
holder.buildmode.coordB = get_turf(object)
|
||||
to_chat(user, "<span class='notice'>Defined [object] ([object.type]) as lower ladder location.</span>")
|
||||
to_chat(user, span_notice("Defined [object] ([object.type]) as lower ladder location."))
|
||||
|
||||
if(holder.buildmode.coordA && holder.buildmode.coordB)
|
||||
to_chat(user, "<span class='notice'>Ladder locations set, building ladders.</span>")
|
||||
to_chat(user, span_notice("Ladder locations set, building ladders."))
|
||||
var/obj/structure/ladder/A = new /obj/structure/ladder/up(holder.buildmode.coordA)
|
||||
var/obj/structure/ladder/B = new /obj/structure/ladder(holder.buildmode.coordB)
|
||||
A.target_up = B
|
||||
@@ -655,7 +655,7 @@ CHOMP Remove end */
|
||||
|
||||
if(BUILDMODE_DROP)
|
||||
if(ispath(holder.buildmode.objholder,/turf))
|
||||
to_chat(user, "<span class='warning'>Cannot use turfs with this mode.</span>")
|
||||
to_chat(user, span_warning("Cannot use turfs with this mode."))
|
||||
return
|
||||
if(pa.Find("left") && !pa.Find("ctrl"))
|
||||
if(ispath(holder.buildmode.objholder))
|
||||
@@ -667,7 +667,7 @@ CHOMP Remove end */
|
||||
FE.crushing = TRUE
|
||||
else if(pa.Find("ctrl"))
|
||||
holder.buildmode.objholder = object.type
|
||||
to_chat(user, "<span class='notice'>[object]([object.type]) copied to buildmode.</span>")
|
||||
to_chat(user, span_notice("[object]([object.type]) copied to buildmode."))
|
||||
if(pa.Find("middle"))
|
||||
holder.buildmode.objholder = text2path("[object.type]")
|
||||
if(holder.buildmode.objsay)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
if(!H) return
|
||||
|
||||
if(!H.client)
|
||||
to_chat(usr, "<span class='filter_arning'> Only mobs with clients can alter their own appearance.</span>")
|
||||
to_chat(usr, span_filter_warning(" Only mobs with clients can alter their own appearance."))
|
||||
return
|
||||
var/datum/gender/T = gender_datums[H.get_visible_gender()]
|
||||
switch(tgui_alert(usr, "Do you wish for [H] to be allowed to select non-whitelisted races?","Alter Mob Appearance","Yes","No","Cancel"))
|
||||
@@ -44,7 +44,7 @@
|
||||
var/mob/living/carbon/human/M = tgui_input_list(usr, "Select mob.", "Edit Appearance", human_mob_list)
|
||||
|
||||
if(!istype(M, /mob/living/carbon/human))
|
||||
to_chat(usr, "<span class='warning'>You can only do this to humans!</span>")
|
||||
to_chat(usr, span_warning("You can only do this to humans!"))
|
||||
return
|
||||
if(tgui_alert(usr, "Are you sure you wish to edit this mob's appearance? Skrell, Unathi, Tajaran can result in unintended consequences.","Danger!",list("Yes","No")) != "Yes")
|
||||
return
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
|
||||
custom_event_msg = input
|
||||
|
||||
to_world("<h1 class='alert'>Custom Event</h1>")
|
||||
to_world("<h2 class='alert'>A custom event is starting. OOC Info:</h2>")
|
||||
to_world("<span class='alert'>[custom_event_msg]</span>")
|
||||
to_world("<h1>[span_alert("Custom Event")]</h1>")
|
||||
to_world("<h2>[span_alert("A custom event is starting. OOC Info:")]</h2>")
|
||||
to_world(span_alert("[custom_event_msg]"))
|
||||
to_world("<br>")
|
||||
|
||||
SSwebhooks.send(
|
||||
@@ -37,10 +37,10 @@
|
||||
set name = "Custom Event Info"
|
||||
|
||||
if(!custom_event_msg || custom_event_msg == "")
|
||||
to_chat(src, "<span class='filter_notice'>There currently is no known custom event taking place.</span>")
|
||||
to_chat(src, "<span class='filter_notice'>Keep in mind: it is possible that an admin has not properly set this.</span>")
|
||||
to_chat(src, span_filter_notice("There currently is no known custom event taking place."))
|
||||
to_chat(src, span_filter_notice("Keep in mind: it is possible that an admin has not properly set this."))
|
||||
return
|
||||
|
||||
to_chat(src, "<h1 class='filter_notice alert'>Custom Event</h1>")
|
||||
to_chat(src, "<h2 class='filter_notice alert'>A custom event is taking place. OOC Info:</h2>")
|
||||
to_chat(src, "<span class='filter_notice alert'>[custom_event_msg]<br></span>")
|
||||
to_chat(src, "<h1>[span_filter_notice(span_alert("Custom Event"))]</h1>")
|
||||
to_chat(src, "<h2>[span_filter_notice(span_alert("A custom event is taking place. OOC Info:"))]</h2>")
|
||||
to_chat(src, span_filter_notice(span_alert("[custom_event_msg]<br>")))
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
if(!src.mob)
|
||||
return
|
||||
if(prefs.muted & MUTE_DEADCHAT)
|
||||
to_chat(src, "<span class='warning'>You cannot send DSAY messages (muted).</span>")
|
||||
to_chat(src, span_warning("You cannot send DSAY messages (muted)."))
|
||||
return
|
||||
|
||||
if(!prefs?.read_preference(/datum/preference/toggle/show_dsay))
|
||||
to_chat(src, "<span class='warning'>You have deadchat muted.</span>")
|
||||
to_chat(src, span_warning("You have deadchat muted."))
|
||||
return
|
||||
|
||||
if (src.handle_spam_prevention(msg,MUTE_DEADCHAT))
|
||||
@@ -26,6 +26,6 @@
|
||||
if (!msg)
|
||||
return
|
||||
|
||||
say_dead_direct("<span class='name'>[stafftype]([src.holder.fakekey ? src.holder.fakekey : src.key])</span> says, <span class='message'>\"[msg]\"</span>")
|
||||
say_dead_direct(span_name("[stafftype]([src.holder.fakekey ? src.holder.fakekey : src.key])</span> says, <span class='message'>\"[msg]\""))
|
||||
|
||||
feedback_add_details("admin_verb","D") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
user = usr
|
||||
I = user.get_active_hand()
|
||||
if(!I || !istype(I))
|
||||
to_chat(user, "<span class='warning'>You need to have something in your active hand, to use this verb.</span>")
|
||||
to_chat(user, span_warning("You need to have something in your active hand, to use this verb."))
|
||||
return
|
||||
var/weapon_attack_speed = user.get_attack_speed(I) / 10
|
||||
var/weapon_damage = I.force
|
||||
@@ -52,24 +52,24 @@
|
||||
P = ammo.BB
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='warning'>DPS calculation by this verb is not supported for \the [G]'s type. Energy or Ballistic only, sorry.</span>")
|
||||
to_chat(user, span_warning("DPS calculation by this verb is not supported for \the [G]'s type. Energy or Ballistic only, sorry."))
|
||||
|
||||
weapon_damage = P.damage
|
||||
weapon_attack_speed = G.fire_delay / 10
|
||||
qdel(P)
|
||||
|
||||
var/DPS = weapon_damage / weapon_attack_speed
|
||||
to_chat(user, "<span class='notice'>Damage: [weapon_damage][modified_damage_percent != 1 ? " (Modified by [modified_damage_percent*100]%)":""]</span>")
|
||||
to_chat(user, "<span class='notice'>Attack Speed: [weapon_attack_speed]/s</span>")
|
||||
to_chat(user, "<span class='notice'>\The [I] does <b>[DPS]</b> damage per second.</span>")
|
||||
to_chat(user, span_notice("Damage: [weapon_damage][modified_damage_percent != 1 ? " (Modified by [modified_damage_percent*100]%)":""]"))
|
||||
to_chat(user, span_notice("Attack Speed: [weapon_attack_speed]/s"))
|
||||
to_chat(user, span_notice("\The [I] does <b>[DPS]</b> damage per second."))
|
||||
if(DPS > 0)
|
||||
to_chat(user, "<span class='notice'>At your maximum health ([user.getMaxHealth()]), it would take approximately;</span>")
|
||||
to_chat(user, "<span class='notice'>[(user.getMaxHealth() - CONFIG_GET(number/health_threshold_softcrit)) / DPS] seconds to softcrit you. ([CONFIG_GET(number/health_threshold_softcrit)] health)</span>") // CHOMPEdit
|
||||
to_chat(user, "<span class='notice'>[(user.getMaxHealth() - CONFIG_GET(number/health_threshold_crit)) / DPS] seconds to hardcrit you. ([CONFIG_GET(number/health_threshold_crit)] health)</span>") // CHOMPEdit
|
||||
to_chat(user, "<span class='notice'>[(user.getMaxHealth() - CONFIG_GET(number/health_threshold_dead)) / DPS] seconds to kill you. ([CONFIG_GET(number/health_threshold_dead)] health)</span>") // CHOMPEdit
|
||||
to_chat(user, span_notice("At your maximum health ([user.getMaxHealth()]), it would take approximately;"))
|
||||
to_chat(user, span_notice("[(user.getMaxHealth() - CONFIG_GET(number/health_threshold_softcrit)) / DPS] seconds to softcrit you. ([CONFIG_GET(number/health_threshold_softcrit)] health)")) // CHOMPEdit
|
||||
to_chat(user, span_notice("[(user.getMaxHealth() - CONFIG_GET(number/health_threshold_crit)) / DPS] seconds to hardcrit you. ([CONFIG_GET(number/health_threshold_crit)] health)")) // CHOMPEdit
|
||||
to_chat(user, span_notice("[(user.getMaxHealth() - CONFIG_GET(number/health_threshold_dead)) / DPS] seconds to kill you. ([CONFIG_GET(number/health_threshold_dead)] health)")) // CHOMPEdit
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need to be a living mob, with hands, and for an object to be in your active hand, to use this verb.</span>")
|
||||
to_chat(user, span_warning("You need to be a living mob, with hands, and for an object to be in your active hand, to use this verb."))
|
||||
return
|
||||
|
||||
/client/proc/Cell()
|
||||
@@ -173,7 +173,7 @@
|
||||
M:Alienize()
|
||||
feedback_add_details("admin_verb","MKAL") //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.")
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] made [key_name(M)] into an alien.</span>", 1)
|
||||
message_admins(span_notice("[key_name_admin(usr)] made [key_name(M)] into an alien."), 1)
|
||||
else
|
||||
tgui_alert_async(usr, "Invalid mob")
|
||||
|
||||
|
||||
@@ -14,15 +14,15 @@
|
||||
return
|
||||
|
||||
if(!istype(H))
|
||||
to_chat(usr,"<span class='warning'>That mob type ([H.type]) doesn't support NIFs, sorry.</span>")
|
||||
to_chat(usr,span_warning("That mob type ([H.type]) doesn't support NIFs, sorry."))
|
||||
return
|
||||
|
||||
if(!H.get_organ(BP_HEAD))
|
||||
to_chat(usr,"<span class='warning'>Target is unsuitable.</span>")
|
||||
to_chat(usr,span_warning("Target is unsuitable."))
|
||||
return
|
||||
|
||||
if(H.nif)
|
||||
to_chat(usr,"<span class='warning'>Target already has a NIF.</span>")
|
||||
to_chat(usr,span_warning("Target already has a NIF."))
|
||||
return
|
||||
|
||||
if(H.species.flags & NO_SCAN)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
var/new_fps = round(tgui_input_number(usr, "Sets game frames-per-second. Can potentially break the game (default: [CONFIG_GET(number/fps)])", "FPS", world.fps, round(CONFIG_GET(number/fps) * 1.5))) // CHOMPEdit
|
||||
if(new_fps <= 0)
|
||||
to_chat(src, "<span class='danger'>Error: set_server_fps(): Invalid world.fps value. No changes made.</span>")
|
||||
to_chat(src, span_danger("Error: set_server_fps(): Invalid world.fps value. No changes made."))
|
||||
return
|
||||
if(new_fps > CONFIG_GET(number/fps) * 1.5) // CHOMPEdit
|
||||
if(tgui_alert(src, "You are setting fps to a high value:\n\t[new_fps] frames-per-second\n\tconfig.fps = [CONFIG_GET(number/fps)]", "Warning!", list("Confirm", "ABORT-ABORT-ABORT")) != "Confirm") // CHOMPEdit
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
return
|
||||
|
||||
if(template.load(T, centered = TRUE, orientation=orientation))
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has placed a map template ([template.name]).</span>")
|
||||
message_admins(span_adminnotice("[key_name_admin(usr)] has placed a map template ([template.name])."))
|
||||
else
|
||||
to_chat(usr, "Failed to place map")
|
||||
if(usr)
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
if(tgui_alert(usr,"Confirm map load.", "Template Confirm",list("No","Yes")) == "Yes")
|
||||
if(template.load_new_z(orientation=orientation))
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has placed a map template ([template.name]) on Z level [world.maxz].</span>")
|
||||
message_admins(span_adminnotice("[key_name_admin(usr)] has placed a map template ([template.name]) on Z level [world.maxz]."))
|
||||
else
|
||||
to_chat(usr, "Failed to place map")
|
||||
|
||||
@@ -83,6 +83,6 @@
|
||||
if(M.preload_size(map))
|
||||
to_chat(usr, "Map template '[map]' ready to place ([M.width]x[M.height])")
|
||||
SSmapping.map_templates[M.name] = M
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has uploaded a map template ([map])</span>")
|
||||
message_admins(span_adminnotice("[key_name_admin(usr)] has uploaded a map template ([map])"))
|
||||
else
|
||||
to_chat(usr, "Map template '[map]' failed to load properly")
|
||||
|
||||
@@ -20,11 +20,11 @@
|
||||
if(tgui_alert(usr, "This robot has not yet selected a module. Would you like to toggle combat module override?","Confirm",list("Yes","No"))!="Yes")
|
||||
continue
|
||||
target.crisis_override = !target.crisis_override
|
||||
to_chat(usr, "<span class='danger'>You [target.crisis_override? "enabled":"disabled"] [target]'s combat module overwrite.</span>")
|
||||
to_chat(usr, span_danger("You [target.crisis_override? "enabled":"disabled"] [target]'s combat module overwrite."))
|
||||
continue
|
||||
if(MODIFIY_ROBOT_LIMIT_MODULES_ADD)
|
||||
if(target.restrict_modules_to.len)
|
||||
to_chat(usr, "<span class='warning'>[target]'s modules are already restricted. For details you can use the remove verb to show all active restrictions.</span>")
|
||||
to_chat(usr, span_warning("[target]'s modules are already restricted. For details you can use the remove verb to show all active restrictions."))
|
||||
var/list/possible_options = list()
|
||||
for(var/entry in robot_modules)
|
||||
if(!target.restrict_modules_to.Find(entry))
|
||||
@@ -35,16 +35,16 @@
|
||||
break
|
||||
possible_options -= selected_type
|
||||
target.restrict_modules_to += selected_type
|
||||
to_chat(usr, "<span class='danger'>You added [selected_type] to [target]'s possible modules list.</span>")
|
||||
to_chat(usr, span_danger("You added [selected_type] to [target]'s possible modules list."))
|
||||
continue
|
||||
if(MODIFIY_ROBOT_LIMIT_MODULES_REMOVE)
|
||||
while(TRUE)
|
||||
var/selected_type = tgui_input_list(usr, "Please select the module type to remove. Removing all module types here will allow default station module selection.", "Module types", target.restrict_modules_to)
|
||||
if(!selected_type || selected_type == "Cancel")
|
||||
to_chat(usr, "<span class='danger'>[target] uses the default module list without special restrictions.</span>")
|
||||
to_chat(usr, span_danger("[target] uses the default module list without special restrictions."))
|
||||
break
|
||||
target.restrict_modules_to -= selected_type
|
||||
to_chat(usr, "<span class='danger'>You removed [selected_type] from [target]'s possible modules list.</span>")
|
||||
to_chat(usr, span_danger("You removed [selected_type] from [target]'s possible modules list."))
|
||||
continue
|
||||
|
||||
if(!target.module.modules)
|
||||
@@ -59,7 +59,7 @@
|
||||
return
|
||||
|
||||
if(!target.module || !target.module.modules)
|
||||
to_chat(usr, "<span class='danger'>[target] was recently reset, you must wait until module selection has been completed before continuing modifying.</span>")
|
||||
to_chat(usr, span_danger("[target] was recently reset, you must wait until module selection has been completed before continuing modifying."))
|
||||
continue
|
||||
|
||||
log_and_message_admins("[key_name(src)] has used MODIFYROBOT ([modification_choice]) on [key_name(target)].")
|
||||
@@ -93,7 +93,7 @@
|
||||
spawn(0) //ChompEDIT Must be after to allow the movement to finish
|
||||
SEND_SIGNAL(add_item, COMSIG_OBSERVER_MOVED)//ChompEDIT - report the movement since setting loc doesn't call Move or Moved
|
||||
target.hud_used.update_robot_modules_display()
|
||||
to_chat(usr, "<span class='danger'>You added \"[add_item]\" to [target].</span>")
|
||||
to_chat(usr, span_danger("You added \"[add_item]\" to [target]."))
|
||||
if(istype(add_item, /obj/item/stack/))
|
||||
var/obj/item/stack/item_with_synth = add_item
|
||||
for(var/synth in item_with_synth.synths)
|
||||
@@ -141,7 +141,7 @@
|
||||
var/selected_module_module = tgui_input_list(usr, "Please select the module to remove", "Modules", active_modules)
|
||||
if(!istype(selected_module_module, /obj/item/))
|
||||
break
|
||||
to_chat(usr, "<span class='danger'>You removed \"[selected_module_module]\" from [target]</span>")
|
||||
to_chat(usr, span_danger("You removed \"[selected_module_module]\" from [target]"))
|
||||
target.uneq_all()
|
||||
target.hud_used.update_robot_modules_display(TRUE)
|
||||
target.module.emag.Remove(selected_module_module)
|
||||
@@ -172,12 +172,12 @@
|
||||
if(istype(U, /obj/item/borg/upgrade/restricted))
|
||||
target.module.supported_upgrades |= new_upgrade
|
||||
if(U.action(target))
|
||||
to_chat(usr, "<span class='danger'>You apply the [U] to [target]!</span>")
|
||||
to_chat(usr, span_danger("You apply the [U] to [target]!"))
|
||||
usr.drop_item()
|
||||
U.loc = target
|
||||
target.hud_used.update_robot_modules_display()
|
||||
else
|
||||
to_chat(usr, "<span class='danger'>Upgrade error!</span>")
|
||||
to_chat(usr, span_danger("Upgrade error!"))
|
||||
if(selected_module_upgrade == "Proto-Kinetic Accelerator")
|
||||
var/list/modkits = list()
|
||||
for(var/modkit in typesof(/obj/item/borg/upgrade/modkit))
|
||||
@@ -193,7 +193,7 @@
|
||||
var/obj/item/borg/upgrade/modkit/M = new new_modkit(src)
|
||||
var/obj/item/gun/energy/kinetic_accelerator/kin = locate() in target.module.modules
|
||||
if(kin.get_remaining_mod_capacity() >= M.cost)
|
||||
to_chat(usr, "<span class='danger'>You installed the [M] into the [kin], [capacity]% remaining!</span>")
|
||||
to_chat(usr, span_danger("You installed the [M] into the [kin], [capacity]% remaining!"))
|
||||
modkits.Remove(selected_ka_upgrade)
|
||||
M.install(kin, target)
|
||||
capacity = kin.get_remaining_mod_capacity()
|
||||
@@ -243,7 +243,7 @@
|
||||
target.radio.channels[selected_radio_channel] += target.module.channels[selected_radio_channel]
|
||||
target.radio.secure_radio_connections[selected_radio_channel] += radio_controller.add_object(target.radio, radiochannels[selected_radio_channel], RADIO_CHAT)
|
||||
available_channels -= selected_radio_channel
|
||||
to_chat(usr, "<span class='danger'>You added \"[selected_radio_channel]\" channel to [target].</span>")
|
||||
to_chat(usr, span_danger("You added \"[selected_radio_channel]\" channel to [target]."))
|
||||
if(MODIFIY_ROBOT_RADIOC_REMOVE)
|
||||
while(TRUE)
|
||||
var/selected_radio_channel = tgui_input_list(usr, "Please select the radio channel to remove", "Channels", target.radio.channels)
|
||||
@@ -261,7 +261,7 @@
|
||||
target.radio.channels[n_chan] -= target.module.channels[n_chan]
|
||||
radio_controller.remove_object(target.radio, radiochannels[selected_radio_channel])
|
||||
target.radio.secure_radio_connections -= selected_radio_channel
|
||||
to_chat(usr, "<span class='danger'>You removed \"[selected_radio_channel]\" channel from [target].</span>")
|
||||
to_chat(usr, span_danger("You removed \"[selected_radio_channel]\" channel from [target]."))
|
||||
if(MODIFIY_ROBOT_COMP_ADD)
|
||||
while(TRUE)
|
||||
var/selected_component = tgui_input_list(usr, "Please select the component to add or replace", "Component", target.components)
|
||||
@@ -289,7 +289,7 @@
|
||||
var/new_power_cell = cell_names[capitalize(selected_cell)]
|
||||
target.cell = new new_power_cell(target)
|
||||
C.wrapped = target.cell
|
||||
to_chat(usr, "<span class='danger'>You replaced \"[C]\" on [target] with \"[selected_cell]\".</span>")
|
||||
to_chat(usr, span_danger("You replaced \"[C]\" on [target] with \"[selected_cell]\"."))
|
||||
if("diagnosis unit")
|
||||
C.wrapped = new /obj/item/robot_parts/robot_component/diagnosis_unit(target)
|
||||
if("camera")
|
||||
@@ -301,7 +301,7 @@
|
||||
C.install()
|
||||
C.installed = 1
|
||||
if(selected_component != "power cell")
|
||||
to_chat(usr, "<span class='danger'>You repplaced \"[C]\" on [target].</span>")
|
||||
to_chat(usr, span_danger("You repplaced \"[C]\" on [target]."))
|
||||
if(MODIFIY_ROBOT_COMP_REMOVE)
|
||||
while(TRUE)
|
||||
var/selected_component = tgui_input_list(usr, "Please select the component to remove", "Component", target.components)
|
||||
@@ -315,7 +315,7 @@
|
||||
C.wrapped = null
|
||||
if(selected_component == "power cell")
|
||||
target.cell = null
|
||||
to_chat(usr, "<span class='danger'>You removed \"[C]\" from [target]</span>")
|
||||
to_chat(usr, span_danger("You removed \"[C]\" from [target]"))
|
||||
if(MODIFIY_ROBOT_SWAP_MODULE)
|
||||
var/selected_module = tgui_input_list(usr, "Which Module would you like to use?", "Module", robot_modules)
|
||||
if(!selected_module || selected_module == "Cancel")
|
||||
@@ -337,10 +337,10 @@
|
||||
if(tgui_alert(usr, "Are you sure that you want to reset the entire module?","Confirm",list("Yes","No"))!="Yes")
|
||||
continue
|
||||
target.module_reset(FALSE)
|
||||
to_chat(usr, "<span class='danger'>You resetted [target]'s module selection.</span>")
|
||||
to_chat(usr, span_danger("You resetted [target]'s module selection."))
|
||||
if(MODIFIY_ROBOT_TOGGLE_ERT)
|
||||
target.crisis_override = !target.crisis_override
|
||||
to_chat(usr, "<span class='danger'>You [target.crisis_override? "enabled":"disabled"] [target]'s combat module overwrite.</span>")
|
||||
to_chat(usr, span_danger("You [target.crisis_override? "enabled":"disabled"] [target]'s combat module overwrite."))
|
||||
if(tgui_alert(usr, "Do you want to reset the module as well to allow selection?","Confirm",list("Yes","No"))!="Yes")
|
||||
continue
|
||||
target.module_reset(FALSE)
|
||||
@@ -350,17 +350,17 @@
|
||||
if(access_synth in card.GetAccess())
|
||||
card.access -= get_all_station_access()
|
||||
card.access -= access_synth
|
||||
to_chat(usr, "<span class='danger'>You revoke station access from [target].</span>")
|
||||
to_chat(usr, span_danger("You revoke station access from [target]."))
|
||||
else
|
||||
card.access |= get_all_station_access()
|
||||
card.access |= access_synth
|
||||
to_chat(usr, "<span class='danger'>You grant station access to [target].</span>")
|
||||
to_chat(usr, span_danger("You grant station access to [target]."))
|
||||
if(MODIFIY_ROBOT_TOGGLE_CENT_ACCESS)
|
||||
if(target?.idcard?.GetAccess())
|
||||
var/obj/item/card/id/synthetic/card = target.idcard
|
||||
if(access_cent_specops in card.GetAccess())
|
||||
card.access -= get_all_centcom_access()
|
||||
to_chat(usr, "<span class='danger'>You revoke central access from [target].</span>")
|
||||
to_chat(usr, span_danger("You revoke central access from [target]."))
|
||||
else
|
||||
card.access |= get_all_centcom_access()
|
||||
to_chat(usr, "<span class='danger'>You grant central access to [target].</span>")
|
||||
to_chat(usr, span_danger("You grant central access to [target]."))
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
return
|
||||
|
||||
if (!CONFIG_GET(flag/sql_enabled)) // CHOMPEdit
|
||||
to_chat(usr, "<span class='adminnotice'>The Database is not enabled!</span>")
|
||||
to_chat(usr, span_adminnotice("The Database is not enabled!"))
|
||||
return
|
||||
|
||||
CONFIG_SET(flag/panic_bunker, !CONFIG_GET(flag/panic_bunker)) // CHOMPEdit
|
||||
|
||||
@@ -34,7 +34,7 @@ var/list/sounds_cache = list()
|
||||
return
|
||||
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
|
||||
|
||||
@@ -121,7 +121,7 @@ var/list/sounds_cache = list()
|
||||
return
|
||||
var/ytdl = CONFIG_GET(string/invoke_youtubedl) // CHOMPEdit
|
||||
if(!ytdl)
|
||||
to_chat(user, "<span class='boldwarning'>Youtube-dl was not configured, action unavailable</span>", confidential = TRUE) //Check config.txt for the INVOKE_YOUTUBEDL value
|
||||
to_chat(user, span_boldwarning("Youtube-dl was not configured, action unavailable"), confidential = TRUE) //Check config.txt for the INVOKE_YOUTUBEDL value
|
||||
return
|
||||
var/web_sound_url = ""
|
||||
var/stop_web_sounds = FALSE
|
||||
@@ -134,15 +134,15 @@ var/list/sounds_cache = list()
|
||||
var/stdout = output[SHELLEO_STDOUT]
|
||||
var/stderr = output[SHELLEO_STDERR]
|
||||
if(errorlevel)
|
||||
to_chat(user, "<span class='boldwarning'>Youtube-dl URL retrieval FAILED:</span>", confidential = TRUE)
|
||||
to_chat(user, "<span class='warning'>[stderr]</span>", confidential = TRUE)
|
||||
to_chat(user, span_boldwarning("Youtube-dl URL retrieval FAILED:"), confidential = TRUE)
|
||||
to_chat(user, span_warning("[stderr]"), confidential = TRUE)
|
||||
return
|
||||
var/list/data
|
||||
try
|
||||
data = json_decode(stdout)
|
||||
catch(var/exception/e)
|
||||
to_chat(user, "<span class='boldwarning'>Youtube-dl JSON parsing FAILED:</span>", confidential = TRUE)
|
||||
to_chat(user, "<span class='warning'>[e]: [stdout]</span>", confidential = TRUE)
|
||||
to_chat(user, span_boldwarning("Youtube-dl JSON parsing FAILED:"), confidential = TRUE)
|
||||
to_chat(user, span_warning("[e]: [stdout]"), confidential = TRUE)
|
||||
return
|
||||
if (data["url"])
|
||||
web_sound_url = data["url"]
|
||||
@@ -175,16 +175,16 @@ var/list/sounds_cache = list()
|
||||
switch(anon)
|
||||
if("Yes")
|
||||
if(res == "Yes")
|
||||
to_chat(world, "<span class='boldannounce'>[user.key] played: [webpage_url]</span>", confidential = TRUE)
|
||||
to_chat(world, span_boldannounce("[user.key] played: [webpage_url]"), confidential = TRUE)
|
||||
else
|
||||
to_chat(world, "<span class='boldannounce'>[user.key] played a sound</span>", confidential = TRUE)
|
||||
to_chat(world, span_boldannounce("[user.key] played a sound"), confidential = TRUE)
|
||||
if("No")
|
||||
if(res == "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", null)
|
||||
return
|
||||
if(credit)
|
||||
to_chat(world, "<span class='boldannounce'>[credit]</span>", confidential = TRUE)
|
||||
to_chat(world, span_boldannounce("[credit]"), confidential = TRUE)
|
||||
//SSblackbox.record_feedback("nested tally", "played_url", 1, list("[user.ckey]", "[input]"))
|
||||
log_admin("[key_name(user)] played web sound: [input]")
|
||||
message_admins("[key_name(user)] played web sound: [input]")
|
||||
@@ -197,7 +197,7 @@ var/list/sounds_cache = list()
|
||||
stop_web_sounds = TRUE
|
||||
if(web_sound_url && !findtext(web_sound_url, GLOB.is_http_protocol))
|
||||
tgui_alert(user, "The media provider returned a content URL that isn't using the HTTP or HTTPS protocol. This is a security risk and the sound will not be played.", "Security Risk", list("OK"))
|
||||
to_chat(user, "<span class='boldwarning'>BLOCKED: Content URL not using HTTP(S) Protocol!</span>", confidential = TRUE)
|
||||
to_chat(user, span_boldwarning("BLOCKED: Content URL not using HTTP(S) Protocol!"), confidential = TRUE)
|
||||
|
||||
return
|
||||
if(web_sound_url || stop_web_sounds)
|
||||
@@ -222,7 +222,7 @@ var/list/sounds_cache = list()
|
||||
|
||||
var/ytdl = CONFIG_GET(string/invoke_youtubedl) // CHOMPEdit
|
||||
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
|
||||
|
||||
if(S_TIMER_COOLDOWN_TIMELEFT(SStimer, COOLDOWN_INTERNET_SOUND))
|
||||
@@ -235,8 +235,8 @@ var/list/sounds_cache = list()
|
||||
if(length(web_sound_input))
|
||||
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
|
||||
web_sound(usr, web_sound_input)
|
||||
else
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
return
|
||||
|
||||
var/icon/cross = icon('icons/obj/storage.dmi',"bible")
|
||||
var/msg = "<span class='filter_pray'>" + span_blue("[icon2html(cross, GLOB.admins)] <b>" + span_purple("PRAY: ") + "[key_name(src, 1)] [ADMIN_QUE(src)] [ADMIN_PP(src)] [ADMIN_VV(src)] [ADMIN_SM(src)] ([admin_jump_link(src, src)]) [ADMIN_CA(src)] [ADMIN_SC(src)] [ADMIN_SMITE(src)]:</b> [raw_msg]") + "</span>"
|
||||
var/msg = span_filter_pray(span_blue("[icon2html(cross, GLOB.admins)] <b>" + span_purple("PRAY: ") + "[key_name(src, 1)] [ADMIN_QUE(src)] [ADMIN_PP(src)] [ADMIN_VV(src)] [ADMIN_SM(src)] ([admin_jump_link(src, src)]) [ADMIN_CA(src)] [ADMIN_SC(src)] [ADMIN_SMITE(src)]:</b> [raw_msg]"))
|
||||
|
||||
for(var/client/C in GLOB.admins)
|
||||
if(!check_rights(R_ADMIN|R_EVENT, 0, C)) //CHOMPEdit
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
to_chat(M, "<B>You hear a voice in your head...</B> <i>[msg]</i>")
|
||||
|
||||
log_admin("SubtlePM: [key_name(usr)] -> [key_name(M)] : [msg]")
|
||||
msg = "<span class='pm adminnotice'><b> SubtleMessage: [key_name_admin(usr)] -> [key_name_admin(M)] :</b> [msg]</span>"
|
||||
msg = span_pm(span_adminnotice("<b> SubtleMessage: [key_name_admin(usr)] -> [key_name_admin(M)] :</b> [msg]"))
|
||||
message_admins(msg)
|
||||
admin_ticket_log(M, msg)
|
||||
feedback_add_details("admin_verb","SMS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -149,7 +149,7 @@
|
||||
|
||||
to_chat(M, msg)
|
||||
log_admin("DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]")
|
||||
msg = "<span class='pm adminnotice'><b> DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]):</b> [msg]<BR></span>"
|
||||
msg = span_pm(span_adminnotice("<b> DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]):</b> [msg]<BR>"))
|
||||
message_admins(msg)
|
||||
admin_ticket_log(M, msg)
|
||||
feedback_add_details("admin_verb","DIRN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -208,7 +208,7 @@
|
||||
M.client.prefs.muted |= mute_type
|
||||
log_admin("SPAM AUTOMUTE: [muteunmute] [key_name(M)] from [mute_string]")
|
||||
message_admins("SPAM AUTOMUTE: [muteunmute] [key_name_admin(M)] from [mute_string].", 1)
|
||||
to_chat(M, "<span class='alert'>You have been [muteunmute] from [mute_string] by the SPAM AUTOMUTE system. Contact an admin.</span>")
|
||||
to_chat(M, span_alert("You have been [muteunmute] from [mute_string] by the SPAM AUTOMUTE system. Contact an admin."))
|
||||
feedback_add_details("admin_verb","AUTOMUTE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
@@ -298,15 +298,15 @@ Ccomp's first proc.
|
||||
for(var/client/C as anything in GLOB.clients)
|
||||
if(C.ckey == target)
|
||||
found_client = C
|
||||
to_chat(C, "<span class='notice'><B>You may now respawn. You should roleplay as if you learned nothing about the round during your time with the dead.</B></span>")
|
||||
to_chat(C, span_notice("<B>You may now respawn. You should roleplay as if you learned nothing about the round during your time with the dead.</B>"))
|
||||
if(isobserver(C.mob))
|
||||
var/mob/observer/dead/G = C.mob
|
||||
G.can_reenter_corpse = 1
|
||||
to_chat(C, "<span class='notice'><B>You can also re-enter your corpse, if you still have one!</B></span>")
|
||||
to_chat(C, span_notice("<B>You can also re-enter your corpse, if you still have one!</B>"))
|
||||
break
|
||||
|
||||
if(!found_client)
|
||||
to_chat(src, "<span class='notice'>The associated client didn't appear to be connected, so they couldn't be notified, but they can now respawn if they reconnect.</span>")
|
||||
to_chat(src, span_notice("The associated client didn't appear to be connected, so they couldn't be notified, but they can now respawn if they reconnect."))
|
||||
|
||||
log_admin("[key_name(usr)] allowed [found_client ? key_name(found_client) : target] to bypass the respawn time limit")
|
||||
message_admins("Admin [key_name_admin(usr)] allowed [found_client ? key_name_admin(found_client) : target] to bypass the respawn time limit", 1)
|
||||
@@ -638,7 +638,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
M.revive()
|
||||
|
||||
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)
|
||||
else
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
var/very_big = is_extreme_size(size_multiplier)
|
||||
|
||||
if(very_big && can_be_big) // made an extreme size in an area that allows it, don't assume adminbuse
|
||||
to_chat(src,"<span class='warning'>[L] will lose this size upon moving into an area where this size is not allowed.</span>")
|
||||
to_chat(src,span_warning("[L] will lose this size upon moving into an area where this size is not allowed."))
|
||||
else if(very_big) // made an extreme size in an area that doesn't allow it, assume adminbuse
|
||||
to_chat(src,"<span class='warning'>[L] will retain this normally unallowed size outside this area.</span>")
|
||||
to_chat(src,span_warning("[L] will retain this normally unallowed size outside this area."))
|
||||
|
||||
L.resize(size_multiplier, animate = TRUE, uncapped = TRUE, ignore_prefs = TRUE)
|
||||
|
||||
|
||||
@@ -37,13 +37,13 @@
|
||||
if(SMITE_SPONTANEOUSCOMBUSTION)
|
||||
target.adjust_fire_stacks(10)
|
||||
target.IgniteMob()
|
||||
target.visible_message("<span class='danger'>[target] bursts into flames!</span>")
|
||||
target.visible_message(span_danger("[target] bursts into flames!"))
|
||||
|
||||
if(SMITE_LIGHTNINGBOLT)
|
||||
var/turf/T = get_step(get_step(target, NORTH), NORTH)
|
||||
T.Beam(target, icon_state="lightning[rand(1,12)]", time = 5)
|
||||
target.electrocute_act(75,def_zone = BP_HEAD)
|
||||
target.visible_message("<span class='danger'>[target] is struck by lightning!</span>")
|
||||
target.visible_message(span_danger("[target] is struck by lightning!"))
|
||||
|
||||
if(SMITE_SHADEKIN_ATTACK)
|
||||
var/turf/Tt = get_turf(target) //Turf for target
|
||||
@@ -140,7 +140,7 @@
|
||||
shadekin.ckey = ckey
|
||||
|
||||
else //Permakin'd
|
||||
to_chat(target,"<span class='danger'>You're carried off into The Dark by the [shadekin]. Who knows if you'll find your way back?</span>")
|
||||
to_chat(target,span_danger("You're carried off into The Dark by the [shadekin]. Who knows if you'll find your way back?"))
|
||||
target.ghostize()
|
||||
qdel(target)
|
||||
qdel(shadekin)
|
||||
@@ -166,7 +166,7 @@
|
||||
if(SMITE_PEPPERNADE)
|
||||
var/obj/item/grenade/chem_grenade/teargas/grenade = new /obj/item/grenade/chem_grenade/teargas
|
||||
grenade.loc = target.loc
|
||||
to_chat(target,"<span class='warning'>GRENADE?!</span>")
|
||||
to_chat(target,span_warning("GRENADE?!"))
|
||||
grenade.detonate()
|
||||
|
||||
if(SMITE_SPICEREQUEST)
|
||||
@@ -240,11 +240,11 @@ var/redspace_abduction_z
|
||||
|
||||
/proc/redspace_abduction(mob/living/target, user)
|
||||
if(redspace_abduction_z < 0)
|
||||
to_chat(user,"<span class='warning'>The abduction z-level is already being created. Please wait.</span>")
|
||||
to_chat(user,span_warning("The abduction z-level is already being created. Please wait."))
|
||||
return
|
||||
if(!redspace_abduction_z)
|
||||
redspace_abduction_z = -1
|
||||
to_chat(user,"<span class='warning'>This is the first use of the verb this shift, it will take a minute to configure the abduction z-level. It will be z[world.maxz+1].</span>")
|
||||
to_chat(user,span_warning("This is the first use of the verb this shift, it will take a minute to configure the abduction z-level. It will be z[world.maxz+1]."))
|
||||
var/z = ++world.maxz
|
||||
world.max_z_changed()
|
||||
for(var/x = 1 to world.maxx)
|
||||
@@ -262,8 +262,8 @@ var/redspace_abduction_z
|
||||
var/size_of_square = 26
|
||||
var/halfbox = round(size_of_square*0.5)
|
||||
target.transforming = TRUE
|
||||
to_chat(target,"<span class='danger'>You feel a strange tug, deep inside. You're frozen in momentarily...</span>")
|
||||
to_chat(user,"<span class='notice'>Beginning vis_contents copy to abduction site, player mob is frozen.</span>")
|
||||
to_chat(target,span_danger("You feel a strange tug, deep inside. You're frozen in momentarily..."))
|
||||
to_chat(user,span_notice("Beginning vis_contents copy to abduction site, player mob is frozen."))
|
||||
sleep(1 SECOND)
|
||||
//Lower left corner of a working box
|
||||
var/llc_x = max(0,halfbox-target.x) + min(target.x+halfbox, world.maxx) - size_of_square
|
||||
@@ -314,14 +314,14 @@ var/redspace_abduction_z
|
||||
T.vis_contents.Cut()
|
||||
|
||||
target.forceMove(locate(target.x,target.y,redspace_abduction_z))
|
||||
to_chat(target,"<span class='danger'>The tug relaxes, but everything around you looks... slightly off.</span>")
|
||||
to_chat(user,"<span class='notice'>The mob has been moved. ([admin_jump_link(target,usr.client.holder)])</span>")
|
||||
to_chat(target,span_danger("The tug relaxes, but everything around you looks... slightly off."))
|
||||
to_chat(user,span_notice("The mob has been moved. ([admin_jump_link(target,usr.client.holder)])"))
|
||||
|
||||
target.transforming = FALSE
|
||||
|
||||
/proc/fake_autosave(var/mob/living/target, var/client/user, var/wide)
|
||||
if(!istype(target) || !target.client)
|
||||
to_chat(user, "<span class='warning'>Skipping [target] because they are not a /mob/living or have no client.</span>")
|
||||
to_chat(user, span_warning("Skipping [target] because they are not a /mob/living or have no client."))
|
||||
return
|
||||
|
||||
if(wide)
|
||||
|
||||
Reference in New Issue
Block a user