Logging for posibrain attack_ghost (#20422)

* Logging for posibrain attack_ghost

* Log both
This commit is contained in:
Pathid
2018-12-22 02:44:32 -08:00
committed by Intigracy
parent 545973dbc3
commit 49a0d601eb
2 changed files with 15 additions and 1 deletions

View File

@@ -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, "<span class='notice'>Removed from registration list.</span>")
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, "<span class='notice'>Added to registration list.</span>")
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)

View File

@@ -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, "<span class=\"recruit\">You are a possible candidate for \a [src]. Get ready. ([controls])</span>")
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, "<span class='notice'>Click again to unvolunteer.</span>")
if(O in recruiter.currently_querying)
to_chat(O, "<span class='notice'>Click again to unvolunteer.</span>")
else
to_chat(O, "<span class='notice'>Click again to volunteer.</span>")
else
if(!brainmob.ckey && last_ping_time + ping_cooldown <= world.time)
last_ping_time = world.time
visible_message(message = "<span class='notice'>\The [src] pings softly.</span>", blind_message = "<span class='danger'>You hear what you think is a microwave finishing.</span>")
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.")