Files
Bubberstation/code/modules/admin/view_variables/admin_delete.dm
Zandario 77db52dc6b Corrects record_feedback()'s copy/paste comment (#74962)
## About The Pull Request

Corrects `record_feedback()`'s copy/paste comment.

## Pointless history

Originally being added in e2a8a5e, it kept its name and args for quite a
few years, that was until #32188 which had it renamed to
`record_feedback` and its args pretty much doubled. In between these
times the known copy/paste comment was already around, but that wasn't
updated, until now apparently.
2023-04-25 20:20:02 -06:00

27 lines
955 B
Plaintext

/client/proc/admin_delete(datum/D)
var/atom/A = D
var/coords = ""
var/jmp_coords = ""
if(istype(A))
var/turf/T = get_turf(A)
if(T)
var/atom/a_loc = A.loc
var/is_turf = isturf(a_loc)
coords = "[is_turf ? "at" : "from [a_loc] at"] [AREACOORD(T)]"
jmp_coords = "[is_turf ? "at" : "from [a_loc] at"] [ADMIN_VERBOSEJMP(T)]"
else
jmp_coords = coords = "in nullspace"
if (tgui_alert(usr, "Are you sure you want to delete:\n[D]\n[coords]?", "Confirmation", list("Yes", "No")) == "Yes")
log_admin("[key_name(usr)] deleted [D] [coords]")
message_admins("[key_name_admin(usr)] deleted [D] [jmp_coords]")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Delete") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
if(isturf(D))
var/turf/T = D
T.ScrapeAway()
else
vv_update_display(D, "deleted", VV_MSG_DELETED)
qdel(D)
if(!QDELETED(D))
vv_update_display(D, "deleted", "")