Files
VOREStation/code/modules/admin/verbs/adminjump.dm
Cameron Lennox 84dc5535dc var/global/list -> GLOB. conversion (#17928)
* These two are easy

* !!!runlevel_flags

the fact it was global.runlevel_flags.len has me a bit...iffy on this.

* !!!json_cache

Same as above. used global.

* player_list & observer_mob_list

* mechas_list

* this wasn't even used

* surgery_steps

* event_triggers

* landmarks_list

* dead_mob_list

* living_mob_list

* ai_list

* cable_list

* cleanbot_reserved_turfs

* listening_objects

* silicon_mob_list

* human_mob_list

* Update global_lists.dm

* joblist

* mob_list

* Update global_lists.dm

* holomap_markers

* mapping_units

* mapping_beacons

* hair_styles_list

* facial_hair_styles_list

* Update global_lists.dm

* facial_hair_styles_male_list

* facial_hair_styles_female_list

* body_marking_styles_list

* body_marking_nopersist_list

* ear_styles_list

* hair_styles_male_list

* tail_styles_list

* wing_styles_list

* escape_list & rune_list & endgame_exits

these were all really small

* endgame_safespawns

* stool_cache

* emotes_by_key

* random_maps & map_count

* item_tf_spawnpoints

* narsie_list

* active_radio_jammers

* unused

* paikeys

* pai_software_by_key & default_pai_software

* plant_seed_sprites

* magazine_icondata_keys  & magazine_icondata_states

* unused

* ashtray_cache

* light_type_cache

* HOLIDAY!!!

this one was annoying

* faction stuff (red?!)

* Update preferences_factions.dm

* vs edit removal

* backbaglist, pdachoicelist, exclude_jobs

* item_digestion_blacklist, edible_tech, blacklisted_artifact_effect, selectable_footstep, hexNums, syndicate_access

* string_slot_flags and hexdigits->hexNums

* possible_changeling_IDs

* vr_mob_tf_options

* vr_mob_spawner_options

* pipe_colors

* vr_mob_spawner_options

* common_tools

* newscaster_standard_feeds

* Update periodic_news.dm

* changeling_fabricated_clothing

* semirandom_mob_spawner_decisions

* id_card_states

* Update syndicate_ids.dm

* overlay_cache & gear_distributed_to

* more

* radio_channels_by_freq

* Update global_lists.dm

* proper

* default_medbay_channels & default_internal_channels

default_internal_channels is weird as it has a mapbased proc() but that proc is never called...

* valid_ringtones

* move this

* possible_plants

* more

* separate these

moves xeno2chemlist from a hook to a new global list.

* tube_dir_list

* valid_bloodreagents & monitor_states

* Junk

* valid_bloodtypes

* breach_burn_descriptors & burn

* more!!

appliance_available_recipes seems uber cursed, re-look at later

* Appliance code is cursed

* wide_chassis & flying_chassis

* allows_eye_color

* all_tooltip_styles

* direction_table

* gun_choices

* severity_to_string

* old event_viruses

* description_icons

* MOVE_KEY_MAPPINGS

* more more

* pai & robot modules

* Update global_lists.dm

* GEOSAMPLES

Also swaps a .len to LAZYLEN()

* shieldgens

* reagent recipies

* global ammo types

* rad collector

* old file and unused global

* nif_look_messages

* FESH

* nifsoft

* chamelion

* the death of sortAtom

* globulins

* lazylen that

* Update global_lists.dm

* LAZY

* Theese too

* quick fix

---------

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
2025-07-14 20:14:31 +02:00

233 lines
7.3 KiB
Plaintext

/mob/proc/on_mob_jump()
return
/mob/observer/dead/on_mob_jump()
following = null
/client/proc/Jump(areaname as null|anything in return_sorted_areas())
set name = "Jump to Area"
set desc = "Area to jump to"
set category = "Admin.Game"
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
return
if(!CONFIG_GET(flag/allow_admin_jump))
tgui_alert_async(usr, "Admin jumping disabled")
return
var/area/A
if(areaname)
A = return_sorted_areas()[areaname]
else
A = return_sorted_areas()[tgui_input_list(usr, "Pick an area:", "Jump to Area", return_sorted_areas())]
if(!A)
return
usr.on_mob_jump()
usr.forceMove(pick(get_area_turfs(A)))
log_admin("[key_name(usr)] jumped to [A]")
message_admins("[key_name_admin(usr)] jumped to [A]", 1)
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.Game"
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
return
if(CONFIG_GET(flag/allow_admin_jump))
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.on_mob_jump()
usr.forceMove(T)
feedback_add_details("admin_verb","JT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else
tgui_alert_async(usr, "Admin jumping disabled")
return
/// Verb wrapper around do_jumptomob()
/client/proc/jumptomob(mob as null|anything in GLOB.mob_list)
set category = "Admin.Game"
set name = "Jump to Mob"
set popup_menu = FALSE
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
return
do_jumptomob(mob)
/// Performs the jumps, also called from admin Topic() for JMP links
/client/proc/do_jumptomob(var/mob/M)
if(!CONFIG_GET(flag/allow_admin_jump))
tgui_alert_async(usr, "Admin jumping disabled")
return
if(!M)
M = tgui_input_list(usr, "Pick a mob:", "Jump to Mob", GLOB.mob_list)
if(!M)
return
var/mob/A = src.mob // Impossible to be unset, enforced by byond
var/turf/T = get_turf(M)
if(isturf(T))
A.on_mob_jump()
A.forceMove(T)
log_admin("[key_name(usr)] jumped to [key_name(M)]")
message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1)
feedback_add_details("admin_verb","JM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else
to_chat(A, span_filter_adminlog("This mob is not located in the game world."))
/client/proc/jumptocoord(tx as num, ty as num, tz as num)
set category = "Admin.Game"
set name = "Jump to Coordinate"
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
return
if (CONFIG_GET(flag/allow_admin_jump))
if(src.mob)
var/mob/A = src.mob
A.on_mob_jump()
var/turf/T = locate(tx, ty, tz)
if(!T)
to_chat(usr, span_warning("Those coordinates are outside the boundaries of the map."))
return
A.forceMove(T)
feedback_add_details("admin_verb","JC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
message_admins("[key_name_admin(usr)] jumped to coordinates [tx], [ty], [tz]")
else
tgui_alert_async(usr, "Admin jumping disabled")
/client/proc/jumptokey()
set category = "Admin.Game"
set name = "Jump to Key"
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
return
if(CONFIG_GET(flag/allow_admin_jump))
var/list/keys = list()
for(var/mob/M in GLOB.player_list)
keys += M.client
var/selection = tgui_input_list(usr, "Select a key:", "Jump to Key", sortKey(keys))
if(!selection)
return
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.on_mob_jump()
usr.forceMove(get_turf(M))
feedback_add_details("admin_verb","JK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else
tgui_alert_async(usr, "Admin jumping disabled")
/client/proc/Getmob(mob/living/M as null|anything in GLOB.mob_list)
set category = "Admin.Game"
set name = "Get Mob"
set desc = "Mob to teleport"
set popup_menu = TRUE
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
return
if(CONFIG_GET(flag/allow_admin_jump))
if(!M)
M = tgui_input_list(usr, "Pick a mob:", "Get Mob", GLOB.mob_list)
if(!M)
return
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()
M.forceMove(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!
else
tgui_alert_async(usr, "Admin jumping disabled")
/client/proc/Getkey()
set category = "Admin.Game"
set name = "Get Key"
set desc = "Key to teleport"
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
return
if(CONFIG_GET(flag/allow_admin_jump))
var/list/keys = list()
for(var/mob/M in GLOB.player_list)
keys += M.client
var/selection = tgui_input_list(usr, "Pick a key:", "Get Key", sortKey(keys))
if(!selection)
return
var/mob/M = selection:mob
if(!M)
return
log_admin("[key_name(usr)] teleported [key_name(M)]")
var/msg = "[key_name_admin(usr)] teleported [ADMIN_LOOKUPFLW(M)]"
message_admins(msg)
admin_ticket_log(M, msg)
if(M)
M.on_mob_jump()
M.forceMove(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!
else
tgui_alert_async(usr, "Admin jumping disabled")
/client/proc/sendmob()
set category = "Admin.Game"
set name = "Send Mob"
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
return
if(CONFIG_GET(flag/allow_admin_jump))
var/area/A = tgui_input_list(usr, "Pick an area:", "Send Mob", return_sorted_areas())
if(!A)
return
var/mob/M = tgui_input_list(usr, "Pick a mob:", "Send Mob", GLOB.mob_list)
if(!M)
return
M.on_mob_jump()
M.forceMove(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)]")
var/msg = "[key_name_admin(usr)] teleported [ADMIN_LOOKUPFLW(M)]"
message_admins(msg)
admin_ticket_log(M, msg)
else
tgui_alert_async(usr, "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.Game"
set name = "Move Atom to Coordinate"
if(!check_rights(R_ADMIN|R_DEBUG|R_EVENT))
return
if(CONFIG_GET(flag/allow_admin_jump))
if(isnull(tx))
tx = tgui_input_number(usr, "Select X coordinate", "Move Atom", null, null)
if(!tx) return
if(isnull(ty))
ty = tgui_input_number(usr, "Select Y coordinate", "Move Atom", null, null)
if(!ty) return
if(isnull(tz))
tz = tgui_input_number(usr, "Select Z coordinate", "Move Atom", null, null)
if(!tz) return
var/turf/T = locate(tx, ty, tz)
if(!T)
to_chat(usr, span_warning("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
tgui_alert_async(usr, "Admin jumping disabled")