diff --git a/code/__HELPERS/logging.dm b/code/__HELPERS/logging.dm index d5d0f58685..23119c69ad 100644 --- a/code/__HELPERS/logging.dm +++ b/code/__HELPERS/logging.dm @@ -109,6 +109,12 @@ M = whom C = M.client key = M.key + else if(istype(whom, /datum/mind)) + var/datum/mind/D = whom + key = D.key + M = D.current + if(D.current) + C = D.current.client else if(istype(whom, /datum)) var/datum/D = whom return "*invalid:[D.type]*" diff --git a/code/datums/mind.dm b/code/datums/mind.dm index b8260825c9..99c467825c 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -143,7 +143,11 @@ if(href_list["add_antagonist"]) var/datum/antagonist/antag = all_antag_types[href_list["add_antagonist"]] - if(antag) antag.add_antagonist(src, 1, 1, 0, 1, 1) // Ignore equipment and role type for this. + if(antag) + if(antag.add_antagonist(src, 1, 1, 0, 1, 1)) // Ignore equipment and role type for this. + log_admin("[key_name_admin(usr)] made [key_name(src)] into a [antag.role_text].") + else + usr << "[src] could not be made into a [antag.role_text]!" else if(href_list["remove_antagonist"]) var/datum/antagonist/antag = all_antag_types[href_list["remove_antagonist"]]