mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
31 lines
995 B
Plaintext
31 lines
995 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 (tgui_alert(src, "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]")
|
|
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)
|
|
|
|
// turfs are special snowflakes that'll explode if qdel'd outside ChangeTurf
|
|
if (isturf(D))
|
|
var/turf/T = D
|
|
T.ChangeTurf(world.turf)
|
|
else
|
|
qdel(D)
|
|
|
|
if(!QDELETED(D))
|
|
vv_update_display(D, "deleted", "") |