mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 19:13:30 +01:00
Admin teleport update, further admin message fixes
This commit is contained in:
@@ -1,30 +1,39 @@
|
||||
/client/proc/Jump(var/area/A in return_sorted_areas())
|
||||
/client/proc/Jump(area/A in return_sorted_areas())
|
||||
set name = "Jump to Area"
|
||||
set desc = "Area to jump to"
|
||||
set category = "Admin"
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/list/area_turfs = get_area_turfs(A)
|
||||
if(area_turfs && area_turfs.len)
|
||||
usr.loc = pick(area_turfs)
|
||||
else
|
||||
src << "That area has no turfs to jump to!"
|
||||
if(!A)
|
||||
return
|
||||
|
||||
var/list/turfs = list()
|
||||
for(var/turf/T in A)
|
||||
if(T.density)
|
||||
continue
|
||||
turfs.Add(T)
|
||||
|
||||
var/turf/T = pick_n_take(turfs)
|
||||
if(!T)
|
||||
src << "Nowhere to jump to!"
|
||||
return
|
||||
|
||||
admin_forcemove(usr, T)
|
||||
log_admin("[key_name(usr)] jumped to [A]")
|
||||
message_admins("[key_name_admin(usr)] jumped to [A]", 1)
|
||||
message_admins("[key_name_admin(usr)] jumped to [A]")
|
||||
feedback_add_details("admin_verb","JA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/jumptoturf(var/turf/T in world)
|
||||
set name = "Jump to Turf"
|
||||
set category = "Admin"
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
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)
|
||||
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)
|
||||
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!
|
||||
return
|
||||
@@ -33,8 +42,7 @@
|
||||
set category = "Admin"
|
||||
set name = "Jump to Mob"
|
||||
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
log_admin("[key_name(usr)] jumped to [key_name(M)]")
|
||||
@@ -44,7 +52,7 @@
|
||||
var/turf/T = get_turf(M)
|
||||
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!
|
||||
A.loc = T
|
||||
admin_forcemove(A, M.loc)
|
||||
else
|
||||
A << "This mob is not located in the game world."
|
||||
|
||||
@@ -52,8 +60,7 @@
|
||||
set category = "Admin"
|
||||
set name = "Jump to Coordinate"
|
||||
|
||||
if (!holder)
|
||||
src << "Only administrators may use this command."
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if(src.mob)
|
||||
@@ -68,8 +75,7 @@
|
||||
set category = "Admin"
|
||||
set name = "Jump to Key"
|
||||
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/list/keys = list()
|
||||
@@ -82,20 +88,22 @@
|
||||
var/mob/M = selection:mob
|
||||
log_admin("[key_name(usr)] jumped to [key_name(M)]")
|
||||
message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1)
|
||||
usr.loc = M.loc
|
||||
|
||||
admin_forcemove(usr, M.loc)
|
||||
|
||||
feedback_add_details("admin_verb","JK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/Getmob(var/mob/M in mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Get Mob"
|
||||
set desc = "Mob to teleport"
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
log_admin("[key_name(usr)] teleported [key_name(M)]")
|
||||
message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)]", 1)
|
||||
M.loc = get_turf(usr)
|
||||
admin_forcemove(M, 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!
|
||||
|
||||
/client/proc/Getkey()
|
||||
@@ -103,8 +111,7 @@
|
||||
set name = "Get Key"
|
||||
set desc = "Key to teleport"
|
||||
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/list/keys = list()
|
||||
@@ -120,19 +127,27 @@
|
||||
log_admin("[key_name(usr)] teleported [key_name(M)]")
|
||||
message_admins("[key_name_admin(usr)] teleported [key_name(M)]", 1)
|
||||
if(M)
|
||||
M.loc = get_turf(usr)
|
||||
admin_forcemove(M, get_turf(usr))
|
||||
usr.loc = M.loc
|
||||
feedback_add_details("admin_verb","GK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/sendmob(var/mob/M in sortmobs())
|
||||
set category = "Admin"
|
||||
set name = "Send Mob"
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/area/A = input(usr, "Pick an area.", "Pick an area") in return_sorted_areas()
|
||||
if(A)
|
||||
M.loc = pick(get_area_turfs(A))
|
||||
admin_forcemove(M, 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!
|
||||
|
||||
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)
|
||||
|
||||
/proc/admin_forcemove(mob/mover, atom/newloc)
|
||||
mover.loc = newloc
|
||||
mover.on_forcemove(newloc)
|
||||
|
||||
/mob/proc/on_forcemove(atom/newloc)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user