From cdbc13d5fdfa66f382511f7c66a3e7154af597c4 Mon Sep 17 00:00:00 2001 From: Farie82 Date: Sat, 20 Feb 2021 11:58:25 +0100 Subject: [PATCH] Makes JMP usable by people other than admins if they are already a ghost (#15195) Co-authored-by: joep van der velden <15887760+farie82@users.noreply.github.com> --- code/modules/admin/topic.dm | 8 +++++--- code/modules/admin/verbs/adminjump.dm | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 5347a55135e..faaf2fa9ed9 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1875,14 +1875,16 @@ log_admin("Admin [key_name_admin(usr)] has unlocked the Cult's ability to summon Nar'Sie.") else if(href_list["adminplayerobservecoodjump"]) - if(!check_rights(R_ADMIN)) return + var/client/C = usr.client + if(!isobserver(usr)) + if(!check_rights(R_ADMIN)) // Need to be admin to aghost + return + C.admin_ghost() var/x = text2num(href_list["X"]) var/y = text2num(href_list["Y"]) var/z = text2num(href_list["Z"]) - var/client/C = usr.client - if(!isobserver(usr)) C.admin_ghost() sleep(2) C.jumptocoord(x,y,z) diff --git a/code/modules/admin/verbs/adminjump.dm b/code/modules/admin/verbs/adminjump.dm index 7fe4438322a..00db28c83e5 100644 --- a/code/modules/admin/verbs/adminjump.dm +++ b/code/modules/admin/verbs/adminjump.dm @@ -75,7 +75,7 @@ set category = "Admin" set name = "Jump to Coordinate" - if(!check_rights(R_ADMIN)) + if(!isobserver(usr) && !check_rights(R_ADMIN)) // Only admins can jump without being a ghost return var/turf/T = locate(tx, ty, tz)