Mirror logging for brainwashing and hypnosis in the player panel and attack logs. (#56515)

Hypnosis and brainwashing now have entries in the Player Panel logging
under attack and entries in the attack logs.

Mirrors some logging that would otherwise just be in the game logs.
From an admin-perspective, issues where you'd want to check
brainwashing/hypnosis tend to go hand-in-hand with issues relating to
attack logs as opposed to game logs.
This commit is contained in:
Timberpoes
2021-01-31 20:21:38 +00:00
committed by GitHub
parent f015c1413e
commit e85cf07b96
6 changed files with 15 additions and 1 deletions
@@ -45,6 +45,9 @@
/datum/antagonist/brainwashed/farewell()
to_chat(owner, "<span class='warning'>Your mind suddenly clears...</span>")
to_chat(owner, "<big><span class='warning'><b>You feel the weight of the Directives disappear! You no longer have to obey them.</b></span></big>")
if(owner.current)
var/mob/living/owner_mob = owner.current
owner_mob.log_message("is no longer brainwashed with the objectives: [english_list(objectives)].", LOG_ATTACK)
owner.announce_objectives()
/datum/antagonist/brainwashed/admin_add(datum/mind/new_owner,mob/admin)
@@ -71,6 +74,7 @@
brainwash(C, objectives)
var/obj_list = english_list(objectives)
message_admins("[key_name_admin(admin)] has brainwashed [key_name_admin(C)] with the following objectives: [obj_list].")
C.log_message("has been force-brainwashed with the objective '[obj_list]' by admin [key_name(admin)]", LOG_ATTACK, log_globally = FALSE)
log_admin("[key_name(admin)] has brainwashed [key_name(C)] with the following objectives: [obj_list].")
/datum/objective/brainwashing
@@ -172,6 +172,7 @@
sent_directive = ES.get_value()
brainwash(host_mob, sent_directive)
log_game("A mind control nanite program brainwashed [key_name(host_mob)] with the objective '[sent_directive]'.")
host_mob.log_message("has been brainwashed with the objective '[sent_directive]' triggered by a mind control nanite program.", LOG_ATTACK)
addtimer(CALLBACK(src, .proc/end_brainwashing), 600)
/datum/nanite_program/comm/mind_control/proc/end_brainwashing()
@@ -52,6 +52,8 @@
to_chat(target, "<span class='userdanger'>A new compulsion fills your mind... you feel forced to obey it!</span>")
brainwash(target, objective)
message_admins("[ADMIN_LOOKUPFLW(user)] surgically brainwashed [ADMIN_LOOKUPFLW(target)] with the objective '[objective]'.")
target.log_message("has been brainwashed with the objective '[objective]' by [key_name(user)] using brainwashing surgery.", LOG_ATTACK)
user.log_message("has brainwashed [key_name(target)] with the objective '[objective]' using brainwashing surgery.", LOG_ATTACK, log_globally = FALSE)
log_game("[key_name(user)] surgically brainwashed [key_name(target)] with the objective '[objective]'.")
return ..()