From 15e3ef676bebede49fb2572440a4075805b9c54b Mon Sep 17 00:00:00 2001 From: Atermonera Date: Wed, 25 Mar 2020 13:38:35 -0700 Subject: [PATCH] Silly admins can't blindly break movement irreparably (#6897) * Silly admins can't blindly break movement * Updates pixel movement var protections --- code/game/atoms_movable.dm | 2 +- code/modules/admin/view_variables/modify_variables.dm | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index af1d53d191..812cdff134 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -49,7 +49,7 @@ QDEL_NULL(riding_datum) //VOREStation Add /atom/movable/vv_edit_var(var_name, var_value) - if(GLOB.VVpixelmovement[var_name]) //Pixel movement is not yet implemented, changing this will break everything irreversibly. + if(var_name in GLOB.VVpixelmovement) //Pixel movement is not yet implemented, changing this will break everything irreversibly. return FALSE return ..() diff --git a/code/modules/admin/view_variables/modify_variables.dm b/code/modules/admin/view_variables/modify_variables.dm index 8878318fd6..1e3aef04bd 100644 --- a/code/modules/admin/view_variables/modify_variables.dm +++ b/code/modules/admin/view_variables/modify_variables.dm @@ -310,6 +310,13 @@ GLOBAL_PROTECT(VVpixelmovement) if(!variable) return + if(variable in GLOB.VVpixelmovement) + if(!check_rights(R_DEBUG)) + return + var/prompt = alert(src, "Editing this var may irreparably break tile gliding for the rest of the round. THIS CAN'T BE UNDONE", "DANGER", "ABORT ", "Continue", " ABORT") + if (prompt != "Continue") + return + if(!O.can_vv_get(variable)) return