'Send Mob' cancel button (#15499)

This commit is contained in:
SabreML
2021-02-15 10:38:36 +00:00
committed by GitHub
parent 388c1d8852
commit 0cdf3a0d12
+12 -10
View File
@@ -161,22 +161,24 @@
admin_forcemove(usr, M.loc)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Get Key") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/sendmob(var/mob/M in GLOB.mob_list)
/client/proc/sendmob(mob/M in GLOB.mob_list)
set category = "Admin"
set name = "Send Mob"
if(!check_rights(R_ADMIN))
return
var/area/A = input(usr, "Pick an area.", "Pick an area") in return_sorted_areas()
if(A)
if(isobj(M.loc))
var/obj/O = M.loc
O.force_eject_occupant(M)
admin_forcemove(M, pick(get_area_turfs(A)))
SSblackbox.record_feedback("tally", "admin_verb", 1, "Send Mob") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] teleported [key_name(M)] to [A]")
message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)] to [A]", 1)
var/area/A = input(usr, "Pick an area.", "Pick an area") as null|anything in return_sorted_areas()
if(!A)
return
if(isobj(M.loc))
var/obj/O = M.loc
O.force_eject_occupant(M)
admin_forcemove(M, pick(get_area_turfs(A)))
SSblackbox.record_feedback("tally", "admin_verb", 1, "Send Mob") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] teleported [key_name(M)] to [A]")
message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)] to [A]", 1)
/proc/admin_forcemove(mob/mover, atom/newloc)
mover.forceMove(newloc)