mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
- All PM links are now tied to clients and not mobs. What this means is that all PM links (the links admins get in admin messages which lead to a PM) should now point directly to the client, if one still exists or report them as disconnected. This means that there should no longer be problems with clients which swap mobs.
- Made the player-side admin pm message more visible and obnoxious. Some players might find it annoying but at least it will not leave much room to complain about "missing PM-s" Screenshot: http://www.kamletos.si/admin%20message%20format.PNG - Fixed that awkward X in asay messages, which moved whatever mob you were in to the location of the person who said the message. Replaced it with JMP, which does the same as the JMP in adminhelps - makes a ghost and moves that ghost to the location: Screenshot: http://www.kamletos.si/admin%20say.PNG - Ghosts which find themselves locked in any form of container (closets most commonly) will now (FINALLY) exit the container (and it is any container!) after they click one of the arrow keys. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3121 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -867,11 +867,21 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
if (!the_key)
|
||||
text += "*no client*"
|
||||
else
|
||||
var/linked = 1
|
||||
if (include_link && !isnull(the_mob))
|
||||
if (istext(include_link))
|
||||
text += "<a href=\"byond://?src=[include_link];priv_msg=\ref[the_mob]\">"
|
||||
text += "<a href=\"byond://?src=[include_link];priv_msg=\ref[the_client]\">"
|
||||
else
|
||||
text += "<a href=\"byond://?src=\ref[include_link];priv_msg=\ref[the_mob]\">"
|
||||
if(ismob(include_link))
|
||||
var/mob/MM = include_link
|
||||
if(MM.client)
|
||||
text += "<a href=\"byond://?src=\ref[MM.client];priv_msg=\ref[the_client]\">"
|
||||
else
|
||||
linked = 0
|
||||
else if (istype(include_link, /client))
|
||||
text += "<a href=\"byond://?src=\ref[include_link];priv_msg=\ref[the_client]\">"
|
||||
else
|
||||
linked = 0
|
||||
|
||||
if (the_client && the_client.holder && the_client.stealth && !include_name)
|
||||
text += "Administrator"
|
||||
@@ -879,7 +889,10 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
text += "[the_key]"
|
||||
|
||||
if (!isnull(include_link) && !isnull(the_mob))
|
||||
text += "</a>"
|
||||
if(linked)
|
||||
text += "</a>"
|
||||
else
|
||||
text += " (DC)"
|
||||
|
||||
if (include_name && !isnull(the_mob))
|
||||
if (the_mob.real_name)
|
||||
|
||||
@@ -25,5 +25,5 @@
|
||||
if (src.holder.rank == "Admin Observer")
|
||||
M << "<span class=\"gfartadmin\"><span class=\"prefix\">ADMIN:</span> <span class=\"name\">[key_name(usr, M)]:</span> <span class=\"message\">[msg]</span></span>"
|
||||
else
|
||||
M << "<span class=\"admin\"><span class=\"prefix\">ADMIN:</span> <span class=\"name\">[key_name(usr, M)]</span><a href='?src=\ref[M.client.holder];jumpto=\ref[mob]'>X</a>: <span class=\"message\">[msg]</span></span>"
|
||||
M << "<span class=\"admin\"><span class=\"prefix\">ADMIN:</span> <span class=\"name\">[key_name(usr, M)]</span> (<A HREF='?src=\ref[M.client.holder];adminplayerobservejump=\ref[mob]'>JMP</A>): <span class=\"message\">[msg]</span></span>"
|
||||
|
||||
|
||||
@@ -80,6 +80,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(NewLoc)
|
||||
loc = NewLoc
|
||||
return
|
||||
loc = get_turf(src) //Get out of closets and such as a ghost
|
||||
if((direct & NORTH) && y < world.maxy)
|
||||
y++
|
||||
if((direct & SOUTH) && y > 1)
|
||||
|
||||
@@ -604,42 +604,62 @@
|
||||
src:cameraFollow = null
|
||||
|
||||
|
||||
/mob/Topic(href, href_list)
|
||||
if(href_list["mach_close"])
|
||||
var/t1 = text("window=[href_list["mach_close"]]")
|
||||
machine = null
|
||||
src << browse(null, t1)
|
||||
/client/Topic(href, href_list)
|
||||
if(href_list["priv_msg"]) //All PM links have clients as their SRC-s (So that you always PM the same client even if they change mob (ghost, observe, etc.)), but PM code is in mob/topic() So this redirects the call.
|
||||
if(mob)
|
||||
mob.Topic(href, href_list)
|
||||
else
|
||||
..()
|
||||
|
||||
/mob/Topic(href, href_list)
|
||||
if(href_list["priv_msg"])
|
||||
var/mob/M = locate(href_list["priv_msg"])
|
||||
if(M)
|
||||
var/client/C = locate(href_list["priv_msg"])
|
||||
|
||||
if(ismob(C)) //Old stuff can pass in mobs instead of clients
|
||||
var/mob/M = C
|
||||
C = M.client
|
||||
|
||||
if(C)
|
||||
if(src.client && client.muted_complete)
|
||||
src << "You are muted have a nice day"
|
||||
return
|
||||
if (!ismob(M))
|
||||
if (!istype(C,/client))
|
||||
src << "\red not a client."
|
||||
return
|
||||
//This should have a check to prevent the player to player chat but I am too tired atm to add it.
|
||||
var/t = input("Message:", text("Private message to [M.key]")) as text|null
|
||||
if (!t || !usr || !M)
|
||||
return
|
||||
if (usr.client && usr.client.holder)
|
||||
M << "\red Admin PM from-<b>[key_name(usr, M, 0)]</b>: [t]"
|
||||
usr << "\blue Admin PM to-<b>[key_name(M, usr, 1)]</b>: [t]"
|
||||
else
|
||||
if (M)
|
||||
if (M.client && M.client.holder)
|
||||
M << "\blue Reply PM from-<b>[key_name(usr, M, 1)]</b>: [t]"
|
||||
else
|
||||
M << "\red Reply PM from-<b>[key_name(usr, M, 0)]</b>: [t]"
|
||||
usr << "\blue Reply PM to-<b>[key_name(M, usr, 0)]</b>: [t]"
|
||||
|
||||
log_admin("PM: [key_name(usr)]->[key_name(M)] : [t]")
|
||||
if ( !( src.client.holder || C.holder ) ) //neither of the two is an admin.
|
||||
src.client << "\red Admin-player or player-admin conversation only!"
|
||||
return.
|
||||
|
||||
var/t = input("Message:", text("Private message to [C.key]")) as text|null
|
||||
if (!t || !usr || !C)
|
||||
return
|
||||
if (usr.client && usr.client.holder) //Admin is messaging a player
|
||||
C << "\red <font size='4'><b>-- Administrator private message --</b></font>"
|
||||
C << "<b>[key_name(usr.client, C, 0)] [t]</b>"
|
||||
C << "Click on the administrator's name to reply."
|
||||
usr << "\blue Admin PM to <b>[key_name(C, usr.client, 1)]</b>: [t]"
|
||||
else
|
||||
if (C)
|
||||
if (C.holder)
|
||||
C << "\blue Reply PM from <b>[key_name(usr.client, C, 1)]</b>: [t]"
|
||||
else
|
||||
C << "\red Reply PM from <b>[key_name(usr.client, C, 0)]</b>: [t]"
|
||||
usr.client << "\blue Reply PM to <b>[key_name(C, usr.client, 0)]</b>: [t]"
|
||||
|
||||
log_admin("PM: [usr.client.key]->[C.key] : [t]")
|
||||
|
||||
//we don't use message_admins here because the sender/receiver might get it too
|
||||
for (var/mob/K in world)
|
||||
if(K && usr)
|
||||
if(K.client && K.client.holder && K.key != usr.key && K.key != M.key)
|
||||
K << "<b><font color='blue'>PM: [key_name(usr, K)]->[key_name(M, K)]:</b> \blue [t]</font>"
|
||||
if(K.client && K.client.holder && K.key != usr.key && K.key != C.key)
|
||||
K << "<b><font color='blue'>PM: [key_name(usr.client, K.client)]->[key_name(C, K.client)]:</b> \blue [t]</font>"
|
||||
else
|
||||
client << "\red Client disconnected"
|
||||
if(href_list["mach_close"])
|
||||
var/t1 = text("window=[href_list["mach_close"]]")
|
||||
machine = null
|
||||
src << browse(null, t1)
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
@@ -163,6 +163,7 @@
|
||||
#define FILE_DIR "icons/vending_icons"
|
||||
#define FILE_DIR "interface"
|
||||
#define FILE_DIR "maps"
|
||||
#define FILE_DIR "maps/backup"
|
||||
#define FILE_DIR "sound"
|
||||
#define FILE_DIR "sound/ambience"
|
||||
#define FILE_DIR "sound/announcer"
|
||||
|
||||
Reference in New Issue
Block a user