Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] Fix duplicate vv_get_dropdown() on atom/movable #796

Merged
merged 1 commit into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions code/__DEFINES/vv.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 16 additions & 6 deletions code/game/atoms_movable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
. = ..()
. += "<option value='?_src_=holder;[HrefToken()];adminplayerobservefollow=[REF(src)]'>Follow</option>"
. += "<option value='?_src_=holder;[HrefToken()];admingetmovable=[REF(src)]'>Get</option>"


/* Language procs
* Unless you are doing something very specific, these are the ones you want to use.
*/
Expand Down Expand Up @@ -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")
Expand All @@ -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)
Expand Down
Loading