diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 26d8506bf95..3c479b8df0d 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -587,3 +587,5 @@ >> "} + var/turf/T = get_turf(src) + . += "
[ADMIN_COORDJMP(T)]" diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 87507cc936c..4323cb974f9 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -48,6 +48,17 @@ pulledby = null QDEL_NULL(riding_datum) //VOREStation Add + +/atom/movable/vv_get_dropdown() + . = ..() + VV_DROPDOWN_OPTION("move_atom", "Move To Coordinate") + +/atom/vv_do_topic(list/href_list) + . = ..() + IF_VV_OPTION("move_atom") + usr.client.cmd_admin_move_atom(src) + href_list["datumrefresh"] = "\ref[src]" + /atom/movable/vv_edit_var(var_name, var_value) if(var_name in GLOB.VVpixelmovement) //Pixel movement is not yet implemented, changing this will break everything irreversibly. return FALSE diff --git a/code/modules/admin/verbs/adminjump.dm b/code/modules/admin/verbs/adminjump.dm index e414a774cd9..9e7810c51c9 100644 --- a/code/modules/admin/verbs/adminjump.dm +++ b/code/modules/admin/verbs/adminjump.dm @@ -169,4 +169,34 @@ message_admins(msg) admin_ticket_log(M, msg) else - alert("Admin jumping disabled") \ No newline at end of file + alert("Admin jumping disabled") + +/client/proc/cmd_admin_move_atom(var/atom/movable/AM, tx as num, ty as num, tz as num) + set category = "Admin" + set name = "Move Atom to Coordinate" + + if(!check_rights(R_ADMIN|R_DEBUG|R_EVENT)) + return + + if(config.allow_admin_jump) + if(isnull(tx)) + tx = input("Select X coordinate", "Move Atom", null, null) as null|num + if(!tx) return + if(isnull(ty)) + ty = input("Select Y coordinate", "Move Atom", null, null) as null|num + if(!ty) return + if(isnull(tz)) + tz = input("Select Z coordinate", "Move Atom", null, null) as null|num + if(!tz) return + var/turf/T = locate(tx, ty, tz) + if(!T) + to_chat(usr, "Those coordinates are outside the boundaries of the map.") + return + if(ismob(AM)) + var/mob/M = AM + M.on_mob_jump() + AM.forceMove(T) + feedback_add_details("admin_verb", "MA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + message_admins("[key_name_admin(usr)] jumped [AM] to coordinates [tx], [ty], [tz]") + else + alert("Admin jumping disabled")