From 38d7129979118b42f921ba22f955612cb4ec6512 Mon Sep 17 00:00:00 2001 From: Iajret Creature <122297233+Steals-The-PRs@users.noreply.github.com> Date: Tue, 16 Apr 2024 16:13:01 +0300 Subject: [PATCH] [MIRROR] Put some admin jump verbs back into the context menu | sorts 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 <12817816+ZephyrTFA@users.noreply.github.com> Co-authored-by: Mal <13398309+vinylspiders@users.noreply.github.com> * Update bark.dm --------- Co-authored-by: NovaBot <154629622+NovaBot13@users.noreply.github.com> Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com> Co-authored-by: Mal <13398309+vinylspiders@users.noreply.github.com> Co-authored-by: Iajret --- code/modules/admin/verbs/admin.dm | 4 ++-- code/modules/admin/verbs/adminfun.dm | 2 +- code/modules/admin/verbs/adminjump.dm | 20 ++++++-------------- code/modules/admin/verbs/fix_air.dm | 2 +- tff_modular/modules/blooper/bark.dm | 8 +------- 5 files changed, 11 insertions(+), 25 deletions(-) diff --git a/code/modules/admin/verbs/admin.dm b/code/modules/admin/verbs/admin.dm index 93028ac9e5e..f6517b13564 100644 --- a/code/modules/admin/verbs/admin.dm +++ b/code/modules/admin/verbs/admin.dm @@ -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 @@ -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 diff --git a/code/modules/admin/verbs/adminfun.dm b/code/modules/admin/verbs/adminfun.dm index f115e8808b5..8bc7a611b35 100644 --- a/code/modules/admin/verbs/adminfun.dm +++ b/code/modules/admin/verbs/adminfun.dm @@ -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 diff --git a/code/modules/admin/verbs/adminjump.dm b/code/modules/admin/verbs/adminjump.dm index 155839942c9..fd57dc5739f 100644 --- a/code/modules/admin/verbs/adminjump.dm +++ b/code/modules/admin/verbs/adminjump.dm @@ -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 @@ -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.")) @@ -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) diff --git a/code/modules/admin/verbs/fix_air.dm b/code/modules/admin/verbs/fix_air.dm index b0dce8c29ea..80a89ef9789 100644 --- a/code/modules/admin/verbs/fix_air.dm +++ b/code/modules/admin/verbs/fix_air.dm @@ -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) diff --git a/tff_modular/modules/blooper/bark.dm b/tff_modular/modules/blooper/bark.dm index 12a2ceed7e9..c87401cedcd 100644 --- a/tff_modular/modules/blooper/bark.dm +++ b/tff_modular/modules/blooper/bark.dm @@ -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)