[MIRROR] Refactors most spans into span procs (#6315)

* Refactors most spans into span procs

* AA

* a

* AAAAAAAAAAAAAAAAAAAAAA

* Update species.dm

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
This commit is contained in:
SkyratBot
2021-06-16 01:24:49 +02:00
committed by GitHub
parent cd5dba4fbd
commit 7d1d0e1fad
1676 changed files with 15455 additions and 15211 deletions
+11 -11
View File
@@ -1,6 +1,6 @@
/proc/create_message(type, target_key, admin_ckey, text, timestamp, server, secret, logged = 1, browse, expiry, note_severity)
if(!SSdbcore.Connect())
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>", confidential = TRUE)
to_chat(usr, span_danger("Failed to establish database connection."), confidential = TRUE)
return
if(!type)
return
@@ -112,7 +112,7 @@
/proc/delete_message(message_id, logged = 1, browse)
if(!SSdbcore.Connect())
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>", confidential = TRUE)
to_chat(usr, span_danger("Failed to establish database connection."), confidential = TRUE)
return
message_id = text2num(message_id)
if(!message_id)
@@ -155,7 +155,7 @@
/proc/edit_message(message_id, browse)
if(!SSdbcore.Connect())
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>", confidential = TRUE)
to_chat(usr, span_danger("Failed to establish database connection."), confidential = TRUE)
return
message_id = text2num(message_id)
if(!message_id)
@@ -205,7 +205,7 @@
/proc/edit_message_expiry(message_id, browse)
if(!SSdbcore.Connect())
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>", confidential = TRUE)
to_chat(usr, span_danger("Failed to establish database connection."), confidential = TRUE)
return
message_id = text2num(message_id)
if(!message_id)
@@ -276,7 +276,7 @@
/proc/edit_message_severity(message_id)
if(!SSdbcore.Connect())
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>", confidential = TRUE)
to_chat(usr, span_danger("Failed to establish database connection."), confidential = TRUE)
return
message_id = text2num(message_id)
if(!message_id)
@@ -327,7 +327,7 @@
/proc/toggle_message_secrecy(message_id)
if(!SSdbcore.Connect())
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>", confidential = TRUE)
to_chat(usr, span_danger("Failed to establish database connection."), confidential = TRUE)
return
message_id = text2num(message_id)
if(!message_id)
@@ -371,7 +371,7 @@
/proc/browse_messages(type, target_ckey, index, linkless = FALSE, filter, agegate = FALSE)
if(!SSdbcore.Connect())
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>", confidential = TRUE)
to_chat(usr, span_danger("Failed to establish database connection."), confidential = TRUE)
return
var/list/output = list()
var/ruler = "<hr style='background:#000000; border:0; height:3px'>"
@@ -626,7 +626,7 @@
/proc/get_message_output(type, target_ckey)
if(!SSdbcore.Connect())
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>", confidential = TRUE)
to_chat(usr, span_danger("Failed to establish database connection."), confidential = TRUE)
return
if(!type)
return
@@ -655,7 +655,7 @@
var/editor_key = query_get_message_output.item[5]
switch(type)
if("message")
output += "<font color='red' size='3'><b>Admin message left by <span class='prefix'>[admin_key]</span> on [timestamp]</b></font>"
output += "<font color='red' size='3'><b>Admin message left by [span_prefix("[admin_key]")] on [timestamp]</b></font>"
output += "<br><font color='red'>[text]</font><br>"
var/datum/db_query/query_message_read = SSdbcore.NewQuery(
"UPDATE [format_table_name("messages")] SET type = 'message sent' WHERE id = :id",
@@ -670,9 +670,9 @@
message_admins("<font color='red'><B>Notice: </B></font><font color='blue'>[key_name_admin(target_ckey)] has been on the watchlist since [timestamp] and has just connected - Reason: [text]</font>")
send2tgs_adminless_only("Watchlist", "[key_name(target_ckey)] is on the watchlist and has just connected - Reason: [text]")
if("memo")
output += "<span class='memo'>Memo by <span class='prefix'>[admin_key]</span> on [timestamp]"
output += "[span_memo("Memo by <span class='prefix'>[admin_key]")] on [timestamp]"
if(editor_key)
output += "<br><span class='memoedit'>Last edit by [editor_key] <A href='?_src_=holder;[HrefToken()];messageedits=[message_id]'>(Click here to see edit log)</A></span>"
output += "<br>[span_memoedit("Last edit by [editor_key] <A href='?_src_=holder;[HrefToken()];messageedits=[message_id]'>(Click here to see edit log)</A>")]"
output += "<br>[text]</span><br>"
qdel(query_get_message_output)
return output