From d3823207e79eab53f39b1ce18a752617e3c48016 Mon Sep 17 00:00:00 2001 From: Iajret Creature <122297233+Steals-The-PRs@users.noreply.github.com> Date: Thu, 23 Nov 2023 22:12:09 +0300 Subject: [PATCH] [MIRROR] Fix duplicate vv_get_dropdown() on atom/movable [MDB IGNORE] (#25212) (#796) * Fix duplicate vv_get_dropdown() on atom/movable (#79890) ## About The Pull Request Fix duplicate vv_get_dropdown() on atom/movable I just merged the old format into the new one. * Fix duplicate vv_get_dropdown() on atom/movable --------- Co-authored-by: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Co-authored-by: Xander3359 <66163761+Xander3359@users.noreply.github.com> --- code/__DEFINES/vv.dm | 2 ++ code/game/atoms_movable.dm | 22 ++++++++++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/code/__DEFINES/vv.dm b/code/__DEFINES/vv.dm index f6cb654b1d5..919556a6be9 100644 --- a/code/__DEFINES/vv.dm +++ b/code/__DEFINES/vv.dm @@ -103,6 +103,8 @@ #define VV_HK_ARMOR_MOD "mod_obj_armor" // /atom/movable +#define VV_HK_OBSERVE_FOLLOW "observe_follow" +#define VV_HK_GET_MOVABLE "get_movable" #define VV_HK_DEADCHAT_PLAYS "deadchat_plays" // /obj diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 9208ea7a9a2..b200e688caa 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -1460,12 +1460,6 @@ animate(src, pixel_x = pixel_x + pixel_x_diff, pixel_y = pixel_y + pixel_y_diff, transform=rotated_transform, time = 1, easing=BACK_EASING|EASE_IN, flags = ANIMATION_PARALLEL) animate(pixel_x = pixel_x - pixel_x_diff, pixel_y = pixel_y - pixel_y_diff, transform=initial_transform, time = 2, easing=SINE_EASING, flags = ANIMATION_PARALLEL) -/atom/movable/vv_get_dropdown() - . = ..() - . += "" - . += "" - - /* Language procs * Unless you are doing something very specific, these are the ones you want to use. */ @@ -1630,6 +1624,9 @@ /atom/movable/vv_get_dropdown() . = ..() + VV_DROPDOWN_OPTION("", "---------") + VV_DROPDOWN_OPTION(VV_HK_OBSERVE_FOLLOW, "Observe Follow") + VV_DROPDOWN_OPTION(VV_HK_GET_MOVABLE, "Get Movable") VV_DROPDOWN_OPTION(VV_HK_EDIT_PARTICLES, "Edit Particles") VV_DROPDOWN_OPTION(VV_HK_DEADCHAT_PLAYS, "Start/Stop Deadchat Plays") VV_DROPDOWN_OPTION(VV_HK_ADD_FANTASY_AFFIX, "Add Fantasy Affix") @@ -1640,6 +1637,19 @@ if(!.) return + if(href_list[VV_HK_OBSERVE_FOLLOW]) + if(!check_rights(R_ADMIN)) + return + usr.client?.admin_follow(src) + + if(href_list[VV_HK_GET_MOVABLE]) + if(!check_rights(R_ADMIN)) + return + + if(QDELETED(src)) + return + forceMove(get_turf(usr)) + if(href_list[VV_HK_EDIT_PARTICLES] && check_rights(R_VAREDIT)) var/client/C = usr.client C?.open_particle_editor(src)