From 6a77df8792c6b84805543fd956099e4671393c8b Mon Sep 17 00:00:00 2001 From: Mars Date: Fri, 17 Aug 2018 12:31:26 +0200 Subject: [PATCH] UID usage for a number of hrefs. There should be only UID usage now for the hrefs: adminmoreinfo, adminplayerobservefollow, adminplayeropts, vars, subtlemessage, traitor, BlueSpaceArtillery, CentcommReply, SyndicateReply, adminspawncookie, priv_msg, revive, follow. --- code/__HELPERS/mobs.dm | 4 +- code/defines/procs/admin.dm | 2 +- code/game/gamemodes/cult/cult_comms.dm | 4 +- .../gamemodes/miniantags/revenant/revenant.dm | 2 +- code/modules/admin/admin.dm | 4 +- code/modules/admin/player_panel.dm | 42 +++++++++---------- code/modules/admin/topic.dm | 12 ++---- code/modules/admin/verbs/adminhelp.dm | 4 +- code/modules/admin/verbs/freeze.dm | 16 +++---- code/modules/error_handler/error_viewer.dm | 10 ++--- code/modules/mob/dead/observer/observer.dm | 10 ++--- code/modules/mob/living/carbon/human/emote.dm | 2 +- .../hostile/megafauna/megafauna.dm | 2 +- code/modules/mob/login.dm | 4 +- 14 files changed, 56 insertions(+), 62 deletions(-) diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index 665e9376d86..1ac07146e96 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -445,7 +445,7 @@ This is always put in the attack log. to_chat(user, "Name = [M.name]; Real_name = [M.real_name]; Mind_name = [M.mind?"[M.mind.name]":""]; Key = [M.key];") to_chat(user, "Location = [location_description];") to_chat(user, "[special_role_description]") - to_chat(user, "(PM) ([ADMIN_PP(M,"PP")]) ([ADMIN_VV(M,"VV")]) ([ADMIN_SM(M,"SM")]) ([ADMIN_FLW(M,"FLW")]) (CA)") + to_chat(user, "(PM) ([ADMIN_PP(M,"PP")]) ([ADMIN_VV(M,"VV")]) ([ADMIN_SM(M,"SM")]) ([ADMIN_FLW(M,"FLW")]) (CA)") // Gets the first mob contained in an atom, and warns the user if there's not exactly one /proc/get_mob_in_atom_with_warning(atom/A, mob/user = usr) @@ -503,4 +503,4 @@ This is always put in the attack log. var/list/viewrangelist = splittext(view, "x") viewX = text2num(viewrangelist[1]) viewY = text2num(viewrangelist[2]) - return list(viewX, viewY) \ No newline at end of file + return list(viewX, viewY) diff --git a/code/defines/procs/admin.dm b/code/defines/procs/admin.dm index 3c09e6213de..312d6cbc2e3 100644 --- a/code/defines/procs/admin.dm +++ b/code/defines/procs/admin.dm @@ -46,7 +46,7 @@ . += "Administrator" else if(include_link && C) - . += "" + . += "" . += key if(include_link) diff --git a/code/game/gamemodes/cult/cult_comms.dm b/code/game/gamemodes/cult/cult_comms.dm index c854693c86e..175e650d84e 100644 --- a/code/game/gamemodes/cult/cult_comms.dm +++ b/code/game/gamemodes/cult/cult_comms.dm @@ -34,6 +34,6 @@ if(iscultist(M)) to_chat(M, my_message) else if(M in dead_mob_list) - to_chat(M, " (F) [my_message] ") + to_chat(M, " (F) [my_message] ") - log_say("(CULT) [message]") \ No newline at end of file + log_say("(CULT) [message]") diff --git a/code/game/gamemodes/miniantags/revenant/revenant.dm b/code/game/gamemodes/miniantags/revenant/revenant.dm index 953e6e91762..7f6df567d61 100644 --- a/code/game/gamemodes/miniantags/revenant/revenant.dm +++ b/code/game/gamemodes/miniantags/revenant/revenant.dm @@ -102,7 +102,7 @@ if(istype(M, /mob/living/simple_animal/revenant)) to_chat(M, rendered) if(isobserver(M)) - to_chat(M, "(F) [rendered]") + to_chat(M, "(F) [rendered]") return /mob/living/simple_animal/revenant/Stat() diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 0579497d32e..5f170b9ceec 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -53,12 +53,12 @@ var/global/nologevent = 0 if(istype(M, /mob/new_player)) body += " Hasn't Entered Game " else - body += " \[Heal\] " + body += " \[Heal\] " body += "

