Admin logs + whitelist and blacklist for Mind Binder and Body Snatcher usage (#7729)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
Eli
2024-02-13 18:25:44 +11:00
committed by GitHub
parent 6baa0bafde
commit 85408b27a0
2 changed files with 67 additions and 9 deletions

View File

@@ -31,7 +31,12 @@
var/choice = tgui_alert(usr,"This will swap your mind with the target's mind. This will result in them controlling your body, and you controlling their body. Continue?","Confirmation",list("Continue","Cancel"))
if(choice == "Continue" && usr.get_active_hand() == src && usr.Adjacent(M))
//CHOMPAdd Start - Admin logging for Body Snatcher usage
if(M.ckey && !M.client)
log_and_message_admins("attempted to body swap with [key_name(M)] while they were SSD!")
else
log_and_message_admins("attempted to body swap with [key_name(M)].")
//CHOMPAdd End
usr.visible_message("<span class='warning'>[usr] pushes the device up their forehead and [M]'s head, the device beginning to let out a series of light beeps!</span>","<span class='notice'>You begin swap minds with [M]!</span>")
if(do_after(usr,35 SECONDS,M))
if(usr.mind && M.mind && M.stat != DEAD && usr.stat != DEAD)