Bleeding edgy refresh (#303)
* not code stuff * other things * global vars, defines, helpers * onclick hud stuff, orphans, world.dm * controllers and datums * game folder * everything not client/mobs in modules * client folder * stage 1 mob stuff * simple animal things * silicons * carbon things * ayylmaos and monkeys * hyoomahn * icons n shit * sprite fixes * compile fixes * some fixes I cherrypicked. * qdel fixes * forgot brain refractors
This commit is contained in:
@@ -18,8 +18,8 @@
|
||||
usr.reset_perspective(M)
|
||||
src.verbs += /client/proc/mentor_unfollow
|
||||
|
||||
admins << "<span class='mentor'><span class='prefix'>MENTOR:</span> <EM>[key_name(usr)]</EM> is now following <EM>[key_name(M)]</span>"
|
||||
usr << "<span class='info'>You are now following [M]. Click the \"Stop Following\" button in the Mentor tab to stop.</span>"
|
||||
to_chat(admins, "<span class='mentor'><span class='prefix'>MENTOR:</span> <EM>[key_name(usr)]</EM> is now following <EM>[key_name(M)]</span>")
|
||||
to_chat(usr, "<span class='info'>You are now following [M]. Click the \"Stop Following\" button in the Mentor tab to stop.</span>")
|
||||
log_mentor("[key_name(usr)] began following [key_name(M)]")
|
||||
|
||||
|
||||
@@ -43,8 +43,8 @@
|
||||
following = holder.following*/
|
||||
|
||||
|
||||
admins << "<span class='mentor'><span class='prefix'>MENTOR:</span> <EM>[key_name(usr)]</EM> is no longer following <EM>[key_name(following)]</span>"
|
||||
usr << "<span class='info'>You are no longer following [following].</span>"
|
||||
to_chat(admins, "<span class='mentor'><span class='prefix'>MENTOR:</span> <EM>[key_name(usr)]</EM> is no longer following <EM>[key_name(following)]</span>")
|
||||
to_chat(usr, "<span class='info'>You are no longer following [following].</span>")
|
||||
log_mentor("[key_name(usr)] stopped following [key_name(following)]")
|
||||
|
||||
following = null
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
set category = "Server"
|
||||
if(!check_rights(0)) return
|
||||
if(!dbcon.IsConnected())
|
||||
src << "<span class='danger'>Failed to establish database connection.</span>"
|
||||
to_chat(src, "<span class='danger'>Failed to establish database connection.</span>")
|
||||
return
|
||||
var/memotask = input(usr,"Choose task.","Memo") in list("Show","Write","Edit","Remove")
|
||||
if(!memotask)
|
||||
@@ -15,7 +15,7 @@
|
||||
set category = "Mentor"
|
||||
if(!check_mentor()) return
|
||||
if(!dbcon.IsConnected())
|
||||
src << "<span class='danger'>Failed to establish database connection.</span>"
|
||||
to_chat(src, "<span class='danger'>Failed to establish database connection.</span>")
|
||||
return
|
||||
mentor_memo_output("Show")
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
if(!task)
|
||||
return
|
||||
if(!dbcon.IsConnected())
|
||||
src << "<span class='danger'>Failed to establish database connection.</span>"
|
||||
to_chat(src, "<span class='danger'>Failed to establish database connection.</span>")
|
||||
return
|
||||
var/sql_ckey = sanitizeSQL(src.ckey)
|
||||
switch(task)
|
||||
@@ -34,7 +34,7 @@
|
||||
log_game("SQL ERROR obtaining ckey from memo table. Error : \[[err]\]\n")
|
||||
return
|
||||
if(query_memocheck.NextRow())
|
||||
src << "You already have set a memo."
|
||||
to_chat(src, "You already have set a memo.")
|
||||
return
|
||||
var/memotext = input(src,"Write your Memo","Memo") as message
|
||||
if(!memotext)
|
||||
@@ -59,7 +59,7 @@
|
||||
var/lkey = query_memolist.item[1]
|
||||
memolist += "[lkey]"
|
||||
if(!memolist.len)
|
||||
src << "No memos found in database."
|
||||
to_chat(src, "No memos found in database.")
|
||||
return
|
||||
var/target_ckey = input(src, "Select whose memo to edit", "Select memo") as null|anything in memolist
|
||||
if(!target_ckey)
|
||||
@@ -106,9 +106,9 @@
|
||||
output += "<br><span class='memoedit'>Last edit by [last_editor] <A href='?_src_=holder;mentormemoeditlist=[ckey]'>(Click here to see edit log)</A></span>"
|
||||
output += "<br>[memotext]</span><br>"
|
||||
if(!output)
|
||||
src << "No memos found in database."
|
||||
to_chat(src, "No memos found in database.")
|
||||
return
|
||||
src << output
|
||||
to_chat(src, output)
|
||||
if("Remove")
|
||||
var/DBQuery/query_memodellist = dbcon.NewQuery("SELECT ckey FROM [format_table_name("mentor_memo")]")
|
||||
if(!query_memodellist.Execute())
|
||||
@@ -120,7 +120,7 @@
|
||||
var/ckey = query_memodellist.item[1]
|
||||
memolist += "[ckey]"
|
||||
if(!memolist.len)
|
||||
src << "No memos found in database."
|
||||
to_chat(src, "No memos found in database.")
|
||||
return
|
||||
var/target_ckey = input(src, "Select whose mentor memo to delete", "Select mentor memo") as null|anything in memolist
|
||||
if(!target_ckey)
|
||||
|
||||
@@ -18,14 +18,14 @@
|
||||
log_mentor("MENTORHELP: [key_name_mentor(src, 0, 0, 0, 0)]: [msg]")
|
||||
|
||||
for(var/client/X in mentors)
|
||||
X << 'sound/items/bikehorn.ogg'
|
||||
X << mentor_msg
|
||||
to_chat(X, 'sound/items/bikehorn.ogg')
|
||||
to_chat(X, mentor_msg)
|
||||
|
||||
for(var/client/A in admins)
|
||||
A << 'sound/items/bikehorn.ogg'
|
||||
A << mentor_msg
|
||||
to_chat(A, 'sound/items/bikehorn.ogg')
|
||||
to_chat(A, mentor_msg)
|
||||
|
||||
src << "<span class='mentornotice'><font color='purple'>PM to-<b>Mentors</b>: [msg]</font></span>"
|
||||
to_chat(src, "<span class='mentornotice'><font color='purple'>PM to-<b>Mentors</b>: [msg]</font></span>")
|
||||
return
|
||||
|
||||
/proc/get_mentor_counts()
|
||||
@@ -78,7 +78,7 @@
|
||||
if(C && C.holder && C.holder.fakekey)
|
||||
. += "Administrator"
|
||||
else if (char_name_only && config.mentors_mobname_only)
|
||||
if(istype(C.mob,/mob/new_player) || istype(C.mob, /mob/dead/observer)) //If they're in the lobby or observing, display their ckey
|
||||
if(istype(C.mob,/mob/dead/new_player) || istype(C.mob, /mob/dead/observer)) //If they're in the lobby or observing, display their ckey
|
||||
. += key
|
||||
else if(C && C.mob) //If they're playing/in the round, only show the mob name
|
||||
. += C.mob.name
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
set category = "Mentor"
|
||||
set name = "Mentor PM"
|
||||
if(!holder)
|
||||
src << "<font color='red'>Error: Mentor-PM-Panel: Only Mentors may use this command.</font>"
|
||||
to_chat(src, "<font color='red'>Error: Mentor-PM-Panel: Only Mentors may use this command.</font>")
|
||||
return
|
||||
var/list/client/targets[0]
|
||||
for(var/client/T)
|
||||
@@ -27,7 +27,7 @@
|
||||
else if(istype(whom,/client))
|
||||
C = whom
|
||||
if(!C)
|
||||
if(holder) src << "<font color='red'>Error: Mentor-PM: Client not found.</font>"
|
||||
if(holder) to_chat(src, "<font color='red'>Error: Mentor-PM: Client not found.</font>")
|
||||
else mentorhelp(msg) //Mentor we are replying to left. Mentorhelp instead
|
||||
return
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
if(!msg) return
|
||||
if(!C)
|
||||
if(holder) src << "<font color='red'>Error: Mentor-PM: Client not found.</font>"
|
||||
if(holder) to_chat(src, "<font color='red'>Error: Mentor-PM: Client not found.</font>")
|
||||
else mentorhelp(msg) //Mentor we are replying to has vanished, Mentorhelp instead
|
||||
return
|
||||
|
||||
@@ -51,24 +51,24 @@
|
||||
var/show_char = config.mentors_mobname_only
|
||||
if(check_mentor_other(C))
|
||||
if(check_mentor()) //both are mentors
|
||||
C << "<font color='purple'>Mentor PM from-<b>[key_name_mentor(src, C, 1, 0, 0)]</b>: [msg]</font>"
|
||||
src << "<font color='green'>Mentor PM to-<b>[key_name_mentor(C, C, 1, 0, 0)]</b>: [msg]</font>"
|
||||
to_chat(C, "<font color='purple'>Mentor PM from-<b>[key_name_mentor(src, C, 1, 0, 0)]</b>: [msg]</font>")
|
||||
to_chat(src, "<font color='green'>Mentor PM to-<b>[key_name_mentor(C, C, 1, 0, 0)]</b>: [msg]</font>")
|
||||
|
||||
else //recipient is an mentor but sender is not
|
||||
C << "<font color='purple'>Reply PM from-<b>[key_name_mentor(src, C, 1, 0, show_char)]</b>: [msg]</font>"
|
||||
src << "<font color='green'>Mentor PM to-<b>[key_name_mentor(C, C, 1, 0, 0)]</b>: [msg]</font>"
|
||||
to_chat(C, "<font color='purple'>Reply PM from-<b>[key_name_mentor(src, C, 1, 0, show_char)]</b>: [msg]</font>")
|
||||
to_chat(src, "<font color='green'>Mentor PM to-<b>[key_name_mentor(C, C, 1, 0, 0)]</b>: [msg]</font>")
|
||||
|
||||
else
|
||||
if(check_mentor()) //sender is an mentor but recipient is not.
|
||||
C << "<font color='purple'>Mentor PM from-<b>[key_name_mentor(src, C, 1, 0, 0)]</b>: [msg]</font>"
|
||||
src << "<font color='green'>Mentor PM to-<b>[key_name_mentor(C, C, 1, 0, show_char)]</b>: [msg]</font>"
|
||||
to_chat(C, "<font color='purple'>Mentor PM from-<b>[key_name_mentor(src, C, 1, 0, 0)]</b>: [msg]</font>")
|
||||
to_chat(src, "<font color='green'>Mentor PM to-<b>[key_name_mentor(C, C, 1, 0, show_char)]</b>: [msg]</font>")
|
||||
|
||||
//we don't use message_Mentors here because the sender/receiver might get it too
|
||||
var/show_char_sender = !check_mentor_other(src) && config.mentors_mobname_only
|
||||
var/show_char_recip = !check_mentor_other(C) && config.mentors_mobname_only
|
||||
for(var/client/X in mentors)
|
||||
if(X.key!=key && X.key!=C.key) //check client/X is an Mentor and isn't the sender or recipient
|
||||
X << "<B><font color='green'>Mentor PM: [key_name_mentor(src, X, 0, 0, show_char_sender)]->[key_name_mentor(C, X, 0, 0, show_char_recip)]:</B> \blue [msg]</font>" //inform X
|
||||
to_chat(X, "<B><font color='green'>Mentor PM: [key_name_mentor(src, X, 0, 0, show_char_sender)]->[key_name_mentor(C, X, 0, 0, show_char_recip)]:</B> \blue [msg]</font>") //inform X
|
||||
for(var/client/A in admins)
|
||||
if(A.key!=key && A.key!=C.key) //check client/A is an Mentor and isn't the sender or recipient
|
||||
A << "<B><font color='green'>Mentor PM: [key_name_mentor(src, A, 0, 0, show_char_sender)]->[key_name_mentor(C, A, 0, 0, show_char_recip)]:</B> \blue [msg]</font>" //inform A
|
||||
to_chat(A, "<B><font color='green'>Mentor PM: [key_name_mentor(src, A, 0, 0, show_char_sender)]->[key_name_mentor(C, A, 0, 0, show_char_recip)]:</B> \blue [msg]</font>") //inform A
|
||||
@@ -13,10 +13,10 @@
|
||||
|
||||
if(check_rights(R_ADMIN,0))
|
||||
msg = "<span class='mentoradmin'><span class='prefix'>MENTOR:</span> <EM>[key_name(src, 0, 0)]</EM>: <span class='message'>[msg]</span></span>"
|
||||
mentors << msg
|
||||
admins << msg
|
||||
to_chat(mentors, msg)
|
||||
to_chat(admins, msg)
|
||||
|
||||
else
|
||||
msg = "<span class='mentor'><span class='prefix'>MENTOR:</span> <EM>[key_name(src, 0, 0)]</EM>: <span class='message'>[msg]</span></span>"
|
||||
mentors << msg
|
||||
admins << msg
|
||||
to_chat(mentors, msg)
|
||||
to_chat(admins, msg)
|
||||
|
||||
Reference in New Issue
Block a user