\[ " body += "VV - " body += "[ADMIN_TP(M,"TP")] - " - body += "PM - " + body += "PM - " body += "[ADMIN_SM(M,"SM")] - " body += "[admin_jump_link(M)]\]
" if(ishuman(M) && M.mind) diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index db9ccfeb9a1..e5ac6958e34 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -61,7 +61,7 @@ } - function expand(id,job,name,real_name,image,key,ip,antagonist,ref,eyeref){ + function expand(id,job,name,real_name,image,key,ip,antagonist,UID,eyeUID){ clearAll(); @@ -75,15 +75,15 @@ body += ""; - body += "PP - " + body += "PP - " body += "N - " - body += "VV - " - body += "TP - " - body += "PM - " - body += "SM - " - body += "FLW" - if(eyeref) - body += "|EYE" + body += "VV - " + body += "TP - " + body += "PM - " + body += "SM - " + body += "FLW" + if(eyeUID) + body += "|EYE" body += "
" if(antagonist > 0) body += "Antagonist"; @@ -288,11 +288,11 @@ M_key = replacetext(M_key, "\"", "") M_key = replacetext(M_key, "\\", "") - var/M_eyeref = "" + var/M_eyeUID = "" if(isAI(M)) var/mob/living/silicon/ai/A = M if(A.client && A.eyeobj) // No point following clientless AI eyes - M_eyeref = "\ref[A.eyeobj]" + M_eyeUID = "[A.eyeobj.UID()]" //output for each mob dat += {" @@ -300,7 +300,7 @@ [M_name] - [M_rname] - [M_key] ([M_job]) @@ -370,16 +370,16 @@ dat += {"[(M.client ? "[M.client]" : "No client")] - X - PM + X + PM "} switch(is_special_character(M)) if(0) - dat += {"Traitor?"} + dat += {"Traitor?"} if(1) - dat += {"Traitor?"} + dat += {"Traitor?"} if(2) - dat += {"Traitor?"} + dat += {"Traitor?"} dat += "" @@ -397,8 +397,8 @@ if(!dname) dname = M - return {"[dname][caption][logout_status][M.stat == 2 ? " (DEAD)" : ""] - PM[close ? "" : ""]"} + return {"[dname][caption][logout_status][M.stat == 2 ? " (DEAD)" : ""] + PM[close ? "" : ""]"} /datum/admins/proc/check_antagonists() if(!check_rights(R_ADMIN)) return @@ -433,7 +433,7 @@ while(!istype(disk_loc, /turf)) if(istype(disk_loc, /mob)) var/mob/M = disk_loc - dat += "carried by [M.real_name] " + dat += "carried by [M.real_name] " if(istype(disk_loc, /obj)) var/obj/O = disk_loc dat += "in \a [O.name] " @@ -563,7 +563,7 @@ if(show_objectives) txt += {" - Show Objective + Show Objective "} diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 9a526c4a7c2..d9e17cc7bf3 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -3365,19 +3365,13 @@ /proc/admin_jump_link(var/atom/target) if(!target) return // The way admin jump links handle their src is weirdly inconsistent... - var/source = "_src_=holder" + . = ADMIN_FLW(target,"FLW") if(isAI(target)) // AI core/eye follow links var/mob/living/silicon/ai/A = target - . = "FLW" if(A.client && A.eyeobj) // No point following clientless AI eyes - . += "|EYE" - return + . += "|[ADMIN_FLW(A.eyeobj,"EYE")]" else if(istype(target, /mob/dead/observer)) var/mob/dead/observer/O = target - . = "FLW" if(O.mind && O.mind.current) - . += "|BDY" - return - else - return "FLW" + . += "|[ADMIN_FLW(O.mind.current,"BDY")]" diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 053933bc74a..5601d10b083 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -109,7 +109,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey"," switch(selected_type) if("Mentorhelp") - msg = "[selected_type]: [key_name(src, TRUE, selected_type)] (?) (PP) ([ADMIN_VV(mob,"VV")]) (SM) ([admin_jump_link(mob)]) (CA) (REJT) [ai_found ? " (CL)" : ""] (TAKE) : [msg]" + msg = "[selected_type]: [key_name(src, TRUE, selected_type)] ([ADMIN_QUE(mob,"?")]) ([ADMIN_PP(mob,"PP")]) ([ADMIN_VV(mob,"VV")]) ([ADMIN_SM(mob,"SM")]) ([admin_jump_link(mob)]) (CA) (REJT) [ai_found ? " (CL)" : ""] (TAKE) : [msg]" for(var/client/X in mentorholders + modholders + adminholders) if(X.prefs.sound & SOUND_ADMINHELP) X << 'sound/effects/adminhelp.ogg' @@ -123,7 +123,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey"," T.addResponse(usr.client, msg) else ticketNum = globAdminTicketHolder.getTicketCounter() // ticketNum is the ticket ready to be assigned. - msg = "[selected_type]: [key_name(src, TRUE, selected_type)] (?) (PP) ([ADMIN_VV(mob,"VV")]) (SM) ([admin_jump_link(mob)]) (CA) (TICKET) [ai_found ? " (CL)" : ""](TAKE) : [msg]" + msg = "[selected_type]: [key_name(src, TRUE, selected_type)] ([ADMIN_QUE(mob,"?")]) ([ADMIN_PP(mob,"PP")]) ([ADMIN_VV(mob,"VV")]) ([ADMIN_SM(mob,"SM")]) ([admin_jump_link(mob)]) (CA) (TICKET) [ai_found ? " (CL)" : ""](TAKE) : [msg]" //Open a new adminticket and inform the user. globAdminTicketHolder.newTicket(src, prunedmsg, msg) for(var/client/X in modholders + adminholders) diff --git a/code/modules/admin/verbs/freeze.dm b/code/modules/admin/verbs/freeze.dm index 9439c63e861..4ffa207c3f4 100644 --- a/code/modules/admin/verbs/freeze.dm +++ b/code/modules/admin/verbs/freeze.dm @@ -9,12 +9,12 @@ var/global/list/frozen_mob_list = list() /client/proc/freeze(var/mob/living/M as mob in mob_list) set category = "Admin" set name = "Freeze" - + if(!check_rights(R_ADMIN)) return - - if(!istype(M)) - return + + if(!istype(M)) + return if(M in frozen_mob_list) M.admin_unFreeze(src) @@ -89,8 +89,8 @@ var/global/list/frozen_mob_list = list() set name = "Freeze Mech" if(!check_rights(R_ADMIN)) - return - + return + var/obj/mecha/M = O if(!istype(M,/obj/mecha)) to_chat(src, "This can only be used on mechs!") @@ -105,7 +105,7 @@ var/global/list/frozen_mob_list = list() M.overlays += adminomaly if(M.occupant) M.removeVerb(/obj/mecha/verb/eject) - to_chat(M.occupant, "You have been frozen by [key]") + to_chat(M.occupant, "You have been frozen by [key]") message_admins("[key_name_admin(usr)] froze [key_name(M.occupant)] in a [M.name]") log_admin("[key_name(usr)] froze [key_name(M.occupant)] in a [M.name]") else @@ -116,7 +116,7 @@ var/global/list/frozen_mob_list = list() M.overlays -= adminomaly if(M.occupant) M.addVerb(/obj/mecha/verb/eject) - to_chat(M.occupant, "You have been unfrozen by [key]") + to_chat(M.occupant, "You have been unfrozen by [key]") message_admins("[key_name_admin(usr)] unfroze [key_name(M.occupant)] in a [M.name]") log_admin("[key_name(usr)] unfroze [key_name(M.occupant)] in a [M.name]") else diff --git a/code/modules/error_handler/error_viewer.dm b/code/modules/error_handler/error_viewer.dm index d17b75b986e..146a69c9774 100644 --- a/code/modules/error_handler/error_viewer.dm +++ b/code/modules/error_handler/error_viewer.dm @@ -14,7 +14,7 @@ var/global/datum/ErrorViewer/ErrorCache/error_cache = new() var/global/datum/ErrorViewer/ErrorCache/error_cache = null #endif -// - ErrorSource datums exist for each line (of code) that generates an error, +// - ErrorSource datums exist for each line (of code) that generates an error, // and keep track of all errors generated by that line. // // - ErrorEntry datums exist for each logged error, and keep track of all @@ -181,15 +181,15 @@ var/global/datum/ErrorViewer/ErrorCache/error_cache = null if(srcRef) html += "
src: VV" if(ispath(srcType, /mob)) - html += " PP" - html += " Follow" + html += " PP" + html += " Follow" if(istype(srcLoc)) html += "
src.loc: VV" html += " JMP" if(usrRef) html += "
usr: VV" - html += " PP" - html += " Follow" + html += " PP" + html += " Follow" if(istype(usrLoc)) html += "
usr.loc: VV" html += " JMP" diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 933ef9a6403..1cf9ca1a3b9 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -541,18 +541,18 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if((!target) || (!ghost)) return if(isAI(target)) // AI core/eye follow links var/mob/living/silicon/ai/A = target - . = "core" + . = "core" if(A.client && A.eyeobj) // No point following clientless AI eyes - . += "|eye" + . += "|eye" return else if(istype(target, /mob/dead/observer)) var/mob/dead/observer/O = target - . = "follow" + . = "follow" if(O.mind && O.mind.current) - . += "|body" + . += "|body" return else - return "follow" + return "follow" //BEGIN TELEPORT HREF CODE /mob/dead/observer/Topic(href, href_list) diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index cca8fc6a4e3..069dc76b3b7 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -836,7 +836,7 @@ if(locate(/obj/item/storage/bible) in get_turf(src)) to_chat(viewers(src), "[src] farts on the Bible!") var/image/cross = image('icons/obj/storage.dmi', "bible") - var/adminbfmessage = "[bicon(cross)] Bible Fart: [key_name(src, 1)] (?) (PP) ([ADMIN_VV(src,"VV")]) (SM) ([admin_jump_link(src)]) (CA) (SMITE):" + var/adminbfmessage = "[bicon(cross)] Bible Fart: [key_name(src, 1)] ([ADMIN_QUE(src,"?")]) ([ADMIN_PP(src,"PP")]) ([ADMIN_VV(src,"VV")]) ([ADMIN_SM(src,"SM")]) ([admin_jump_link(src)]) (CA) (SMITE):" for(var/client/X in admins) if(check_rights(R_EVENT, 0, X.mob)) to_chat(X, adminbfmessage) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm index 23a25d6df28..4b5c77de933 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm @@ -86,7 +86,7 @@ return var/turf/newloc = loc message_admins("Megafauna [src] \ - (FLW) \ + ([ADMIN_FLW(src,"FLW")]) \ moved via shuttle from ([oldloc.x], [oldloc.y], [oldloc.z]) to \ ([newloc.x], [newloc.y], [newloc.z])") diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index a5883fe93f2..1e06d4547d9 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -19,10 +19,10 @@ spawn() alert("You have logged in already with another key this round, please log out of this one NOW or risk being banned!") if(matches) if(M.client) - message_admins("Notice: [key_name_admin(src)] has the same [matches] as [key_name_admin(M)].", 1) + message_admins("Notice: [key_name_admin(src)] has the same [matches] as [key_name_admin(M)].", 1) log_adminwarn("Notice: [key_name(src)] has the same [matches] as [key_name(M)].") else - message_admins("Notice: [key_name_admin(src)] has the same [matches] as [key_name_admin(M)] (no longer logged in). ", 1) + message_admins("Notice: [key_name_admin(src)] has the same [matches] as [key_name_admin(M)] (no longer logged in). ", 1) log_adminwarn("Notice: [key_name(src)] has the same [matches] as [key_name(M)] (no longer logged in).") /mob/Login()