Improves VV-related code (#54416)

VV-related code cleanup
    Added code to trigger the proper setters for several variables that have them.
    Added some admin logging for var-edit teleports.
    Cleaned-up some code all around.
This commit is contained in:
Rohesie
2020-10-19 11:38:26 -03:00
committed by GitHub
parent 21a23a3602
commit 192bfb5f4c
13 changed files with 189 additions and 88 deletions
+18 -5
View File
@@ -105,13 +105,26 @@
return
var/atom/loc = get_turf(usr)
log_admin("[key_name(usr)] teleported [key_name(M)] to [AREACOORD(loc)]")
var/msg = "[key_name_admin(usr)] teleported [ADMIN_LOOKUPFLW(M)] to [ADMIN_VERBOSEJMP(loc)]"
message_admins(msg)
admin_ticket_log(M, msg)
M.forceMove(loc)
M.admin_teleport(loc)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Get Mob") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/// Proc to hook user-enacted teleporting behavior and keep logging of the event.
/atom/movable/proc/admin_teleport(atom/new_location)
if(isnull(new_location))
log_admin("[key_name(usr)] teleported [key_name(src)] to nullspace")
moveToNullspace()
else
log_admin("[key_name(usr)] teleported [key_name(src)] to [AREACOORD(loc)]")
forceMove(new_location)
/mob/admin_teleport(atom/new_location)
var/msg = "[key_name_admin(usr)] teleported [ADMIN_LOOKUPFLW(src)] to [isnull(new_location) ? "nullspace" : ADMIN_VERBOSEJMP(loc)]"
message_admins(msg)
admin_ticket_log(src, msg)
return ..()
/client/proc/Getkey()
set category = "Admin.Game"
set name = "Get Key"