Skip to content

Commit

Permalink
[MIRROR] Put some admin jump verbs back into the context menu | sorts…
Browse files Browse the repository at this point in the history
… area jump list again (#2903)

* [MIRROR] Put some admin jump verbs back into the context menu | sorts area jump list again (#1980)

* Put some admin jump verbs back into the context menu | sorts area jump list again

* Conflicts

* Conflicts

* Update adminjump.dm

---------

Co-authored-by: Zephyr <[email protected]>
Co-authored-by: Mal <[email protected]>

* Update bark.dm

---------

Co-authored-by: NovaBot <[email protected]>
Co-authored-by: Zephyr <[email protected]>
Co-authored-by: Mal <[email protected]>
Co-authored-by: Iajret <[email protected]>
  • Loading branch information
5 people authored Apr 16, 2024
1 parent d865cc0 commit 38d7129
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 25 deletions.
4 changes: 2 additions & 2 deletions code/modules/admin/verbs/admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ADMIN_VERB(announce, R_ADMIN, "Announce", "Announce your desires to the world.",
log_admin("Announce: [key_name(user)] : [message]")
BLACKBOX_LOG_ADMIN_VERB("Announce")

ADMIN_VERB(unprison, R_ADMIN, "UnPrison", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, mob/prisoner)
ADMIN_VERB(unprison, R_ADMIN, "UnPrison", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, mob/prisoner in GLOB.mob_list)
if(!is_centcom_level(prisoner.z))
tgui_alert(user, "[prisoner.name] is not prisoned.")
return
Expand Down Expand Up @@ -144,7 +144,7 @@ ADMIN_VERB(cmd_admin_check_player_exp, R_ADMIN, "Player Playtime", "View player

///////////////////////////////////////////////////////////////////////////////////////////////

ADMIN_VERB(drop_everything, R_ADMIN, "Drop Everything", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, mob/dropee)
ADMIN_VERB(drop_everything, R_ADMIN, "Drop Everything", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, mob/dropee in GLOB.mob_list)
var/confirm = tgui_alert(user, "Make [dropee] drop everything?", "Message", list("Yes", "No"))
if(confirm != "Yes")
return
Expand Down
2 changes: 1 addition & 1 deletion code/modules/admin/verbs/adminfun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ADMIN_VERB(admin_emp, R_ADMIN|R_FUN, "EM Pulse", ADMIN_VERB_NO_DESCRIPTION, ADMI
message_admins("[key_name_admin(user)] created an EM Pulse ([heavy],[light]) at [AREACOORD(orignator)]")
BLACKBOX_LOG_ADMIN_VERB("EM Pulse")

ADMIN_VERB(gib_them, R_ADMIN, "Gib", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, mob/victim)
ADMIN_VERB(gib_them, R_ADMIN, "Gib", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, mob/victim in GLOB.mob_list)
var/confirm = tgui_alert(user, "Drop a brain?", "Confirm", list("Yes", "No","Cancel")) || "Cancel"
if(confirm == "Cancel")
return
Expand Down
20 changes: 6 additions & 14 deletions code/modules/admin/verbs/adminjump.dm
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
ADMIN_VERB(jump_to_area, R_ADMIN, "Jump To Area", "Jumps to the specified area.", ADMIN_CATEGORY_GAME, area/target in world)
if(!isobserver(user.mob))
SSadmin_verbs.dynamic_invoke_verb(user, /datum/admin_verb/admin_ghost)

ADMIN_VERB(jump_to_area, R_ADMIN, "Jump To Area", "Jumps to the specified area.", ADMIN_CATEGORY_GAME, area/target in get_sorted_areas())
var/turf/drop_location
top_level:
for(var/list/zlevel_turfs as anything in target.get_zlevel_turf_lists())
for(var/turf/area_turf as anything in zlevel_turfs)
if(area_turf.density)
continue
drop_location = area_turf
break top_level

Expand All @@ -18,27 +18,19 @@ ADMIN_VERB(jump_to_area, R_ADMIN, "Jump To Area", "Jumps to the specified area."
message_admins("[key_name_admin(user)] jumped to [AREACOORD(drop_location)]")
BLACKBOX_LOG_ADMIN_VERB("Jump To Area")

ADMIN_VERB(jump_to_turf, R_ADMIN, "Jump To Turf", "Jump to any turf in the game. This will lag your client.", ADMIN_CATEGORY_GAME, turf/locale in world)
if(!isobserver(user.mob))
SSadmin_verbs.dynamic_invoke_verb(user, /datum/admin_verb/admin_ghost)

ADMIN_VERB_AND_CONTEXT_MENU(jump_to_turf, R_ADMIN, "Jump To Turf", "Jump to any turf in the game. This will lag your client.", ADMIN_CATEGORY_GAME, turf/locale in world)
log_admin("[key_name(user)] jumped to [AREACOORD(locale)]")
message_admins("[key_name_admin(user)] jumped to [AREACOORD(locale)]")
user.mob.abstract_move(locale)
BLACKBOX_LOG_ADMIN_VERB("Jump To Turf")

ADMIN_VERB(jump_to_mob, R_ADMIN, "Jump To Mob", "Jump to any mob in the game.", ADMIN_CATEGORY_GAME, mob/target in world)
if(!isobserver(user.mob))
SSadmin_verbs.dynamic_invoke_verb(user, /datum/admin_verb/admin_ghost)
ADMIN_VERB_AND_CONTEXT_MENU(jump_to_mob, R_ADMIN, "Jump To Mob", "Jump to any mob in the game.", ADMIN_CATEGORY_GAME, mob/target in world)
user.mob.abstract_move(target.loc)
log_admin("[key_name(user)] jumped to [key_name(target)]")
message_admins("[key_name_admin(user)] jumped to [ADMIN_LOOKUPFLW(target)] at [AREACOORD(target)]")
BLACKBOX_LOG_ADMIN_VERB("Jump To Mob")

ADMIN_VERB(jump_to_coord, R_ADMIN, "Jump To Coordinate", "Jump to a specific coordinate in the game world.", ADMIN_CATEGORY_GAME, cx as num, cy as num, cz as num)
if(!isobserver(user.mob))
SSadmin_verbs.dynamic_invoke_verb(user, /datum/admin_verb/admin_ghost)

var/turf/where_we_droppin = locate(cx, cy, cz)
if(isnull(where_we_droppin))
to_chat(user, span_warning("Invalid coordinates."))
Expand Down Expand Up @@ -106,7 +98,7 @@ ADMIN_VERB(get_key, R_ADMIN, "Get Key", "Teleport the player with the provided k
M.forceMove(get_turf(user))
BLACKBOX_LOG_ADMIN_VERB("Get Key")

ADMIN_VERB(send_mob, R_ADMIN, "Send Mob", "Teleport the specified mob to an area of your choosing.", ADMIN_CATEGORY_GAME, mob/jumper)
ADMIN_VERB_AND_CONTEXT_MENU(send_mob, R_ADMIN, "Send Mob", "Teleport the specified mob to an area of your choosing.", ADMIN_CATEGORY_GAME, mob/jumper)
var/list/sorted_areas = get_sorted_areas()
if(!length(sorted_areas))
to_chat(user, "No areas found.", confidential = TRUE)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/admin/verbs/fix_air.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Proc taken from yogstation, credit to nichlas0010 for the original
ADMIN_VERB(fix_air, R_ADMIN, "Fix Air", "Fixes air in a specified radius.", ADMIN_CATEGORY_GAME, turf/open/locale in world, range = 2 as num)
ADMIN_VERB_AND_CONTEXT_MENU(fix_air, R_ADMIN, "Fix Air", "Fixes air in a specified radius.", ADMIN_CATEGORY_GAME, turf/open/locale in world, range = 2 as num)
message_admins("[key_name_admin(user)] fixed air with range [range] in area [locale.loc.name]")
user.mob.log_message("fixed air with range [range] in area [locale.loc.name]", LOG_ADMIN)

Expand Down
8 changes: 1 addition & 7 deletions tff_modular/modules/blooper/bark.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,10 @@ GLOBAL_VAR_INIT(blooper_allowed, TRUE) // For administrators
target.blooper_pitch = round((BLOOPER_DEFAULT_MINPITCH + BLOOPER_DEFAULT_MAXPITCH) / 2)
target.blooper_pitch_range = 0.2

/datum/admins/proc/toggleblooper()
set category = "Server"
set desc = "Toggle ANNOYING NOIZES"
set name = "Toggle Blooper"
ADMIN_VERB(verb_path, R_SERVER, "Toggle Blooper", "Toggle ANNOYING NOIZES", ADMIN_CATEGORY_SERVER)
toggle_blooper()
log_admin("[key_name(usr)] toggled Blooper.")
message_admins("[key_name_admin(usr)] toggled Blooper.")
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Blooper", "[GLOB.blooper_allowed ? "Enabled" : "Disabled"]")) // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!

ADMIN_VERB(verb_path, R_SERVER, "Toggle Blooper", "Toggle ANNOYING NOIZES", ADMIN_CATEGORY_SERVER)

/proc/toggle_blooper(toggle = null)
if(toggle != null)
Expand Down

0 comments on commit 38d7129

Please sign in to comment.