mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-30 23:49:21 +01:00
refactors most spans
This commit is contained in:
@@ -191,7 +191,7 @@ GLOBAL_DATUM_INIT(mhelp_tickets, /datum/mentor_help_tickets, new)
|
||||
//message from the initiator without a target, all people with mentor powers will see this
|
||||
/datum/mentor_help/proc/MessageNoRecipient(msg)
|
||||
var/ref_src = "\ref[src]"
|
||||
var/chat_msg = "<span class='notice'>(<A HREF='?_src_=mentorholder;mhelp=[ref_src];[HrefToken()];mhelp_action=escalate'>ESCALATE</A>) Ticket [TicketHref("#[id]", ref_src)]<b>: [LinkedReplyName(ref_src)]:</b> [msg]</span>"
|
||||
var/chat_msg = span_notice("(<A HREF='?_src_=mentorholder;mhelp=[ref_src];[HrefToken()];mhelp_action=escalate'>ESCALATE</A>) Ticket [TicketHref("#[id]", ref_src)]<b>: [LinkedReplyName(ref_src)]:</b> [msg]")
|
||||
AddInteraction("<font color='red'>[LinkedReplyName(ref_src)]: [msg]</font>")
|
||||
for (var/client/C in GLOB.mentors)
|
||||
if (C.prefs?.read_preference(/datum/preference/toggle/play_mentorhelp_ping))
|
||||
@@ -204,11 +204,11 @@ GLOBAL_DATUM_INIT(mhelp_tickets, /datum/mentor_help_tickets, new)
|
||||
//Reopen a closed ticket
|
||||
/datum/mentor_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.mhelp_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)
|
||||
@@ -224,8 +224,8 @@ GLOBAL_DATUM_INIT(mhelp_tickets, /datum/mentor_help_tickets, new)
|
||||
|
||||
AddInteraction("<font color='purple'>Reopened by [usr.ckey]</font>")
|
||||
if(initiator)
|
||||
to_chat(initiator, "<span class='filter_adminlog'>[span_purple("Ticket [TicketHref("#[id]")] was reopened by [usr.ckey].")]</span>")
|
||||
var/msg = "<span class='adminhelp'>Ticket [TicketHref("#[id]")] reopened by [usr.ckey].</span>"
|
||||
to_chat(initiator, span_filter_adminlog("[span_purple("Ticket [TicketHref("#[id]")] was reopened by [usr.ckey].")]"))
|
||||
var/msg = span_adminhelp("Ticket [TicketHref("#[id]")] reopened by [usr.ckey].")
|
||||
message_mentors(msg)
|
||||
log_admin(msg)
|
||||
feedback_inc("mhelp_reopen")
|
||||
@@ -249,9 +249,9 @@ GLOBAL_DATUM_INIT(mhelp_tickets, /datum/mentor_help_tickets, new)
|
||||
state = AHELP_RESOLVED
|
||||
GLOB.mhelp_tickets.ListInsert(src)
|
||||
|
||||
AddInteraction("<span class='filter_adminlog'>[span_green("Resolved by [usr.ckey].")]</span>")
|
||||
AddInteraction(span_filter_adminlog("[span_green("Resolved by [usr.ckey].")]"))
|
||||
if(initiator)
|
||||
to_chat(initiator, "<span class='filter_adminlog'>[span_green("Ticket [TicketHref("#[id]")] was marked resolved by [usr.ckey].")]</span>")
|
||||
to_chat(initiator, span_filter_adminlog("[span_green("Ticket [TicketHref("#[id]")] was marked resolved by [usr.ckey].")]"))
|
||||
if(!silent)
|
||||
feedback_inc("mhelp_resolve")
|
||||
var/msg = "Ticket [TicketHref("#[id]")] resolved by [usr.ckey]"
|
||||
@@ -353,12 +353,12 @@ GLOBAL_DATUM_INIT(mhelp_tickets, /datum/mentor_help_tickets, new)
|
||||
if(tgui_alert(usr, "Really escalate this ticket to admins? No mentors will ever be able to interact with it again if you do.","Escalate",list("Yes","No")) != "Yes")
|
||||
return
|
||||
if (src.initiator == null) // You can't escalate a mentorhelp of someone who's logged out because it won't create the adminhelp properly
|
||||
to_chat(usr, "<span class='pm warning'>Error: client not found, unable to escalate.</span>")
|
||||
to_chat(usr, span_pm(span_warning("Error: client not found, unable to escalate.")))
|
||||
return
|
||||
var/datum/admin_help/AH = new /datum/admin_help(src.name, src.initiator, FALSE)
|
||||
message_mentors("[usr.ckey] escalated Ticket [TicketHref("#[id]")]")
|
||||
log_admin("[key_name(usr)] escalated mentorhelp [src.name]")
|
||||
to_chat(src.initiator, "<span class='mentor'>[usr.ckey] escalated your mentorhelp to admins.</span>")
|
||||
to_chat(src.initiator, span_mentor("[usr.ckey] escalated your mentorhelp to admins."))
|
||||
AH._interactions = src._interactions
|
||||
GLOB.mhelp_tickets.active_tickets -= src
|
||||
GLOB.mhelp_tickets.resolved_tickets -= src
|
||||
@@ -416,12 +416,12 @@ GLOBAL_DATUM_INIT(mhelp_tickets, /datum/mentor_help_tickets, new)
|
||||
set name = "Mentorhelp"
|
||||
|
||||
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: Mentor-PM: You cannot send adminhelps (Muted).</span>")
|
||||
to_chat(src, span_danger("Error: Mentor-PM: You cannot send adminhelps (Muted)."))
|
||||
return
|
||||
if(handle_spam_prevention(msg,MUTE_ADMINHELP))
|
||||
return
|
||||
@@ -462,10 +462,10 @@ GLOBAL_DATUM_INIT(mhelp_tickets, /datum/mentor_help_tickets, new)
|
||||
if(current_mentorhelp)
|
||||
log_admin("Mentorhelp: [key_name(src)]: [msg]")
|
||||
current_mentorhelp.MessageNoRecipient(msg)
|
||||
to_chat(usr, "<span class='adminnotice'><span class='mentor'>Mentor-PM to-<b>Mentors</b>: [msg]</span></span>")
|
||||
to_chat(usr, span_adminnotice(span_mentor("Mentor-PM to-<b>Mentors</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_mentorhelp.AddInteraction("[usr.ckey] opened a new ticket.")
|
||||
current_mentorhelp.Resolve()
|
||||
@@ -490,7 +490,7 @@ GLOBAL_DATUM_INIT(mhelp_tickets, /datum/mentor_help_tickets, new)
|
||||
GLOB.mhelp_tickets.BrowseTickets(browse_to)
|
||||
|
||||
/proc/message_mentors(var/msg)
|
||||
msg = "<span class='mentor_channel'><span class='prefix'>Mentor:</span> <span class=\"message\">[msg]</span></span>"
|
||||
msg = span_mentor_channel(span_prefix("Mentor: " + span_message(msg)))
|
||||
|
||||
for(var/client/C in GLOB.mentors)
|
||||
to_chat(C, msg)
|
||||
|
||||
Reference in New Issue
Block a user