diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 85a6dc05de..dc3c696cf3 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1522,23 +1522,63 @@ P.adminbrowse() else if(href_list["jumpto"]) - if(!check_rights(R_ADMIN|R_EVENT|R_MOD)) return + if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT)) + return + if(!config.allow_admin_jump) + tgui_alert_async(usr, "Admin jumping disabled") + return var/mob/M = locate(href_list["jumpto"]) - usr.client.jumptomob(M) + if(!M) + return + + var/turf/T = get_turf(M) + if(isturf(T)) + usr.on_mob_jump() + usr.forceMove(T) + feedback_add_details("admin_verb","JM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + log_and_message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]") + else + to_chat(usr, "This mob is not located in the game world.") else if(href_list["getmob"]) - if(!check_rights(R_ADMIN|R_EVENT|R_FUN)) return + if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT)) + return + if(!config.allow_admin_jump) + tgui_alert_async(usr, "Admin jumping disabled") + return + if(tgui_alert(usr, "Confirm?", "Message", list("Yes", "No")) != "Yes") + return - if(tgui_alert(usr, "Confirm?", "Message", list("Yes", "No")) != "Yes") return var/mob/M = locate(href_list["getmob"]) - usr.client.Getmob(M) + if(!M) + return + M.on_mob_jump() + M.forceMove(get_turf(usr)) + var/msg = "[key_name_admin(usr)] jumped [key_name_admin(M)] to them" + log_and_message_admins(msg) + admin_ticket_log(M, msg) + feedback_add_details("admin_verb","GM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! else if(href_list["sendmob"]) - if(!check_rights(R_ADMIN|R_EVENT|R_FUN)) return + if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT)) + return + if(!config.allow_admin_jump) + tgui_alert_async(usr, "Admin jumping disabled") + return var/mob/M = locate(href_list["sendmob"]) - usr.client.sendmob(M) + if(!M) + return + var/area/A = tgui_input_list(usr, "Pick an area:", "Send Mob", return_sorted_areas()) + if(!A) + return + M.on_mob_jump() + M.forceMove(pick(get_area_turfs(A))) + var/msg = "[key_name_admin(usr)] teleported [ADMIN_LOOKUPFLW(M)]" + log_and_message_admins(msg) + admin_ticket_log(M, msg) + feedback_add_details("admin_verb","SMOB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! else if(href_list["narrateto"]) if(!check_rights(R_ADMIN|R_EVENT|R_FUN)) return diff --git a/code/modules/admin/verbs/adminjump.dm b/code/modules/admin/verbs/adminjump.dm index 88317c337c..185d911b07 100644 --- a/code/modules/admin/verbs/adminjump.dm +++ b/code/modules/admin/verbs/adminjump.dm @@ -114,14 +114,15 @@ set category = "Admin" set name = "Get Mob" set desc = "Mob to teleport" + if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT)) return if(config.allow_admin_jump) var/mob/M = tgui_input_list(usr, "Pick a mob:", "Get Mob", mob_list) if(!M) return - log_admin("[key_name(usr)] jumped to [key_name(M)]") - var/msg = "[key_name_admin(usr)] jumped to [key_name_admin(M)]" + log_admin("[key_name(usr)] jumped [key_name(M)] to them") + var/msg = "[key_name_admin(usr)] jumped [key_name_admin(M)] to them" message_admins(msg) admin_ticket_log(M, msg) M.on_mob_jump() diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index 323c83d82b..fb267e3923 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -553,3 +553,15 @@ window_flash(src) src << browse(message,"window=dropmessage;size=480x360;can_close=1") qdel(src) + +/// Keydown event in a tgui window this client has open. Has keycode passed to it. +/client/verb/TguiKeyDown(keycode as text) + set name = "TguiKeyDown" + set hidden = TRUE + return // stub + +/// Keyup event in a tgui window this client has open. Has keycode passed to it. +/client/verb/TguiKeyUp(keycode as text) // Doesn't seem to currently fire? + set name = "TguiKeyUp" + set hidden = TRUE + return // stub diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 2a3e181913..4ed881f65c 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -425,8 +425,11 @@ to_chat(usr, "There isn't enough space left on \the [src] to write anything.") return - var/t = sanitize(input(usr, "Enter what you want to write:", "Write", null, null) as message, MAX_PAPER_MESSAGE_LEN, extra = 0) - + var/raw = input(usr, "Enter what you want to write:", "Write") as null|message + if(!raw) + return + + var/t = sanitize(raw, MAX_PAPER_MESSAGE_LEN, extra = 0) if(!t) return