From 49a0d601ebe8af9fa21e432f3d6f87f3ee6c99af Mon Sep 17 00:00:00 2001
From: Pathid <31839805+Pathid@users.noreply.github.com>
Date: Sat, 22 Dec 2018 02:44:32 -0800
Subject: [PATCH] Logging for posibrain attack_ghost (#20422)
* Logging for posibrain attack_ghost
* Log both
---
code/datums/recruiter.dm | 6 ++++++
code/modules/mob/living/carbon/brain/posibrain.dm | 10 +++++++++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/code/datums/recruiter.dm b/code/datums/recruiter.dm
index cbfd91d6397..4c1371028f9 100644
--- a/code/datums/recruiter.dm
+++ b/code/datums/recruiter.dm
@@ -10,6 +10,7 @@
var/reject_antag_hud = 1
var/alien_whitelist_id = null // "Diona"
var/recruitment_timeout = 600
+ var/logging = FALSE
// Called when a volunteer has been added.
// Args:
@@ -92,9 +93,14 @@
if(O in currently_querying)
to_chat(O, "Removed from registration list.")
currently_querying -= O
+ if(logging)
+ subject.investigation_log(I_GHOST, "|| had a ghost abandon an attempt to become its personality: [key_name(O)][O.locked_to ? ", who was haunting [O.locked_to]" : ""]")
+
else
to_chat(O, "Added to registration list.")
currently_querying += O
+ if(logging)
+ subject.investigation_log(I_GHOST, "|| had a ghost sign up to become its personality: [key_name(O)][O.locked_to ? ", who was haunting [O.locked_to]" : ""]")
/datum/recruiter/proc/check_observer(var/mob/dead/observer/O)
if(reject_antag_hud && O.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
diff --git a/code/modules/mob/living/carbon/brain/posibrain.dm b/code/modules/mob/living/carbon/brain/posibrain.dm
index 5e2498a359f..9cbbec8e9d5 100644
--- a/code/modules/mob/living/carbon/brain/posibrain.dm
+++ b/code/modules/mob/living/carbon/brain/posibrain.dm
@@ -39,6 +39,7 @@
recruiter.display_name = "posibrain"
recruiter.role = ROLE_POSIBRAIN
recruiter.jobban_roles = list(ROLE_POSIBRAIN)
+ recruiter.logging = TRUE
// A player has their role set to Yes or Always
recruiter.player_volunteering.Add(src, "recruiter_recruiting")
@@ -54,6 +55,7 @@
var/mob/dead/observer/O = args["player"]
var/controls = args["controls"]
to_chat(O, "You are a possible candidate for \a [src]. Get ready. ([controls])")
+ investigation_log(I_GHOST, "|| had a ghost automatically sign up to become its personality: [key_name(O)][O.locked_to ? ", who was haunting [O.locked_to]" : ""]")
/obj/item/device/mmi/posibrain/proc/recruiter_not_recruiting(var/list/args)
var/mob/dead/observer/O = args["player"]
@@ -89,6 +91,8 @@
playsound(src, 'sound/misc/buzzbeep.ogg', 50, 1)
icon_state = "posibrain-occupied"
+ investigation_log(I_GHOST, "|| has been occupied by: [key_name(src)]")
+
/obj/item/device/mmi/posibrain/proc/reset_search() //We give the players sixty seconds to decide, then reset the timer.
@@ -151,11 +155,15 @@
/obj/item/device/mmi/posibrain/attack_ghost(var/mob/dead/observer/O)
if(searching)
recruiter.volunteer(O)
- to_chat(O, "Click again to unvolunteer.")
+ if(O in recruiter.currently_querying)
+ to_chat(O, "Click again to unvolunteer.")
+ else
+ to_chat(O, "Click again to volunteer.")
else
if(!brainmob.ckey && last_ping_time + ping_cooldown <= world.time)
last_ping_time = world.time
visible_message(message = "\The [src] pings softly.", blind_message = "You hear what you think is a microwave finishing.")
+ investigation_log(I_GHOST, "|| was pinged by [key_name(O)][O.locked_to ? ", who was haunting [O.locked_to]" : ""]")
else
to_chat(O, "[src] is recharging. Try again in a few moments.")