From 2d7c9354d7a06cc2954df6da795ebb4a9e3d39e6 Mon Sep 17 00:00:00 2001 From: Ren Erthilo Date: Sun, 22 Apr 2012 23:05:25 +0100 Subject: [PATCH] TG: - 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. Revision: r3121 Author: baloh.matevz --- code/defines/procs/helpers.dm | 19 ++++++++++++++++--- code/modules/admin/verbs/adminsay.dm | 3 ++- code/modules/mob/dead/observer/observer.dm | 1 + code/modules/mob/mob.dm | 14 ++++++++++++++ 4 files changed, 33 insertions(+), 4 deletions(-) diff --git a/code/defines/procs/helpers.dm b/code/defines/procs/helpers.dm index 0668e79a556..075cb3e4150 100644 --- a/code/defines/procs/helpers.dm +++ b/code/defines/procs/helpers.dm @@ -910,11 +910,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 += "" + text += "" else - text += "" + if(ismob(include_link)) + var/mob/MM = include_link + if(MM.client) + text += "" + else + linked = 0 + else if (istype(include_link, /client)) + text += "" + else + linked = 0 if (the_client && the_client.holder && the_client.stealth && !include_name) text += "Administrator" @@ -922,7 +932,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 += "" + if(linked) + text += "" + else + text += " (DC)" if (include_name && !isnull(the_mob)) if (the_mob.real_name) diff --git a/code/modules/admin/verbs/adminsay.dm b/code/modules/admin/verbs/adminsay.dm index bd5946ff053..cff3f989427 100644 --- a/code/modules/admin/verbs/adminsay.dm +++ b/code/modules/admin/verbs/adminsay.dm @@ -19,11 +19,12 @@ if (!msg) return + //feedback_add_details("admin_verb","M") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! for (var/mob/M in world) if (M.client && M.client.holder) if (src.holder.rank == "Admin Observer") M << "ADMIN: [key_name(usr, M)]: [msg]" else - M << "ADMIN: [key_name(usr, M)]X: [msg]" + M << "ADMIN: [key_name(usr, M)] (JMP): [msg]" diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 7d358a5eed4..d01bbc91010 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -82,6 +82,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) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index d03457cf60d..6ed478a73ec 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -631,7 +631,21 @@ src:cameraFollow = null +/client/Topic(href, href_list) + if(href_list["priv_msg"]) + 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 + cmd_admin_pm(C,null) + else + ..() + /mob/Topic(href, href_list) + if(href_list["priv_msg"]) //for priv_msg references that have yet to be updated to target clients. Forwards it to client/Topic() + if(client) + client.Topic(href, href_list) + if(href_list["mach_close"]) var/t1 = text("window=[href_list["mach_close"]]") machine = null