mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
25 lines
833 B
Plaintext
25 lines
833 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)
|
|
coords = "at [COORD(T)]"
|
|
jmp_coords = "at [ADMIN_COORDJMP(T)]"
|
|
else
|
|
jmp_coords = coords = "in nullspace"
|
|
|
|
if (alert(src, "Are you sure you want to delete:\n[D]\n[coords]?", "Confirmation", "Yes", "No") == "Yes")
|
|
log_admin("[key_name(usr)] deleted [D] [coords]")
|
|
message_admins("[key_name_admin(usr)] deleted [D] [jmp_coords]")
|
|
feedback_add_details("admin_verb","ADEL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
/*if(isturf(D)) //Polaris doesn't support baseturfs yet.
|
|
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", "")
|