From 960bac697692c06539e384fdd8b7f528b649018c Mon Sep 17 00:00:00 2001 From: mochi Date: Sat, 6 Jun 2020 09:37:48 +0200 Subject: [PATCH 1/8] View Asays, Erase Flavor Text and Use Random Name --- code/modules/admin/admin.dm | 3 +- code/modules/admin/topic.dm | 48 ++++++++++++++++++++++++++++ code/modules/admin/verbs/adminsay.dm | 7 ++++ code/modules/admin/verbs/asays.dm | 47 +++++++++++++++++++++++++++ paradise.dme | 1 + 5 files changed, 105 insertions(+), 1 deletion(-) create mode 100644 code/modules/admin/verbs/asays.dm diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index df156c5b0df..0d2c818ac4d 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -109,9 +109,10 @@ GLOBAL_VAR_INIT(nologevent, 0) else body += "Add to Watchlist " - if(M.client) body += "| Prison | " body += "\ Send back to Lobby | " + body += "\ Erase Flavor Text | " + body += "\ Use Random Name | " var/muted = M.client.prefs.muted body += {"
Mute: \[IC | diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 1a040d46e90..8df4ca31c6b 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1287,6 +1287,54 @@ NP.ckey = M.ckey qdel(M) + else if(href_list["eraseflavortext"]) + if(!check_rights(R_ADMIN)) + return + + var/mob/M = locateUID(href_list["eraseflavortext"]) + + if(!M.client) + to_chat(usr, "[M] doesn't seem to have an active client.") + return + + if(M.flavor_text == "" && M.client.prefs.flavor_text == "") + to_chat(usr, "[M] has no flavor text set.") + return + + if(alert(usr, "Erase [key_name(M)]'s flavor text?", "Message", "Yes", "No") != "Yes") + return + + log_admin("[key_name(usr)] has erased [key_name(M)]'s flavor text.") + message_admins("[key_name_admin(usr)] has erased [key_name_admin(M)]'s flavor text.") + + // Clears the body's flavor text as well as the persistent one + M.flavor_text = ""; + M.client.prefs.flavor_text = ""; + M.client.prefs.save_character(M.client) + + else if(href_list["userandomname"]) + if(!check_rights(R_ADMIN)) + return + + var/mob/M = locateUID(href_list["userandomname"]) + + if(!M.client) + to_chat(usr, "[M] doesn't seem to have an active client.") + return + + if(M.client.prefs.be_random_name) + to_chat(usr, "[M] already uses a random name.") + return + + if(alert(usr, "Force [key_name(M)] to use a random name?", "Message", "Yes", "No") != "Yes") + return + + log_admin("[key_name(usr)] has forced [key_name(M)] to use a random name.") + message_admins("[key_name_admin(usr)] has forced [key_name_admin(M)] to use a random name.") + + M.client.prefs.be_random_name = TRUE; + M.client.prefs.save_character(M.client) + else if(href_list["tdome1"]) if(!check_rights(R_SERVER|R_EVENT)) return diff --git a/code/modules/admin/verbs/adminsay.dm b/code/modules/admin/verbs/adminsay.dm index a0e8b4b9088..fd7be97fb5c 100644 --- a/code/modules/admin/verbs/adminsay.dm +++ b/code/modules/admin/verbs/adminsay.dm @@ -7,6 +7,13 @@ msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN)) if(!msg) return + var/datum/asays/asay = new() + asay.ckey = usr.ckey + asay.rank = usr.client.holder.rank + asay.message = msg + asay.time = world.timeofday + + GLOB.asays += asay log_adminsay(msg, src) if(check_rights(R_ADMIN,0)) diff --git a/code/modules/admin/verbs/asays.dm b/code/modules/admin/verbs/asays.dm new file mode 100644 index 00000000000..d25d2753f12 --- /dev/null +++ b/code/modules/admin/verbs/asays.dm @@ -0,0 +1,47 @@ +GLOBAL_LIST_EMPTY(asays) + +/datum/asays + var/ckey = "" + var/rank = "" + var/message = "" + var/time = 0 + +/client/proc/viewasays() + set name = "View Asays" + set desc = "View Asays from the current round." + set category = "Admin" + + if(!check_rights(R_ADMIN)) + return + + var/output = "" + + // Header & body start + output += {" + + + + + + + + + "} + + for (var/datum/asays/A in GLOB.asays) + var/timestr = time2text(A.time, "hh:mm:ss") + output += {" + + + + + + "} + + output += {" + +
TimeCkeyMessage
[timestr][A.ckey] ([A.rank])[A.message]
"} + + var/datum/browser/popup = new(src, "asays", "
Current Round Asays
", 1000, 800) + popup.set_content(output) + popup.open(0) diff --git a/paradise.dme b/paradise.dme index c3dcfbd3c2d..137897243f0 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1203,6 +1203,7 @@ #include "code\modules\admin\verbs\adminsay.dm" #include "code\modules\admin\verbs\alt_check.dm" #include "code\modules\admin\verbs\antag-ooc.dm" +#include "code\modules\admin\verbs\asays.dm" #include "code\modules\admin\verbs\atmosdebug.dm" #include "code\modules\admin\verbs\BrokenInhands.dm" #include "code\modules\admin\verbs\cinematic.dm" From 28e115ce7d53170abbfd1d684e981f4544bdd405 Mon Sep 17 00:00:00 2001 From: mochi Date: Sat, 6 Jun 2020 15:38:52 +0200 Subject: [PATCH 2/8] Comment and tweak new topics, add borders to asays Use Random Name now assigns a random name to the mob/char preferences Add borders to View Asays table Increase View Asays table size to 1200x825 Forgot to add View Asays to verb list again, whoops --- code/modules/admin/admin_verbs.dm | 2 ++ code/modules/admin/topic.dm | 15 +++++++++------ code/modules/admin/verbs/asays.dm | 23 +++++++++++++++++++---- 3 files changed, 30 insertions(+), 10 deletions(-) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 62cb627db17..f37dc78333c 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -65,6 +65,7 @@ GLOBAL_LIST_INIT(admin_verbs_admin, list( /client/proc/global_man_up, /client/proc/delbook, /client/proc/view_flagged_books, + /client/proc/view_asays, /client/proc/empty_ai_core_toggle_latejoin, /client/proc/aooc, /client/proc/freeze, @@ -140,6 +141,7 @@ GLOBAL_LIST_INIT(admin_verbs_server, list( /datum/admins/proc/toggle_aliens, /client/proc/delbook, /client/proc/view_flagged_books, + /client/proc/view_asays, /client/proc/toggle_antagHUD_use, /client/proc/toggle_antagHUD_restrictions, /client/proc/set_ooc, diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 8df4ca31c6b..489c5a65b7c 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1307,8 +1307,10 @@ log_admin("[key_name(usr)] has erased [key_name(M)]'s flavor text.") message_admins("[key_name_admin(usr)] has erased [key_name_admin(M)]'s flavor text.") - // Clears the body's flavor text as well as the persistent one + // Clears the mob's flavor text M.flavor_text = ""; + + // Clear and save the DB character's flavor text M.client.prefs.flavor_text = ""; M.client.prefs.save_character(M.client) @@ -1322,17 +1324,18 @@ to_chat(usr, "[M] doesn't seem to have an active client.") return - if(M.client.prefs.be_random_name) - to_chat(usr, "[M] already uses a random name.") - return - if(alert(usr, "Force [key_name(M)] to use a random name?", "Message", "Yes", "No") != "Yes") return log_admin("[key_name(usr)] has forced [key_name(M)] to use a random name.") message_admins("[key_name_admin(usr)] has forced [key_name_admin(M)] to use a random name.") - M.client.prefs.be_random_name = TRUE; + // Update the mob's name with a random one straight away + var/random_name = random_name(M.client.prefs.gender, M.client.prefs.species) + M.rename_character(M.real_name, random_name) + + // Save that random name for next rounds + M.client.prefs.real_name = random_name M.client.prefs.save_character(M.client) else if(href_list["tdome1"]) diff --git a/code/modules/admin/verbs/asays.dm b/code/modules/admin/verbs/asays.dm index d25d2753f12..2c2952e6ec3 100644 --- a/code/modules/admin/verbs/asays.dm +++ b/code/modules/admin/verbs/asays.dm @@ -6,7 +6,7 @@ GLOBAL_LIST_EMPTY(asays) var/message = "" var/time = 0 -/client/proc/viewasays() +/client/proc/view_asays() set name = "View Asays" set desc = "View Asays from the current round." set category = "Admin" @@ -14,11 +14,26 @@ GLOBAL_LIST_EMPTY(asays) if(!check_rights(R_ADMIN)) return - var/output = "" + var/output = {" + +
+ "} // Header & body start output += {" - + @@ -42,6 +57,6 @@ GLOBAL_LIST_EMPTY(asays)
Time Ckey
"} - var/datum/browser/popup = new(src, "asays", "
Current Round Asays
", 1000, 800) + var/datum/browser/popup = new(src, "asays", "
Current Round Asays
", 1200, 825) popup.set_content(output) popup.open(0) From 49bf339129f3f6eb44150d9ef8097aa13b091536 Mon Sep 17 00:00:00 2001 From: mochi Date: Sat, 6 Jun 2020 15:56:40 +0200 Subject: [PATCH 3/8] Add some padding to View Asays table cells --- code/modules/admin/verbs/asays.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/admin/verbs/asays.dm b/code/modules/admin/verbs/asays.dm index 2c2952e6ec3..10b0fb651a0 100644 --- a/code/modules/admin/verbs/asays.dm +++ b/code/modules/admin/verbs/asays.dm @@ -19,6 +19,7 @@ GLOBAL_LIST_EMPTY(asays) td, th { border: 1px solid #425c6e; + padding: 3px; } thead From d03aee7131d6ca9765667d259b90792d3bdc6393 Mon Sep 17 00:00:00 2001 From: mochi Date: Tue, 9 Jun 2020 23:49:35 +0200 Subject: [PATCH 4/8] Semi-colons begone --- code/modules/admin/topic.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 489c5a65b7c..99f8371dc18 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1308,10 +1308,10 @@ message_admins("[key_name_admin(usr)] has erased [key_name_admin(M)]'s flavor text.") // Clears the mob's flavor text - M.flavor_text = ""; + M.flavor_text = "" // Clear and save the DB character's flavor text - M.client.prefs.flavor_text = ""; + M.client.prefs.flavor_text = "" M.client.prefs.save_character(M.client) else if(href_list["userandomname"]) From 453af6ac1dfd9070eb2a8c54eaa2b40fc7e47214 Mon Sep 17 00:00:00 2001 From: mochi Date: Mon, 15 Jun 2020 23:50:00 +0200 Subject: [PATCH 5/8] Add null checks to admin topics --- code/modules/admin/topic.dm | 90 +++++++++++++++++++++++++++++-------- 1 file changed, 72 insertions(+), 18 deletions(-) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 99f8371dc18..b51686431f8 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -14,7 +14,7 @@ if(!check_rights(R_ADMIN|R_MOD)) return var/client/C = locateUID(href_list["rejectadminhelp"]) - if(!C) + if(!isclient(C)) return C << 'sound/effects/adminhelp.ogg' @@ -324,7 +324,7 @@ if(!check_rights(R_SPAWN)) return var/mob/M = locateUID(href_list["mob"]) - if(!ismob(M)) + if(!istype(M, /mob)) to_chat(usr, "This can only be used on instances of type /mob") return @@ -436,7 +436,7 @@ if(!check_rights(R_BAN)) return var/mob/M = locateUID(href_list["appearanceban"]) - if(!ismob(M)) + if(!istype(M, /mob)) to_chat(usr, "This can only be used on instances of type /mob") return if(!M.ckey) //sanity @@ -487,7 +487,7 @@ // if(!check_rights(R_BAN)) return var/mob/M = locateUID(href_list["jobban2"]) - if(!ismob(M)) + if(!istype(M, /mob)) to_chat(usr, "This can only be used on instances of type /mob") return @@ -735,7 +735,7 @@ if(!check_rights(R_BAN)) return var/mob/M = locateUID(href_list["jobban4"]) - if(!ismob(M)) + if(!istype(M, /mob)) to_chat(usr, "This can only be used on instances of type /mob") return @@ -901,7 +901,7 @@ else if(href_list["boot2"]) var/mob/M = locateUID(href_list["boot2"]) - if(ismob(M)) + if(istype(M, /mob)) if(M.client && M.client.holder && (M.client.holder.rights & R_BAN)) to_chat(usr, "[key_name_admin(M)] cannot be kicked from the server.") return @@ -981,7 +981,7 @@ if(!check_rights(R_BAN)) return var/mob/M = locateUID(href_list["newban"]) - if(!ismob(M)) + if(!istype(M, /mob)) return var/ban_ckey_param = href_list["dbbanaddckey"] @@ -1087,7 +1087,7 @@ return var/mob/M = locateUID(href_list["mute"]) - if(!ismob(M)) return + if(!istype(M, /mob)) return if(!M.client) return var/mute_type = href_list["mute_type"] @@ -1207,8 +1207,9 @@ if(!check_rights(R_SERVER|R_EVENT)) return var/mob/M = locateUID(href_list["forcespeech"]) - if(!ismob(M)) + if(!istype(M, /mob)) to_chat(usr, "this can only be used on instances of type /mob") + return var/speech = input("What will [key_name(M)] say?.", "Force speech", "")// Don't need to sanitize, since it does that in say(), we also trust our admins. if(!speech) return @@ -1224,7 +1225,7 @@ return var/mob/M = locateUID(href_list["sendtoprison"]) - if(!ismob(M)) + if(!istype(M, /mob)) to_chat(usr, "This can only be used on instances of type /mob") return if(istype(M, /mob/living/silicon/ai)) @@ -1293,6 +1294,10 @@ var/mob/M = locateUID(href_list["eraseflavortext"]) + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") + return + if(!M.client) to_chat(usr, "[M] doesn't seem to have an active client.") return @@ -1320,6 +1325,10 @@ var/mob/M = locateUID(href_list["userandomname"]) + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") + return + if(!M.client) to_chat(usr, "[M] doesn't seem to have an active client.") return @@ -1345,7 +1354,7 @@ return var/mob/M = locateUID(href_list["tdome1"]) - if(!ismob(M)) + if(!istype(M, /mob)) to_chat(usr, "This can only be used on instances of type /mob") return if(istype(M, /mob/living/silicon/ai)) @@ -1375,7 +1384,7 @@ return var/mob/M = locateUID(href_list["tdome2"]) - if(!ismob(M)) + if(!istype(M, /mob)) to_chat(usr, "This can only be used on instances of type /mob") return if(istype(M, /mob/living/silicon/ai)) @@ -1405,7 +1414,7 @@ return var/mob/M = locateUID(href_list["tdomeadmin"]) - if(!ismob(M)) + if(!istype(M, /mob)) to_chat(usr, "This can only be used on instances of type /mob") return if(istype(M, /mob/living/silicon/ai)) @@ -1427,7 +1436,7 @@ return var/mob/M = locateUID(href_list["tdomeobserve"]) - if(!ismob(M)) + if(!istype(M, /mob)) to_chat(usr, "This can only be used on instances of type /mob") return if(istype(M, /mob/living/silicon/ai)) @@ -1461,7 +1470,7 @@ return var/mob/M = locateUID(href_list["aroomwarp"]) - if(!ismob(M)) + if(!istype(M, /mob)) to_chat(usr, "This can only be used on instances of type /mob") return if(istype(M, /mob/living/silicon/ai)) @@ -1599,6 +1608,11 @@ else if(href_list["adminplayeropts"]) var/mob/M = locateUID(href_list["adminplayeropts"]) + + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") + return + show_player_panel(M) else if(href_list["adminplayerobservefollow"]) @@ -1608,6 +1622,11 @@ return C.admin_ghost() var/mob/M = locateUID(href_list["adminplayerobservefollow"]) + + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") + return + var/mob/dead/observer/A = C.mob sleep(2) A.ManualFollow(M) @@ -1681,6 +1700,11 @@ else if(href_list["adminmoreinfo"]) var/mob/M = locateUID(href_list["adminmoreinfo"]) + + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") + return + admin_mob_info(M) else if(href_list["adminspawncookie"]) @@ -1750,6 +1774,11 @@ return var/mob/M = locateUID(href_list["CentcommReply"]) + + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") + return + usr.client.admin_headset_message(M, "Centcomm") else if(href_list["SyndicateReply"]) @@ -1757,6 +1786,11 @@ return var/mob/M = locateUID(href_list["SyndicateReply"]) + + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") + return + usr.client.admin_headset_message(M, "Syndicate") else if(href_list["HeadsetMessage"]) @@ -1764,6 +1798,11 @@ return var/mob/M = locateUID(href_list["HeadsetMessage"]) + + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") + return + usr.client.admin_headset_message(M) else if(href_list["EvilFax"]) @@ -2401,8 +2440,8 @@ if(!check_rights(R_ADMIN)) return var/mob/M = locateUID(href_list["getplaytimewindow"]) - if(!M) - to_chat(usr, "ERROR: Mob not found.") + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") return cmd_mentor_show_exp_panel(M.client) @@ -2410,6 +2449,9 @@ if(!check_rights(R_ADMIN)) return var/mob/M = locateUID(href_list["jumpto"]) + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") + return usr.client.jumptomob(M) else if(href_list["getmob"]) @@ -2417,24 +2459,36 @@ if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes") return var/mob/M = locateUID(href_list["getmob"]) + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") + return usr.client.Getmob(M) else if(href_list["sendmob"]) if(!check_rights(R_ADMIN)) return var/mob/M = locateUID(href_list["sendmob"]) + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") + return usr.client.sendmob(M) else if(href_list["narrateto"]) if(!check_rights(R_ADMIN)) return var/mob/M = locateUID(href_list["narrateto"]) + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") + return usr.client.cmd_admin_direct_narrate(M) else if(href_list["subtlemessage"]) if(!check_rights(R_ADMIN)) return var/mob/M = locateUID(href_list["subtlemessage"]) + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") + return usr.client.cmd_admin_subtle_message(M) else if(href_list["traitor"]) @@ -2445,7 +2499,7 @@ return var/mob/M = locateUID(href_list["traitor"]) - if(!ismob(M)) + if(!istype(M, /mob)) to_chat(usr, "This can only be used on instances of type /mob.") return show_traitor_panel(M) From 3e6aa5330e3d702b6e5bc19a03affc24f35549f5 Mon Sep 17 00:00:00 2001 From: mochi Date: Fri, 19 Jun 2020 23:32:11 +0200 Subject: [PATCH 6/8] Span admin topic errors, asay datum refactor, verb change --- code/modules/admin/topic.dm | 155 ++++++++++++++------------- code/modules/admin/verbs/adminsay.dm | 7 +- code/modules/admin/verbs/asays.dm | 16 ++- 3 files changed, 90 insertions(+), 88 deletions(-) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index b51686431f8..087f2cf3b37 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -114,39 +114,39 @@ switch(bantype) if(BANTYPE_PERMA) if(!banckey || !banreason) - to_chat(usr, "Not enough parameters (Requires ckey and reason)") + to_chat("Not enough parameters (Requires ckey and reason)") return banduration = null banjob = null if(BANTYPE_TEMP) if(!banckey || !banreason || !banduration) - to_chat(usr, "Not enough parameters (Requires ckey, reason and duration)") + to_chat("Not enough parameters (Requires ckey, reason and duration)") return banjob = null if(BANTYPE_JOB_PERMA) if(!banckey || !banreason || !banjob) - to_chat(usr, "Not enough parameters (Requires ckey, reason and job)") + to_chat("Not enough parameters (Requires ckey, reason and job)") return banduration = null if(BANTYPE_JOB_TEMP) if(!banckey || !banreason || !banjob || !banduration) - to_chat(usr, "Not enough parameters (Requires ckey, reason and job)") + to_chat("Not enough parameters (Requires ckey, reason and job)") return if(BANTYPE_APPEARANCE) if(!banckey || !banreason) - to_chat(usr, "Not enough parameters (Requires ckey and reason)") + to_chat("Not enough parameters (Requires ckey and reason)") return banduration = null banjob = null if(BANTYPE_ADMIN_PERMA) if(!banckey || !banreason) - to_chat(usr, "Not enough parameters (Requires ckey and reason)") + to_chat("Not enough parameters (Requires ckey and reason)") return banduration = null banjob = null if(BANTYPE_ADMIN_TEMP) if(!banckey || !banreason || !banduration) - to_chat(usr, "Not enough parameters (Requires ckey, reason and duration)") + to_chat("Not enough parameters (Requires ckey, reason and duration)") return banjob = null @@ -325,7 +325,7 @@ var/mob/M = locateUID(href_list["mob"]) if(!istype(M, /mob)) - to_chat(usr, "This can only be used on instances of type /mob") + to_chat(usr, "This can only be used on instances of type /mob") return var/delmob = 0 @@ -437,17 +437,17 @@ return var/mob/M = locateUID(href_list["appearanceban"]) if(!istype(M, /mob)) - to_chat(usr, "This can only be used on instances of type /mob") + to_chat(usr, "This can only be used on instances of type /mob") return if(!M.ckey) //sanity - to_chat(usr, "This mob has no ckey") + to_chat(usr, "This mob has no ckey") return var/ban_ckey_param = href_list["dbbanaddckey"] var/banreason = appearance_isbanned(M) if(banreason) /* if(!config.ban_legacy_system) - to_chat(usr, "Unfortunately, database based unbanning cannot be done through this panel") + to_chat("Unfortunately, database based unbanning cannot be done through this panel") DB_ban_panel(M.ckey) return */ switch(alert("Reason: '[banreason]' Remove appearance ban?","Please Confirm","Yes","No")) @@ -488,14 +488,14 @@ var/mob/M = locateUID(href_list["jobban2"]) if(!istype(M, /mob)) - to_chat(usr, "This can only be used on instances of type /mob") + to_chat(usr, "This can only be used on instances of type /mob") return if(!M.ckey) //sanity - to_chat(usr, "This mob has no ckey") + to_chat(usr, "This mob has no ckey") return if(!SSjobs) - to_chat(usr, "SSjobs has not been setup!") + to_chat("SSjobs has not been setup!") return var/dat = "" @@ -736,7 +736,7 @@ var/mob/M = locateUID(href_list["jobban4"]) if(!istype(M, /mob)) - to_chat(usr, "This can only be used on instances of type /mob") + to_chat(usr, "This can only be used on instances of type /mob") return if(M != usr) //we can jobban ourselves @@ -747,7 +747,7 @@ var/ban_ckey_param = href_list["dbbanaddckey"] if(!SSjobs) - to_chat(usr, "SSjobs has not been setup!") + to_chat("SSjobs has not been setup!") return //get jobs for department if specified, otherwise just returnt he one job in a list. @@ -873,7 +873,7 @@ //all jobs in joblist are banned already OR we didn't give a reason (implying they shouldn't be banned) if(joblist.len) //at least 1 banned job exists in joblist so we have stuff to unban. if(!config.ban_legacy_system) - to_chat(usr, "Unfortunately, database based unbanning cannot be done through this panel") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return if(alert(usr, "Confirm make monkey?",, "Yes", "No") != "Yes") return @@ -1169,7 +1169,7 @@ var/mob/living/carbon/human/H = locateUID(href_list["corgione"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return if(alert(usr, "Confirm make corgi?",, "Yes", "No") != "Yes") @@ -1184,7 +1184,7 @@ var/mob/living/carbon/human/H = locateUID(href_list["makePAI"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return if(alert(usr, "Confirm make pai?",, "Yes", "No") != "Yes") return @@ -1208,7 +1208,7 @@ var/mob/M = locateUID(href_list["forcespeech"]) if(!istype(M, /mob)) - to_chat(usr, "this can only be used on instances of type /mob") + to_chat(usr, "this can only be used on instances of type /mob") return var/speech = input("What will [key_name(M)] say?.", "Force speech", "")// Don't need to sanitize, since it does that in say(), we also trust our admins. @@ -1226,10 +1226,10 @@ var/mob/M = locateUID(href_list["sendtoprison"]) if(!istype(M, /mob)) - to_chat(usr, "This can only be used on instances of type /mob") + to_chat(usr, "This can only be used on instances of type /mob") return if(istype(M, /mob/living/silicon/ai)) - to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") + to_chat(usr, "This can only be used on instances of type /mob") return if(!M.client) @@ -1326,7 +1326,7 @@ var/mob/M = locateUID(href_list["userandomname"]) if(!istype(M, /mob)) - to_chat(usr, "This can only be used on instances of type /mob") + to_chat(usr, "This can only be used on instances of type /mob") return if(!M.client) @@ -1355,10 +1355,10 @@ var/mob/M = locateUID(href_list["tdome1"]) if(!istype(M, /mob)) - to_chat(usr, "This can only be used on instances of type /mob") + to_chat(usr, "This can only be used on instances of type /mob") return if(istype(M, /mob/living/silicon/ai)) - to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") + to_chat(usr, "This can only be used on instances of type /mob") return if(istype(M, /mob/living/silicon/ai)) - to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") + to_chat(usr, "This can only be used on instances of type /mob") return if(istype(M, /mob/living/silicon/ai)) - to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") + to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") return M.Paralyse(5) @@ -1437,10 +1437,10 @@ var/mob/M = locateUID(href_list["tdomeobserve"]) if(!istype(M, /mob)) - to_chat(usr, "This can only be used on instances of type /mob") + to_chat(usr, "This can only be used on instances of type /mob") return if(istype(M, /mob/living/silicon/ai)) - to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") + to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") return for(var/obj/item/I in M) @@ -1471,10 +1471,10 @@ var/mob/M = locateUID(href_list["aroomwarp"]) if(!istype(M, /mob)) - to_chat(usr, "This can only be used on instances of type /mob") + to_chat(usr, "This can only be used on instances of type /mob") return if(istype(M, /mob/living/silicon/ai)) - to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") + to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") return M.Paralyse(5) @@ -1491,7 +1491,7 @@ var/mob/living/L = locateUID(href_list["revive"]) if(!istype(L)) - to_chat(usr, "This can only be used on instances of type /mob/living") + to_chat(usr, "This can only be used on instances of type /mob/living") return L.revive() @@ -1503,7 +1503,7 @@ var/mob/living/carbon/human/H = locateUID(href_list["makeai"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return if(alert(usr, "Confirm make ai?",, "Yes", "No") != "Yes") @@ -1519,7 +1519,7 @@ var/mob/living/carbon/human/H = locateUID(href_list["makealien"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return if(alert(usr, "Confirm make alien?",, "Yes", "No") != "Yes") return @@ -1531,7 +1531,7 @@ var/mob/living/carbon/human/H = locateUID(href_list["makeslime"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return if(alert(usr, "Confirm make slime?",, "Yes", "No") != "Yes") return @@ -1543,7 +1543,7 @@ var/mob/living/carbon/human/H = locateUID(href_list["makesuper"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return if(alert(usr, "Confirm make superhero?",, "Yes", "No") != "Yes") @@ -1556,7 +1556,7 @@ var/mob/living/carbon/human/H = locateUID(href_list["makerobot"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return if(alert(usr, "Confirm make robot?",, "Yes", "No") != "Yes") return @@ -1568,7 +1568,7 @@ var/mob/M = locateUID(href_list["makeanimal"]) if(istype(M, /mob/new_player)) - to_chat(usr, "This cannot be used on instances of type /mob/new_player") + to_chat(usr, "This cannot be used on instances of type /mob/new_player") return if(alert(usr, "Confirm make animal?",, "Yes", "No") != "Yes") return @@ -1581,7 +1581,8 @@ var/mob/dead/observer/G = locateUID(href_list["incarn_ghost"]) if(!istype(G)) - to_chat(usr, "This will only work on /mob/dead/observer") + to_chat(usr, "This will only work on /mob/dead/observer") + return var/posttransformoutfit = usr.client.robust_dress_shop() @@ -1598,7 +1599,7 @@ var/mob/living/carbon/human/H = locateUID(href_list["togmutate"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return var/block=text2num(href_list["block"]) //testing("togmutate([href_list["block"]] -> [block])") @@ -1610,7 +1611,7 @@ var/mob/M = locateUID(href_list["adminplayeropts"]) if(!istype(M, /mob)) - to_chat(usr, "This can only be used on instances of type /mob") + to_chat(usr, "This can only be used on instances of type /mob") return show_player_panel(M) @@ -1624,7 +1625,7 @@ var/mob/M = locateUID(href_list["adminplayerobservefollow"]) if(!istype(M, /mob)) - to_chat(usr, "This can only be used on instances of type /mob") + to_chat(usr, "This can only be used on instances of type /mob") return var/mob/dead/observer/A = C.mob @@ -1702,7 +1703,7 @@ var/mob/M = locateUID(href_list["adminmoreinfo"]) if(!istype(M, /mob)) - to_chat(usr, "This can only be used on instances of type /mob") + to_chat(usr, "This can only be used on instances of type /mob") return admin_mob_info(M) @@ -1712,7 +1713,7 @@ var/mob/living/carbon/human/H = locateUID(href_list["adminspawncookie"]) if(!ishuman(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return H.equip_to_slot_or_del( new /obj/item/reagent_containers/food/snacks/cookie(H), slot_l_hand ) @@ -1736,7 +1737,7 @@ var/mob/living/M = locateUID(href_list["BlueSpaceArtillery"]) if(!isliving(M)) - to_chat(usr, "This can only be used on instances of type /mob/living") + to_chat(usr, "This can only be used on instances of type /mob/living") return if(alert(owner, "Are you sure you wish to hit [key_name(M)] with Bluespace Artillery?", "Confirm Firing?" , "Yes" , "No") != "Yes") @@ -1776,7 +1777,7 @@ var/mob/M = locateUID(href_list["CentcommReply"]) if(!istype(M, /mob)) - to_chat(usr, "This can only be used on instances of type /mob") + to_chat(usr, "This can only be used on instances of type /mob") return usr.client.admin_headset_message(M, "Centcomm") @@ -1788,7 +1789,7 @@ var/mob/M = locateUID(href_list["SyndicateReply"]) if(!istype(M, /mob)) - to_chat(usr, "This can only be used on instances of type /mob") + to_chat(usr, "This can only be used on instances of type /mob") return usr.client.admin_headset_message(M, "Syndicate") @@ -1800,7 +1801,7 @@ var/mob/M = locateUID(href_list["HeadsetMessage"]) if(!istype(M, /mob)) - to_chat(usr, "This can only be used on instances of type /mob") + to_chat(usr, "This can only be used on instances of type /mob") return usr.client.admin_headset_message(M) @@ -1810,7 +1811,7 @@ return var/mob/living/carbon/human/H = locateUID(href_list["EvilFax"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return var/etypes = list("Borgification", "Corgification", "Death By Fire", "Total Brain Death", "Honk Tumor", "Cluwne", "Demote", "Demote with Bot", "Revoke Fax Access", "Angry Fax Machine") var/eviltype = input(src.owner, "Which type of evil fax do you wish to send [H]?","Its good to be baaaad...", "") as null|anything in etypes @@ -1858,7 +1859,7 @@ return var/mob/living/M = locateUID(href_list["Bless"]) if(!istype(M)) - to_chat(usr, "This can only be used on instances of type /mob/living") + to_chat(usr, "This can only be used on instances of type /mob/living") return var/btypes = list("To Arrivals", "Moderate Heal") var/mob/living/carbon/human/H @@ -1978,7 +1979,7 @@ var/mob/living/M = locateUID(href_list["Smite"]) var/mob/living/carbon/human/H if(!istype(M)) - to_chat(usr, "This can only be used on instances of type /mob/living") + to_chat(usr, "This can only be used on instances of type /mob/living") return var/ptypes = list("Lightning bolt", "Fire Death", "Gib") if(ishuman(M)) @@ -2118,10 +2119,10 @@ return var/mob/living/carbon/human/H = locateUID(href_list["cryossd"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return if(!href_list["cryoafk"] && !isLivingSSD(H)) - to_chat(usr, "This can only be used on living, SSD players.") + to_chat(usr, "This can only be used on living, SSD players.") return if(istype(H.loc, /obj/machinery/cryopod)) var/obj/machinery/cryopod/P = H.loc @@ -2141,7 +2142,7 @@ return var/mob/living/carbon/human/H = locateUID(href_list["FaxReplyTemplate"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return var/obj/item/paper/P = new /obj/item/paper(null) var/obj/machinery/photocopier/faxmachine/fax = locate(href_list["originfax"]) @@ -2195,10 +2196,10 @@ else if(href_list["HONKReply"]) var/mob/living/carbon/human/H = locateUID(href_list["HONKReply"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return if(!istype(H.l_ear, /obj/item/radio/headset) && !istype(H.r_ear, /obj/item/radio/headset)) - to_chat(usr, "The person you are trying to contact is not wearing a headset") + to_chat("The person you are trying to contact is not wearing a headset") return var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via [H.p_their()] headset.","Outgoing message from HONKplanet", "") @@ -2215,13 +2216,13 @@ if(alert(src.owner, "Accept or Deny ERT request?", "CentComm Response", "Accept", "Deny") == "Deny") var/mob/living/carbon/human/H = locateUID(href_list["ErtReply"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return if(H.stat != 0) - to_chat(usr, "The person you are trying to contact is not conscious.") + to_chat("The person you are trying to contact is not conscious.") return if(!istype(H.l_ear, /obj/item/radio/headset) && !istype(H.r_ear, /obj/item/radio/headset)) - to_chat(usr, "The person you are trying to contact is not wearing a headset") + to_chat("The person you are trying to contact is not wearing a headset") return var/input = input(src.owner, "Please enter a reason for denying [key_name(H)]'s ERT request.","Outgoing message from CentComm", "") @@ -2441,7 +2442,7 @@ return var/mob/M = locateUID(href_list["getplaytimewindow"]) if(!istype(M, /mob)) - to_chat(usr, "This can only be used on instances of type /mob") + to_chat(usr, "This can only be used on instances of type /mob") return cmd_mentor_show_exp_panel(M.client) @@ -2450,7 +2451,7 @@ var/mob/M = locateUID(href_list["jumpto"]) if(!istype(M, /mob)) - to_chat(usr, "This can only be used on instances of type /mob") + to_chat(usr, "This can only be used on instances of type /mob") return usr.client.jumptomob(M) @@ -2460,7 +2461,7 @@ if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes") return var/mob/M = locateUID(href_list["getmob"]) if(!istype(M, /mob)) - to_chat(usr, "This can only be used on instances of type /mob") + to_chat(usr, "This can only be used on instances of type /mob") return usr.client.Getmob(M) @@ -2469,7 +2470,7 @@ var/mob/M = locateUID(href_list["sendmob"]) if(!istype(M, /mob)) - to_chat(usr, "This can only be used on instances of type /mob") + to_chat(usr, "This can only be used on instances of type /mob") return usr.client.sendmob(M) @@ -2478,7 +2479,7 @@ var/mob/M = locateUID(href_list["narrateto"]) if(!istype(M, /mob)) - to_chat(usr, "This can only be used on instances of type /mob") + to_chat(usr, "This can only be used on instances of type /mob") return usr.client.cmd_admin_direct_narrate(M) @@ -2487,7 +2488,7 @@ var/mob/M = locateUID(href_list["subtlemessage"]) if(!istype(M, /mob)) - to_chat(usr, "This can only be used on instances of type /mob") + to_chat(usr, "This can only be used on instances of type /mob") return usr.client.cmd_admin_subtle_message(M) @@ -2500,7 +2501,7 @@ var/mob/M = locateUID(href_list["traitor"]) if(!istype(M, /mob)) - to_chat(usr, "This can only be used on instances of type /mob.") + to_chat(usr, "This can only be used on instances of type /mob.") return show_traitor_panel(M) @@ -2569,7 +2570,7 @@ switch(where) if("inhand") if(!iscarbon(usr) && !isrobot(usr)) - to_chat(usr, "Can only spawn in hand when you're a carbon mob or cyborg.") + to_chat("Can only spawn in hand when you're a carbon mob or cyborg.") where = "onfloor" target = usr @@ -2581,10 +2582,10 @@ target = locate(loc.x + X,loc.y + Y,loc.z + Z) if("inmarked") if(!marked_datum) - to_chat(usr, "You don't have any object marked. Abandoning spawn.") + to_chat("You don't have any object marked. Abandoning spawn.") return else if(!istype(marked_datum,/atom)) - to_chat(usr, "The object you have marked cannot be used as a target. Target must be of type /atom. Abandoning spawn.") + to_chat("The object you have marked cannot be used as a target. Target must be of type /atom. Abandoning spawn.") return else target = marked_datum @@ -2649,7 +2650,7 @@ message_admins("[key_name_admin(usr)] has kicked [afkonly ? "all AFK" : "all"] clients from the lobby. [length(listkicked)] clients kicked: [strkicked ? strkicked : "--"]") log_admin("[key_name(usr)] has kicked [afkonly ? "all AFK" : "all"] clients from the lobby. [length(listkicked)] clients kicked: [strkicked ? strkicked : "--"]") else - to_chat(usr, "You may only use this when the game is running.") + to_chat("You may only use this when the game is running.") else if(href_list["memoeditlist"]) if(!check_rights(R_SERVER)) return @@ -2727,7 +2728,7 @@ feedback_add_details("admin_secrets_fun_used","TriAI") if("gravity") if(!(SSticker && SSticker.mode)) - to_chat(usr, "Please wait until the game starts! Not sure how it will work otherwise.") + to_chat("Please wait until the game starts! Not sure how it will work otherwise.") return GLOB.gravity_is_on = !GLOB.gravity_is_on for(var/area/A in world) @@ -3546,12 +3547,12 @@ message_admins("[key_name_admin(mob)] is sending a ([dresscode]) to [killthem ? "assassinate" : "protect"] [key_name_admin(H)]...") var/list/candidates = pollCandidates("Play as a [killthem ? "murderous" : "protective"] [dresscode]?", ROLE_TRAITOR, 1) if(!candidates.len) - to_chat(usr, "ERROR: Could not create eventmob. No valid candidates.") + to_chat("ERROR: Could not create eventmob. No valid candidates.") return var/mob/C = pick(candidates) var/key_of_hunter = C.key if(!key_of_hunter) - to_chat(usr, "ERROR: Could not create eventmob. Could not pick key.") + to_chat("ERROR: Could not create eventmob. Could not pick key.") return var/datum/mind/hunter_mind = new /datum/mind(key_of_hunter) hunter_mind.active = 1 diff --git a/code/modules/admin/verbs/adminsay.dm b/code/modules/admin/verbs/adminsay.dm index fd7be97fb5c..d67a2fc5d31 100644 --- a/code/modules/admin/verbs/adminsay.dm +++ b/code/modules/admin/verbs/adminsay.dm @@ -7,12 +7,7 @@ msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN)) if(!msg) return - var/datum/asays/asay = new() - asay.ckey = usr.ckey - asay.rank = usr.client.holder.rank - asay.message = msg - asay.time = world.timeofday - + var/datum/asays/asay = new(usr.ckey, usr.client.holder.rank, msg, world.timeofday) GLOB.asays += asay log_adminsay(msg, src) diff --git a/code/modules/admin/verbs/asays.dm b/code/modules/admin/verbs/asays.dm index 10b0fb651a0..b5caf9b9cf0 100644 --- a/code/modules/admin/verbs/asays.dm +++ b/code/modules/admin/verbs/asays.dm @@ -1,13 +1,19 @@ GLOBAL_LIST_EMPTY(asays) /datum/asays - var/ckey = "" - var/rank = "" - var/message = "" - var/time = 0 + var/ckey + var/rank + var/message + var/time + +/datum/asays/New(ckey = "", rank = "", message = "", time = 0) + src.ckey = ckey + src.rank = rank + src.message = message + src.time = time /client/proc/view_asays() - set name = "View Asays" + set name = "Asays" set desc = "View Asays from the current round." set category = "Admin" From 6324a1deda20a7025eac55edc474b981e8bece38 Mon Sep 17 00:00:00 2001 From: mochi Date: Sat, 27 Jun 2020 10:16:41 +0200 Subject: [PATCH 7/8] Fix and clean broken to_chats --- code/modules/admin/topic.dm | 178 ++++++++++++++++++------------------ 1 file changed, 89 insertions(+), 89 deletions(-) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 087f2cf3b37..c3621b14c5a 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -114,39 +114,39 @@ switch(bantype) if(BANTYPE_PERMA) if(!banckey || !banreason) - to_chat("Not enough parameters (Requires ckey and reason)") + to_chat(usr, "Not enough parameters (Requires ckey and reason)") return banduration = null banjob = null if(BANTYPE_TEMP) if(!banckey || !banreason || !banduration) - to_chat("Not enough parameters (Requires ckey, reason and duration)") + to_chat(usr, "Not enough parameters (Requires ckey, reason and duration)") return banjob = null if(BANTYPE_JOB_PERMA) if(!banckey || !banreason || !banjob) - to_chat("Not enough parameters (Requires ckey, reason and job)") + to_chat(usr, "Not enough parameters (Requires ckey, reason and job)") return banduration = null if(BANTYPE_JOB_TEMP) if(!banckey || !banreason || !banjob || !banduration) - to_chat("Not enough parameters (Requires ckey, reason and job)") + to_chat(usr, "Not enough parameters (Requires ckey, reason and job)") return if(BANTYPE_APPEARANCE) if(!banckey || !banreason) - to_chat("Not enough parameters (Requires ckey and reason)") + to_chat(usr, "Not enough parameters (Requires ckey and reason)") return banduration = null banjob = null if(BANTYPE_ADMIN_PERMA) if(!banckey || !banreason) - to_chat("Not enough parameters (Requires ckey and reason)") + to_chat(usr, "Not enough parameters (Requires ckey and reason)") return banduration = null banjob = null if(BANTYPE_ADMIN_TEMP) if(!banckey || !banreason || !banduration) - to_chat("Not enough parameters (Requires ckey, reason and duration)") + to_chat(usr, "Not enough parameters (Requires ckey, reason and duration)") return banjob = null @@ -447,7 +447,7 @@ var/banreason = appearance_isbanned(M) if(banreason) /* if(!config.ban_legacy_system) - to_chat("Unfortunately, database based unbanning cannot be done through this panel") + to_chat(usr, "Unfortunately, database based unbanning cannot be done through this panel") DB_ban_panel(M.ckey) return */ switch(alert("Reason: '[banreason]' Remove appearance ban?","Please Confirm","Yes","No")) @@ -458,7 +458,7 @@ DB_ban_unban(M.ckey, BANTYPE_APPEARANCE) appearance_unban(M) message_admins("[key_name_admin(usr)] removed [key_name_admin(M)]'s appearance ban", 1) - to_chat(M, "[usr.client.ckey] has removed your appearance ban.") + to_chat(M, "[usr.client.ckey] has removed your appearance ban.") else switch(alert("Appearance ban [M.ckey]?",,"Yes","No", "Cancel")) if("Yes") @@ -473,7 +473,7 @@ appearance_fullban(M, "[reason]; By [usr.ckey] on [time2text(world.realtime)]") add_note(M.ckey, "Appearance banned - [reason]", null, usr.ckey, 0) message_admins("[key_name_admin(usr)] appearance banned [key_name_admin(M)]", 1) - to_chat(M, "You have been appearance banned by [usr.client.ckey].") + to_chat(M, "You have been appearance banned by [usr.client.ckey].") to_chat(M, "The reason is: [reason]") to_chat(M, "Appearance ban can be lifted only upon request.") if(config.banappeals) @@ -495,7 +495,7 @@ to_chat(usr, "This mob has no ckey") return if(!SSjobs) - to_chat("SSjobs has not been setup!") + to_chat(usr, "SSjobs has not been setup!") return var/dat = "" @@ -747,7 +747,7 @@ var/ban_ckey_param = href_list["dbbanaddckey"] if(!SSjobs) - to_chat("SSjobs has not been setup!") + to_chat(usr, "SSjobs has not been setup!") return //get jobs for department if specified, otherwise just returnt he one job in a list. @@ -840,7 +840,7 @@ msg += ", [job]" add_note(M.ckey, "Banned from [msg] - [reason]", null, usr.ckey, 0) message_admins("[key_name_admin(usr)] banned [key_name_admin(M)] from [msg] for [mins] minutes", 1) - to_chat(M, "You have been jobbanned by [usr.client.ckey] from: [msg].") + to_chat(M, "You have been jobbanned by [usr.client.ckey] from: [msg].") to_chat(M, "The reason is: [reason]") to_chat(M, "This jobban will be lifted in [mins] minutes.") href_list["jobban2"] = 1 // lets it fall through and refresh @@ -861,7 +861,7 @@ else msg += ", [job]" add_note(M.ckey, "Banned from [msg] - [reason]", null, usr.ckey, 0) message_admins("[key_name_admin(usr)] banned [key_name_admin(M)] from [msg]", 1) - to_chat(M, "You have been jobbanned by [usr.client.ckey] from: [msg].") + to_chat(M, "You have been jobbanned by [usr.client.ckey] from: [msg].") to_chat(M, "The reason is: [reason]") to_chat(M, "Jobban can be lifted only upon request.") href_list["jobban2"] = 1 // lets it fall through and refresh @@ -873,7 +873,7 @@ //all jobs in joblist are banned already OR we didn't give a reason (implying they shouldn't be banned) if(joblist.len) //at least 1 banned job exists in joblist so we have stuff to unban. if(!config.ban_legacy_system) - to_chat(usr, "Unfortunately, database based unbanning cannot be done through this panel") DB_ban_panel(M.ckey) return var/msg @@ -894,7 +894,7 @@ continue if(msg) message_admins("[key_name_admin(usr)] unbanned [key_name_admin(M)] from [msg]", 1) - to_chat(M, "You have been un-jobbanned by [usr.client.ckey] from [msg].") + to_chat(M, "You have been un-jobbanned by [usr.client.ckey] from [msg].") href_list["jobban2"] = 1 // lets it fall through and refresh return 1 return 0 //we didn't do anything! @@ -997,7 +997,7 @@ M = admin_ban_mobsearch(M, ban_ckey_param, usr) AddBan(M.ckey, M.computer_id, reason, usr.ckey, 1, mins) ban_unban_log_save("[usr.client.ckey] has banned [M.ckey]. - Reason: [reason] - This will be removed in [mins] minutes.") - to_chat(M, "You have been banned by [usr.client.ckey].\nReason: [reason].") + to_chat(M, "You have been banned by [usr.client.ckey].\nReason: [reason].") to_chat(M, "This is a temporary ban, it will be removed in [mins] minutes.") feedback_inc("ban_tmp",1) DB_ban_record(BANTYPE_TEMP, M, mins, reason) @@ -1018,7 +1018,7 @@ if(!reason) return AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0, M.lastKnownIP) - to_chat(M, "You have been banned by [usr.client.ckey].\nReason: [reason].") + to_chat(M, "You have been banned by [usr.client.ckey].\nReason: [reason].") to_chat(M, "This ban does not expire automatically and must be appealed.") if(M.client) M.client.link_forum_account(TRUE) @@ -1101,7 +1101,7 @@ if(SSticker && SSticker.mode) return alert(usr, "The game has already started.", null, null, null, null) - var/dat = {"What mode do you wish to play?
"} + var/dat = {"What mode do you wish to play?
"} for(var/mode in config.modes) dat += {"[config.mode_names[mode]]
"} dat += {"Secret
"} @@ -1116,7 +1116,7 @@ return alert(usr, "The game has already started.", null, null, null, null) if(GLOB.master_mode != "secret") return alert(usr, "The game mode has to be secret!", null, null, null, null) - var/dat = {"What game mode do you want to force secret to be? Use this if you want to change the game mode, but want the players to believe it's secret. This will only work if the current game mode is secret.
"} + var/dat = {"What game mode do you want to force secret to be? Use this if you want to change the game mode, but want the players to believe it's secret. This will only work if the current game mode is secret.
"} for(var/mode in config.modes) dat += {"[config.mode_names[mode]]
"} dat += {"Random (default)
"} @@ -1154,7 +1154,7 @@ var/mob/living/carbon/human/H = locateUID(href_list["monkeyone"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return if(alert(usr, "Confirm make monkey?",, "Yes", "No") != "Yes") return @@ -1169,7 +1169,7 @@ var/mob/living/carbon/human/H = locateUID(href_list["corgione"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return if(alert(usr, "Confirm make corgi?",, "Yes", "No") != "Yes") @@ -1184,7 +1184,7 @@ var/mob/living/carbon/human/H = locateUID(href_list["makePAI"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return if(alert(usr, "Confirm make pai?",, "Yes", "No") != "Yes") return @@ -1208,7 +1208,7 @@ var/mob/M = locateUID(href_list["forcespeech"]) if(!istype(M, /mob)) - to_chat(usr, "this can only be used on instances of type /mob") + to_chat(usr, "This can only be used on instances of type /mob") return var/speech = input("What will [key_name(M)] say?.", "Force speech", "")// Don't need to sanitize, since it does that in say(), we also trust our admins. @@ -1229,7 +1229,7 @@ to_chat(usr, "This can only be used on instances of type /mob") return if(istype(M, /mob/living/silicon/ai)) - to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") return var/turf/prison_cell = pick(GLOB.prisonwarp) @@ -1358,7 +1358,7 @@ to_chat(usr, "This can only be used on instances of type /mob") return if(istype(M, /mob/living/silicon/ai)) - to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") return for(var/obj/item/I in M) @@ -1388,7 +1388,7 @@ to_chat(usr, "This can only be used on instances of type /mob") return if(istype(M, /mob/living/silicon/ai)) - to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") return for(var/obj/item/I in M) @@ -1491,7 +1491,7 @@ var/mob/living/L = locateUID(href_list["revive"]) if(!istype(L)) - to_chat(usr, "This can only be used on instances of type /mob/living") + to_chat(usr, "This can only be used on instances of type /mob/living") return L.revive() @@ -1503,7 +1503,7 @@ var/mob/living/carbon/human/H = locateUID(href_list["makeai"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return if(alert(usr, "Confirm make ai?",, "Yes", "No") != "Yes") @@ -1519,7 +1519,7 @@ var/mob/living/carbon/human/H = locateUID(href_list["makealien"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return if(alert(usr, "Confirm make alien?",, "Yes", "No") != "Yes") return @@ -1531,7 +1531,7 @@ var/mob/living/carbon/human/H = locateUID(href_list["makeslime"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return if(alert(usr, "Confirm make slime?",, "Yes", "No") != "Yes") return @@ -1543,7 +1543,7 @@ var/mob/living/carbon/human/H = locateUID(href_list["makesuper"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return if(alert(usr, "Confirm make superhero?",, "Yes", "No") != "Yes") @@ -1556,7 +1556,7 @@ var/mob/living/carbon/human/H = locateUID(href_list["makerobot"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return if(alert(usr, "Confirm make robot?",, "Yes", "No") != "Yes") return @@ -1599,7 +1599,7 @@ var/mob/living/carbon/human/H = locateUID(href_list["togmutate"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return var/block=text2num(href_list["block"]) //testing("togmutate([href_list["block"]] -> [block])") @@ -1676,10 +1676,10 @@ for(var/datum/mind/H in SSticker.mode.cult) if (H.current) - to_chat(H.current, "[SSticker.cultdat.entity_name] murmurs, [input]") + to_chat(H.current, "[SSticker.cultdat.entity_name] murmurs, [input]") for(var/mob/dead/observer/O in GLOB.player_list) - to_chat(O, "[SSticker.cultdat.entity_name] murmurs, [input]") + to_chat(O, "[SSticker.cultdat.entity_name] murmurs, [input]") message_admins("Admin [key_name_admin(usr)] has talked with the Voice of [SSticker.cultdat.entity_name].") log_admin("[key_name(usr)] Voice of [SSticker.cultdat.entity_name]: [input]") @@ -1713,7 +1713,7 @@ var/mob/living/carbon/human/H = locateUID(href_list["adminspawncookie"]) if(!ishuman(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return H.equip_to_slot_or_del( new /obj/item/reagent_containers/food/snacks/cookie(H), slot_l_hand ) @@ -1737,7 +1737,7 @@ var/mob/living/M = locateUID(href_list["BlueSpaceArtillery"]) if(!isliving(M)) - to_chat(usr, "This can only be used on instances of type /mob/living") + to_chat(usr, "This can only be used on instances of type /mob/living") return if(alert(owner, "Are you sure you wish to hit [key_name(M)] with Bluespace Artillery?", "Confirm Firing?" , "Yes" , "No") != "Yes") @@ -1811,7 +1811,7 @@ return var/mob/living/carbon/human/H = locateUID(href_list["EvilFax"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return var/etypes = list("Borgification", "Corgification", "Death By Fire", "Total Brain Death", "Honk Tumor", "Cluwne", "Demote", "Demote with Bot", "Revoke Fax Access", "Angry Fax Machine") var/eviltype = input(src.owner, "Which type of evil fax do you wish to send [H]?","Its good to be baaaad...", "") as null|anything in etypes @@ -1845,12 +1845,12 @@ P.ico = new P.ico += "paper_stamp-[stampvalue]" P.overlays += stampoverlay - P.stamps += "
" + P.stamps += "
" P.update_icon() P.faxmachineid = fax.UID() P.loc = fax.loc // Do not use fax.receivefax(P) here, as it won't preserve the type. Physically teleporting the fax paper is required. if(istype(H) && H.stat == CONSCIOUS && (istype(H.l_ear, /obj/item/radio/headset) || istype(H.r_ear, /obj/item/radio/headset))) - to_chat(H, "Your headset pings, notifying you that a reply to your fax has arrived.") + to_chat(H, "Your headset pings, notifying you that a reply to your fax has arrived.") to_chat(src.owner, "You sent a [eviltype] fax to [H]") log_admin("[key_name(src.owner)] sent [key_name(H)] a [eviltype] fax") message_admins("[key_name_admin(src.owner)] replied to [key_name_admin(H)] with a [eviltype] fax") @@ -1859,7 +1859,7 @@ return var/mob/living/M = locateUID(href_list["Bless"]) if(!istype(M)) - to_chat(usr, "This can only be used on instances of type /mob/living") + to_chat(usr, "This can only be used on instances of type /mob/living") return var/btypes = list("To Arrivals", "Moderate Heal") var/mob/living/carbon/human/H @@ -1979,7 +1979,7 @@ var/mob/living/M = locateUID(href_list["Smite"]) var/mob/living/carbon/human/H if(!istype(M)) - to_chat(usr, "This can only be used on instances of type /mob/living") + to_chat(usr, "This can only be used on instances of type /mob/living") return var/ptypes = list("Lightning bolt", "Fire Death", "Gib") if(ishuman(M)) @@ -2090,7 +2090,7 @@ var/datum/antagonist/traitor/T = new() T.give_objectives = FALSE to_chat(newtraitormind.current, "ATTENTION: It is time to pay your debt to the Syndicate...") - to_chat(newtraitormind.current, "Goal: KILL [H.real_name], currently in [get_area(H.loc)]") + to_chat(newtraitormind.current, "Goal: KILL [H.real_name], currently in [get_area(H.loc)]") newtraitormind.add_antag_datum(T) else to_chat(usr, "ERROR: Unable to find any valid candidate to send after [H].") @@ -2119,7 +2119,7 @@ return var/mob/living/carbon/human/H = locateUID(href_list["cryossd"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return if(!href_list["cryoafk"] && !isLivingSSD(H)) to_chat(usr, "This can only be used on living, SSD players.") @@ -2142,28 +2142,28 @@ return var/mob/living/carbon/human/H = locateUID(href_list["FaxReplyTemplate"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return var/obj/item/paper/P = new /obj/item/paper(null) var/obj/machinery/photocopier/faxmachine/fax = locate(href_list["originfax"]) P.name = "Central Command - paper" var/stypes = list("Handle it yourselves!","Illegible fax","Fax not signed","Not Right Now","You are wasting our time", "Keep up the good work", "ERT Instructions") var/stype = input(src.owner, "Which type of standard reply do you wish to send to [H]?","Choose your paperwork", "") as null|anything in stypes - var/tmsg = "



Nanotrasen Science Station [GLOB.using_map.station_short]


NAS Trurl Communications Department Report


" + var/tmsg = "



Nanotrasen Science Station [GLOB.using_map.station_short]


NAS Trurl Communications Department Report


" if(stype == "Handle it yourselves!") - tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.

Please proceed in accordance with Standard Operating Procedure and/or Space Law. You are fully trained to handle this situation without Central Command intervention.

This is an automatic message." + tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.

Please proceed in accordance with Standard Operating Procedure and/or Space Law. You are fully trained to handle this situation without Central Command intervention.

This is an automatic message." else if(stype == "Illegible fax") - tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.

Your fax's grammar, syntax and/or typography are of a sub-par level and do not allow us to understand the contents of the message.

Please consult your nearest dictionary and/or thesaurus and try again.

This is an automatic message." + tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.

Your fax's grammar, syntax and/or typography are of a sub-par level and do not allow us to understand the contents of the message.

Please consult your nearest dictionary and/or thesaurus and try again.

This is an automatic message." else if(stype == "Fax not signed") - tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.

Your fax has not been correctly signed and, as such, we cannot verify your identity.

Please sign your faxes before sending them so that we may verify your identity.

This is an automatic message." + tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.

Your fax has not been correctly signed and, as such, we cannot verify your identity.

Please sign your faxes before sending them so that we may verify your identity.

This is an automatic message." else if(stype == "Not Right Now") - tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.

Due to pressing concerns of a matter above your current paygrade, we are unable to provide assistance in whatever matter your fax referenced.

This can be either due to a power outage, bureaucratic audit, pest infestation, Ascendance Event, corgi outbreak, or any other situation that would affect the proper functioning of the NAS Trurl.

Please try again later.

This is an automatic message." + tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.

Due to pressing concerns of a matter above your current paygrade, we are unable to provide assistance in whatever matter your fax referenced.

This can be either due to a power outage, bureaucratic audit, pest infestation, Ascendance Event, corgi outbreak, or any other situation that would affect the proper functioning of the NAS Trurl.

Please try again later.

This is an automatic message." else if(stype == "You are wasting our time") - tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.

In the interest of preventing further mismanagement of company resources, please avoid wasting our time with such petty drivel.

Do kindly remember that we expect our workforce to maintain at least a semi-decent level of profesionalism. Do not test our patience.

This is an automatic message." + tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.

In the interest of preventing further mismanagement of company resources, please avoid wasting our time with such petty drivel.

Do kindly remember that we expect our workforce to maintain at least a semi-decent level of profesionalism. Do not test our patience.

This is an automatic message." else if(stype == "Keep up the good work") tmsg += "Greetings, esteemed crewmember. Your fax has been received successfully by NAS Trurl Fax Registration.

We at the NAS Trurl appreciate the good work that you have done here, and sincerely recommend that you continue such a display of dedication to the company.

This is absolutely not an automated message." else if(stype == "ERT Instructions") - tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.

Please utilize the Card Swipers if you wish to call for an ERT.

This is an automated message." + tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.

Please utilize the Card Swipers if you wish to call for an ERT.

This is an automated message." else return tmsg += "
" @@ -2184,11 +2184,11 @@ P.ico = new P.ico += "paper_stamp-[stampvalue]" P.overlays += stampoverlay - P.stamps += "
" + P.stamps += "
" P.update_icon() fax.receivefax(P) if(istype(H) && H.stat == CONSCIOUS && (istype(H.l_ear, /obj/item/radio/headset) || istype(H.r_ear, /obj/item/radio/headset))) - to_chat(H, "Your headset pings, notifying you that a reply to your fax has arrived.") + to_chat(H, "Your headset pings, notifying you that a reply to your fax has arrived.") to_chat(src.owner, "You sent a standard '[stype]' fax to [H]") log_admin("[key_name(src.owner)] sent [key_name(H)] a standard '[stype]' fax") message_admins("[key_name_admin(src.owner)] replied to [key_name_admin(H)] with a standard '[stype]' fax") @@ -2196,10 +2196,10 @@ else if(href_list["HONKReply"]) var/mob/living/carbon/human/H = locateUID(href_list["HONKReply"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return if(!istype(H.l_ear, /obj/item/radio/headset) && !istype(H.r_ear, /obj/item/radio/headset)) - to_chat("The person you are trying to contact is not wearing a headset") + to_chat(usr, "The person you are trying to contact is not wearing a headset") return var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via [H.p_their()] headset.","Outgoing message from HONKplanet", "") @@ -2216,13 +2216,13 @@ if(alert(src.owner, "Accept or Deny ERT request?", "CentComm Response", "Accept", "Deny") == "Deny") var/mob/living/carbon/human/H = locateUID(href_list["ErtReply"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return if(H.stat != 0) - to_chat("The person you are trying to contact is not conscious.") + to_chat(usr, "The person you are trying to contact is not conscious.") return if(!istype(H.l_ear, /obj/item/radio/headset) && !istype(H.r_ear, /obj/item/radio/headset)) - to_chat("The person you are trying to contact is not wearing a headset") + to_chat(usr, "The person you are trying to contact is not wearing a headset") return var/input = input(src.owner, "Please enter a reason for denying [key_name(H)]'s ERT request.","Outgoing message from CentComm", "") @@ -2230,7 +2230,7 @@ GLOB.ert_request_answered = TRUE to_chat(src.owner, "You sent [input] to [H] via a secure channel.") log_admin("[src.owner] denied [key_name(H)]'s ERT request with the message [input].") - to_chat(H, "Incoming priority transmission from Central Command. Message as follows, Your ERT request has been denied for the following reasons: [input].") + to_chat(H, "Incoming priority transmission from Central Command. Message as follows, Your ERT request has been denied for the following reasons: [input].") else src.owner.response_team() @@ -2385,14 +2385,14 @@ P.stamped = new P.stamped += /obj/item/stamp/centcom P.overlays += stampoverlay - P.stamps += "
" + P.stamps += "
" else if(stamptype == "text") if(!P.stamped) P.stamped = new P.stamped += /obj/item/stamp P.overlays += stampoverlay - P.stamps += "
[stampvalue]" + P.stamps += "
[stampvalue]" if(destination != "All Departments") if(!fax.receivefax(P)) @@ -2422,7 +2422,7 @@ if(notify == "Yes") var/mob/living/carbon/human/H = sender if(istype(H) && H.stat == CONSCIOUS && (istype(H.l_ear, /obj/item/radio/headset) || istype(H.r_ear, /obj/item/radio/headset))) - to_chat(sender, "Your headset pings, notifying you that a reply to your fax has arrived.") + to_chat(sender, "Your headset pings, notifying you that a reply to your fax has arrived.") if(sender) log_admin("[key_name(src.owner)] replied to a fax message from [key_name(sender)]: [input]") message_admins("[key_name_admin(src.owner)] replied to a fax message from [key_name_admin(sender)] (VIEW).", 1) @@ -2501,7 +2501,7 @@ var/mob/M = locateUID(href_list["traitor"]) if(!istype(M, /mob)) - to_chat(usr, "This can only be used on instances of type /mob.") + to_chat(usr, "This can only be used on instances of type /mob") return show_traitor_panel(M) @@ -2570,7 +2570,7 @@ switch(where) if("inhand") if(!iscarbon(usr) && !isrobot(usr)) - to_chat("Can only spawn in hand when you're a carbon mob or cyborg.") + to_chat(usr, "Can only spawn in hand when you're a carbon mob or cyborg.") where = "onfloor" target = usr @@ -2582,10 +2582,10 @@ target = locate(loc.x + X,loc.y + Y,loc.z + Z) if("inmarked") if(!marked_datum) - to_chat("You don't have any object marked. Abandoning spawn.") + to_chat(usr, "You don't have any object marked. Abandoning spawn.") return else if(!istype(marked_datum,/atom)) - to_chat("The object you have marked cannot be used as a target. Target must be of type /atom. Abandoning spawn.") + to_chat(usr, "The object you have marked cannot be used as a target. Target must be of type /atom. Abandoning spawn.") return else target = marked_datum @@ -2650,7 +2650,7 @@ message_admins("[key_name_admin(usr)] has kicked [afkonly ? "all AFK" : "all"] clients from the lobby. [length(listkicked)] clients kicked: [strkicked ? strkicked : "--"]") log_admin("[key_name(usr)] has kicked [afkonly ? "all AFK" : "all"] clients from the lobby. [length(listkicked)] clients kicked: [strkicked ? strkicked : "--"]") else - to_chat("You may only use this when the game is running.") + to_chat(usr, "You may only use this when the game is running.") else if(href_list["memoeditlist"]) if(!check_rights(R_SERVER)) return @@ -2728,7 +2728,7 @@ feedback_add_details("admin_secrets_fun_used","TriAI") if("gravity") if(!(SSticker && SSticker.mode)) - to_chat("Please wait until the game starts! Not sure how it will work otherwise.") + to_chat(usr, "Please wait until the game starts! Not sure how it will work otherwise.") return GLOB.gravity_is_on = !GLOB.gravity_is_on for(var/area/A in world) @@ -3064,7 +3064,7 @@ if(usr) log_admin("[key_name(usr)] used secret [href_list["secretsfun"]]") if(ok) - to_chat(world, text("A secret has been activated by []!", usr.key)) + to_chat(world, text("A secret has been activated by []!", usr.key)) else if(href_list["secretsadmin"]) if(!check_rights(R_ADMIN)) return @@ -3072,17 +3072,17 @@ var/ok = 0 switch(href_list["secretsadmin"]) if("list_signalers") - var/dat = "Showing last [length(GLOB.lastsignalers)] signalers.
" + var/dat = "Showing last [length(GLOB.lastsignalers)] signalers.
" for(var/sig in GLOB.lastsignalers) dat += "[sig]
" usr << browse(dat, "window=lastsignalers;size=800x500") if("list_lawchanges") - var/dat = "Showing last [length(GLOB.lawchanges)] law changes.
" + var/dat = "Showing last [length(GLOB.lawchanges)] law changes.
" for(var/sig in GLOB.lawchanges) dat += "[sig]
" usr << browse(dat, "window=lawchanges;size=800x500") if("list_job_debug") - var/dat = "Job Debug info.
" + var/dat = "Job Debug info.
" if(SSjobs) for(var/line in SSjobs.job_debug) dat += "[line]
" @@ -3100,7 +3100,7 @@ alert("The game mode is [SSticker.mode.name]") else alert("For some reason there's a ticker, but not a game mode") if("manifest") - var/dat = "Showing Crew Manifest.
" + var/dat = "Showing Crew Manifest.
" dat += "" for(var/mob/living/carbon/human/H in GLOB.mob_list) if(H.ckey) @@ -3110,7 +3110,7 @@ if("check_antagonist") check_antagonists() if("DNA") - var/dat = "Showing DNA from blood.
" + var/dat = "Showing DNA from blood.
" dat += "
NamePosition
" for(var/mob/living/carbon/human/H in GLOB.mob_list) if(H.dna && H.ckey) @@ -3118,7 +3118,7 @@ dat += "
NameDNABlood Type
" usr << browse(dat, "window=DNA;size=440x410") if("fingerprints") - var/dat = "Showing Fingerprints.
" + var/dat = "Showing Fingerprints.
" dat += "" for(var/mob/living/carbon/human/H in GLOB.mob_list) if(H.ckey) @@ -3152,14 +3152,14 @@ if(usr) log_admin("[key_name(usr)] used secret [href_list["secretsadmin"]]") if(ok) - to_chat(world, text("A secret has been activated by []!", usr.key)) + to_chat(world, text("A secret has been activated by []!", usr.key)) else if(href_list["secretscoder"]) if(!check_rights(R_DEBUG)) return switch(href_list["secretscoder"]) if("spawn_objects") - var/dat = "Admin Log
" + var/dat = "Admin Log
" for(var/l in GLOB.admin_log) dat += "
  • [l]
  • " if(!GLOB.admin_log.len) @@ -3329,27 +3329,27 @@ else if(href_list["ac_censor_channel_author"]) var/datum/feed_channel/FC = locate(href_list["ac_censor_channel_author"]) - if(FC.author != "\[REDACTED\]") + if(FC.author != "\[REDACTED\]") FC.backup_author = FC.author - FC.author = "\[REDACTED\]" + FC.author = "\[REDACTED\]" else FC.author = FC.backup_author src.access_news_network() else if(href_list["ac_censor_channel_story_author"]) var/datum/feed_message/MSG = locate(href_list["ac_censor_channel_story_author"]) - if(MSG.author != "\[REDACTED\]") + if(MSG.author != "\[REDACTED\]") MSG.backup_author = MSG.author - MSG.author = "\[REDACTED\]" + MSG.author = "\[REDACTED\]" else MSG.author = MSG.backup_author src.access_news_network() else if(href_list["ac_censor_channel_story_body"]) var/datum/feed_message/MSG = locate(href_list["ac_censor_channel_story_body"]) - if(MSG.body != "\[REDACTED\]") + if(MSG.body != "\[REDACTED\]") MSG.backup_body = MSG.body - MSG.body = "\[REDACTED\]" + MSG.body = "\[REDACTED\]" else MSG.body = MSG.backup_body src.access_news_network() @@ -3547,12 +3547,12 @@ message_admins("[key_name_admin(mob)] is sending a ([dresscode]) to [killthem ? "assassinate" : "protect"] [key_name_admin(H)]...") var/list/candidates = pollCandidates("Play as a [killthem ? "murderous" : "protective"] [dresscode]?", ROLE_TRAITOR, 1) if(!candidates.len) - to_chat("ERROR: Could not create eventmob. No valid candidates.") + to_chat(usr, "ERROR: Could not create eventmob. No valid candidates.") return var/mob/C = pick(candidates) var/key_of_hunter = C.key if(!key_of_hunter) - to_chat("ERROR: Could not create eventmob. Could not pick key.") + to_chat(usr, "ERROR: Could not create eventmob. Could not pick key.") return var/datum/mind/hunter_mind = new /datum/mind(key_of_hunter) hunter_mind.active = 1 @@ -3583,9 +3583,9 @@ hunter_mind.objectives += protect_objective SSticker.mode.traitors |= hunter_mob.mind to_chat(hunter_mob, "ATTENTION: You are now on a mission!") - to_chat(hunter_mob, "Goal: [killthem ? "MURDER" : "PROTECT"] [H.real_name], currently in [get_area(H.loc)]. "); + to_chat(hunter_mob, "Goal: [killthem ? "MURDER" : "PROTECT"] [H.real_name], currently in [get_area(H.loc)]."); if(killthem) - to_chat(hunter_mob, "If you kill [H.p_them()], [H.p_they()] cannot be revived."); + to_chat(hunter_mob, "If you kill [H.p_them()], [H.p_they()] cannot be revived."); hunter_mob.mind.special_role = SPECIAL_ROLE_TRAITOR var/datum/atom_hud/antag/tatorhud = GLOB.huds[ANTAG_HUD_TRAITOR] tatorhud.join_hud(hunter_mob) From 9db7f630821fa7eaaa0d2996e8bf637d3f8bfd00 Mon Sep 17 00:00:00 2001 From: mochi Date: Mon, 10 Aug 2020 09:31:17 +0200 Subject: [PATCH 8/8] Refreshing, adjust column widths --- code/modules/admin/topic.dm | 6 ++++++ code/modules/admin/verbs/asays.dm | 25 +++++++++++++------------ 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index f48da567546..a8ad22ef3df 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1350,6 +1350,12 @@ M.client.prefs.real_name = random_name M.client.prefs.save_character(M.client) + else if(href_list["asays"]) + if(!check_rights(R_ADMIN)) + return + + usr.client.view_asays() + else if(href_list["tdome1"]) if(!check_rights(R_SERVER|R_EVENT)) return diff --git a/code/modules/admin/verbs/asays.dm b/code/modules/admin/verbs/asays.dm index b5caf9b9cf0..e713d2b1bcc 100644 --- a/code/modules/admin/verbs/asays.dm +++ b/code/modules/admin/verbs/asays.dm @@ -20,8 +20,8 @@ GLOBAL_LIST_EMPTY(asays) if(!check_rights(R_ADMIN)) return - var/output = {" - -
    NameFingerprints
    - "} + Refresh +
    + "}) // Header & body start output += {" - - - + + + "} - for (var/datum/asays/A in GLOB.asays) + for(var/datum/asays/A in GLOB.asays) var/timestr = time2text(A.time, "hh:mm:ss") output += {" - - - + + + "} @@ -65,5 +66,5 @@ GLOBAL_LIST_EMPTY(asays)
    TimeCkeyMessageTimeCkeyMessage
    [timestr][A.ckey] ([A.rank])[A.message][timestr][A.ckey] ([A.rank])[A.message]
    "} var/datum/browser/popup = new(src, "asays", "
    Current Round Asays
    ", 1200, 825) - popup.set_content(output) + popup.set_content(output.Join()) popup.open(0)