mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 11:13:16 +00:00
Fixes #9753.
Being admin jumped or jumping to another location now cancels ghost tracking. Also adds proper permission checks.
This commit is contained in:
@@ -1,12 +1,19 @@
|
|||||||
|
/mob/proc/on_mob_jump()
|
||||||
|
return
|
||||||
|
|
||||||
|
/mob/dead/observer/on_mob_jump()
|
||||||
|
following = null
|
||||||
|
|
||||||
/client/proc/Jump(var/area/A in return_sorted_areas())
|
/client/proc/Jump(var/area/A in return_sorted_areas())
|
||||||
set name = "Jump to Area"
|
set name = "Jump to Area"
|
||||||
set desc = "Area to jump to"
|
set desc = "Area to jump to"
|
||||||
set category = "Admin"
|
set category = "Admin"
|
||||||
if(!src.holder)
|
if(!check_rights(R_ADMIN, user = src))
|
||||||
src << "Only administrators may use this command."
|
src << "Only administrators may use this command."
|
||||||
return
|
return
|
||||||
|
|
||||||
if(config.allow_admin_jump)
|
if(config.allow_admin_jump)
|
||||||
|
usr.on_mob_jump()
|
||||||
usr.loc = pick(get_area_turfs(A))
|
usr.loc = pick(get_area_turfs(A))
|
||||||
|
|
||||||
log_admin("[key_name(usr)] jumped to [A]")
|
log_admin("[key_name(usr)] jumped to [A]")
|
||||||
@@ -18,12 +25,13 @@
|
|||||||
/client/proc/jumptoturf(var/turf/T in world)
|
/client/proc/jumptoturf(var/turf/T in world)
|
||||||
set name = "Jump to Turf"
|
set name = "Jump to Turf"
|
||||||
set category = "Admin"
|
set category = "Admin"
|
||||||
if(!src.holder)
|
if(!check_rights(R_ADMIN, user = src))
|
||||||
src << "Only administrators may use this command."
|
src << "Only administrators may use this command."
|
||||||
return
|
return
|
||||||
if(config.allow_admin_jump)
|
if(config.allow_admin_jump)
|
||||||
log_admin("[key_name(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]")
|
log_admin("[key_name(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]")
|
||||||
message_admins("[key_name_admin(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]", 1)
|
message_admins("[key_name_admin(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]", 1)
|
||||||
|
usr.on_mob_jump()
|
||||||
usr.loc = T
|
usr.loc = T
|
||||||
feedback_add_details("admin_verb","JT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
feedback_add_details("admin_verb","JT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||||
else
|
else
|
||||||
@@ -34,7 +42,7 @@
|
|||||||
set category = "Admin"
|
set category = "Admin"
|
||||||
set name = "Jump to Mob"
|
set name = "Jump to Mob"
|
||||||
|
|
||||||
if(!src.holder)
|
if(!check_rights(R_ADMIN, user = src))
|
||||||
src << "Only administrators may use this command."
|
src << "Only administrators may use this command."
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -46,6 +54,7 @@
|
|||||||
var/turf/T = get_turf(M)
|
var/turf/T = get_turf(M)
|
||||||
if(T && isturf(T))
|
if(T && isturf(T))
|
||||||
feedback_add_details("admin_verb","JM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
feedback_add_details("admin_verb","JM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||||
|
A.on_mob_jump()
|
||||||
A.loc = T
|
A.loc = T
|
||||||
else
|
else
|
||||||
A << "This mob is not located in the game world."
|
A << "This mob is not located in the game world."
|
||||||
@@ -56,13 +65,14 @@
|
|||||||
set category = "Admin"
|
set category = "Admin"
|
||||||
set name = "Jump to Coordinate"
|
set name = "Jump to Coordinate"
|
||||||
|
|
||||||
if (!holder)
|
if(!check_rights(R_ADMIN, user = src))
|
||||||
src << "Only administrators may use this command."
|
src << "Only administrators may use this command."
|
||||||
return
|
return
|
||||||
|
|
||||||
if (config.allow_admin_jump)
|
if (config.allow_admin_jump)
|
||||||
if(src.mob)
|
if(src.mob)
|
||||||
var/mob/A = src.mob
|
var/mob/A = src.mob
|
||||||
|
A.on_mob_jump()
|
||||||
A.x = tx
|
A.x = tx
|
||||||
A.y = ty
|
A.y = ty
|
||||||
A.z = tz
|
A.z = tz
|
||||||
@@ -76,7 +86,7 @@
|
|||||||
set category = "Admin"
|
set category = "Admin"
|
||||||
set name = "Jump to Key"
|
set name = "Jump to Key"
|
||||||
|
|
||||||
if(!src.holder)
|
if(!check_rights(R_ADMIN, user = src))
|
||||||
src << "Only administrators may use this command."
|
src << "Only administrators may use this command."
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -91,6 +101,7 @@
|
|||||||
var/mob/M = selection:mob
|
var/mob/M = selection:mob
|
||||||
log_admin("[key_name(usr)] jumped to [key_name(M)]")
|
log_admin("[key_name(usr)] jumped to [key_name(M)]")
|
||||||
message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1)
|
message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1)
|
||||||
|
usr.on_mob_jump()
|
||||||
usr.loc = M.loc
|
usr.loc = M.loc
|
||||||
feedback_add_details("admin_verb","JK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
feedback_add_details("admin_verb","JK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||||
else
|
else
|
||||||
@@ -100,12 +111,13 @@
|
|||||||
set category = "Admin"
|
set category = "Admin"
|
||||||
set name = "Get Mob"
|
set name = "Get Mob"
|
||||||
set desc = "Mob to teleport"
|
set desc = "Mob to teleport"
|
||||||
if(!src.holder)
|
if(!check_rights(R_ADMIN, user = src))
|
||||||
src << "Only administrators may use this command."
|
src << "Only administrators may use this command."
|
||||||
return
|
return
|
||||||
if(config.allow_admin_jump)
|
if(config.allow_admin_jump)
|
||||||
log_admin("[key_name(usr)] teleported [key_name(M)]")
|
log_admin("[key_name(usr)] teleported [key_name(M)]")
|
||||||
message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)]", 1)
|
message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)]", 1)
|
||||||
|
M.on_mob_jump()
|
||||||
M.loc = get_turf(usr)
|
M.loc = get_turf(usr)
|
||||||
feedback_add_details("admin_verb","GM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
feedback_add_details("admin_verb","GM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||||
else
|
else
|
||||||
@@ -116,7 +128,7 @@
|
|||||||
set name = "Get Key"
|
set name = "Get Key"
|
||||||
set desc = "Key to teleport"
|
set desc = "Key to teleport"
|
||||||
|
|
||||||
if(!src.holder)
|
if(!check_rights(R_ADMIN, user = src))
|
||||||
src << "Only administrators may use this command."
|
src << "Only administrators may use this command."
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -134,6 +146,7 @@
|
|||||||
log_admin("[key_name(usr)] teleported [key_name(M)]")
|
log_admin("[key_name(usr)] teleported [key_name(M)]")
|
||||||
message_admins("[key_name_admin(usr)] teleported [key_name(M)]", 1)
|
message_admins("[key_name_admin(usr)] teleported [key_name(M)]", 1)
|
||||||
if(M)
|
if(M)
|
||||||
|
M.on_mob_jump()
|
||||||
M.loc = get_turf(usr)
|
M.loc = get_turf(usr)
|
||||||
feedback_add_details("admin_verb","GK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
feedback_add_details("admin_verb","GK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||||
else
|
else
|
||||||
@@ -142,16 +155,17 @@
|
|||||||
/client/proc/sendmob(var/mob/M in sortmobs())
|
/client/proc/sendmob(var/mob/M in sortmobs())
|
||||||
set category = "Admin"
|
set category = "Admin"
|
||||||
set name = "Send Mob"
|
set name = "Send Mob"
|
||||||
if(!src.holder)
|
if(!check_rights(R_ADMIN, user = src))
|
||||||
src << "Only administrators may use this command."
|
src << "Only administrators may use this command."
|
||||||
return
|
return
|
||||||
var/area/A = input(usr, "Pick an area.", "Pick an area") in return_sorted_areas()
|
var/area/A = input(usr, "Pick an area.", "Pick an area") in return_sorted_areas()
|
||||||
if(A)
|
if(A)
|
||||||
if(config.allow_admin_jump)
|
if(config.allow_admin_jump)
|
||||||
|
M.on_mob_jump()
|
||||||
M.loc = pick(get_area_turfs(A))
|
M.loc = pick(get_area_turfs(A))
|
||||||
feedback_add_details("admin_verb","SMOB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
feedback_add_details("admin_verb","SMOB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||||
|
|
||||||
log_admin("[key_name(usr)] teleported [key_name(M)] to [A]")
|
log_admin("[key_name(usr)] teleported [key_name(M)] to [A]")
|
||||||
message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)] to [A]", 1)
|
message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)] to [A]", 1)
|
||||||
else
|
else
|
||||||
alert("Admin jumping disabled")
|
alert("Admin jumping disabled")
|
||||||
|
|||||||
Reference in New Issue
Block a user