diff --git a/code/__HELPERS/_logging.dm b/code/__HELPERS/_logging.dm index 4bc9ccaacd..25b5334a2b 100644 --- a/code/__HELPERS/_logging.dm +++ b/code/__HELPERS/_logging.dm @@ -109,6 +109,10 @@ if (CONFIG_GET(flag/log_attack)) WRITE_LOG(GLOB.world_attack_log, "ATTACK: [text]") +/proc/log_victim(text) + if (CONFIG_GET(flag/log_victim)) + WRITE_LOG(GLOB.world_victim_log, "VICTIM: [text]") + /proc/log_manifest(ckey, datum/mind/mind,mob/body, latejoin = FALSE) if (CONFIG_GET(flag/log_manifest)) WRITE_LOG(GLOB.world_manifest_log, "[ckey] \\ [body.real_name] \\ [mind.assigned_role] \\ [mind.special_role ? mind.special_role : "NONE"] \\ [latejoin ? "LATEJOIN":"ROUNDSTART"]") diff --git a/code/_globalvars/logging.dm b/code/_globalvars/logging.dm index 843eab6fb0..f445843364 100644 --- a/code/_globalvars/logging.dm +++ b/code/_globalvars/logging.dm @@ -11,6 +11,8 @@ GLOBAL_VAR(world_qdel_log) GLOBAL_PROTECT(world_qdel_log) GLOBAL_VAR(world_attack_log) GLOBAL_PROTECT(world_attack_log) +GLOBAL_VAR(world_victim_log) +GLOBAL_PROTECT(world_victim_log) // GLOBAL_VAR(world_econ_log) // GLOBAL_PROTECT(world_econ_log) GLOBAL_VAR(world_href_log) diff --git a/code/controllers/configuration/entries/logging.dm b/code/controllers/configuration/entries/logging.dm index 54bd5cb713..e9fe04f2d4 100644 --- a/code/controllers/configuration/entries/logging.dm +++ b/code/controllers/configuration/entries/logging.dm @@ -1,88 +1,119 @@ -/datum/config_entry/flag/log_ooc // log OOC channel +/// log OOC channel +/datum/config_entry/flag/log_ooc config_entry_value = TRUE -/datum/config_entry/flag/log_access // log login/logout +/// log login/logout +/datum/config_entry/flag/log_access config_entry_value = TRUE /// Config entry which special logging of failed logins under suspicious circumstances. /datum/config_entry/flag/log_suspicious_login config_entry_value = TRUE -/datum/config_entry/flag/log_say // log client say +/// log client say +/datum/config_entry/flag/log_say config_entry_value = TRUE -/datum/config_entry/flag/log_admin // log admin actions +/// log admin actions +/datum/config_entry/flag/log_admin protection = CONFIG_ENTRY_LOCKED config_entry_value = TRUE -/datum/config_entry/flag/log_prayer // log prayers +/// log prayers +/datum/config_entry/flag/log_prayer config_entry_value = TRUE -/datum/config_entry/flag/log_law // log lawchanges +/// log lawchanges +/datum/config_entry/flag/log_law config_entry_value = TRUE -/datum/config_entry/flag/log_game // log game events +/// log game events +/datum/config_entry/flag/log_game config_entry_value = TRUE -/datum/config_entry/flag/log_virus // log virology data +/// log virology data +/datum/config_entry/flag/log_virus config_entry_value = TRUE -/datum/config_entry/flag/log_vote // log voting +/// log voting +/datum/config_entry/flag/log_vote config_entry_value = TRUE -/datum/config_entry/flag/log_craft // log crafting +/// log crafting +/datum/config_entry/flag/log_craft config_entry_value = TRUE -/datum/config_entry/flag/log_whisper // log client whisper +/// log client whisper +/datum/config_entry/flag/log_whisper config_entry_value = TRUE -/datum/config_entry/flag/log_attack // log attack messages +/// log attack messages +/datum/config_entry/flag/log_attack config_entry_value = TRUE -/datum/config_entry/flag/log_emote // log emotes +/// log attack messages +/datum/config_entry/flag/log_victim config_entry_value = TRUE -/datum/config_entry/flag/log_adminchat // log admin chat messages +/// log emotes +/datum/config_entry/flag/log_emote + config_entry_value = TRUE + +/// log admin chat messages +/datum/config_entry/flag/log_adminchat protection = CONFIG_ENTRY_LOCKED -/datum/config_entry/flag/log_shuttle // log shuttle related actions, ie shuttle computers, shuttle manipulator, emergency console +/// log shuttle related actions, ie shuttle computers, shuttle manipulator, emergency console +/datum/config_entry/flag/log_shuttle config_entry_value = TRUE -/datum/config_entry/flag/log_pda // log pda messages +/// log pda messages +/datum/config_entry/flag/log_pda config_entry_value = TRUE -/datum/config_entry/flag/log_telecomms // log telecomms messages +/// log telecomms messages +/datum/config_entry/flag/log_telecomms config_entry_value = TRUE -/datum/config_entry/flag/log_twitter // log certain expliotable parrots and other such fun things in a JSON file of twitter valid phrases. +/// log certain expliotable parrots and other such fun things in a JSON file of twitter valid phrases. +/datum/config_entry/flag/log_twitter config_entry_value = TRUE -/datum/config_entry/flag/log_world_topic // log all world.Topic() calls +/// log all world.Topic() calls +/datum/config_entry/flag/log_world_topic config_entry_value = TRUE -/datum/config_entry/flag/log_manifest // log crew manifest to seperate file +/// log crew manifest to seperate file +/datum/config_entry/flag/log_manifest config_entry_value = TRUE -/datum/config_entry/flag/log_job_debug // log roundstart divide occupations debug information to a file +/// log roundstart divide occupations debug information to a file +/datum/config_entry/flag/log_job_debug config_entry_value = TRUE +/// log photos taken by players with a camera /datum/config_entry/flag/log_pictures +/// This is... shitcode, literally same as above, if one of them is inactive, won't log at all, PLEASE FUCKING REMOVE THIS. /datum/config_entry/flag/picture_logging_camera /// forces log_href for tgui /datum/config_entry/flag/emergency_tgui_logging config_entry_value = FALSE -/datum/config_entry/number/error_cooldown // The "cooldown" time for each occurrence of a unique error +/// The "cooldown" time for each occurrence of a unique error +/datum/config_entry/number/error_cooldown config_entry_value = 600 min_val = 0 -/datum/config_entry/number/error_limit // How many occurrences before the next will silence them +/// How many occurrences before the next will silence them +/datum/config_entry/number/error_limit config_entry_value = 50 -/datum/config_entry/number/error_silence_time // How long a unique error will be silenced for +/// How long a unique error will be silenced for +/datum/config_entry/number/error_silence_time config_entry_value = 6000 -/datum/config_entry/number/error_msg_delay // How long to wait between messaging admins about occurrences of a unique error +/// How long to wait between messaging admins about occurrences of a unique error +/datum/config_entry/number/error_msg_delay config_entry_value = 50 diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm index dbec6c6ee2..b5a7a38915 100644 --- a/code/datums/status_effects/debuffs.dm +++ b/code/datums/status_effects/debuffs.dm @@ -1005,11 +1005,15 @@ /datum/status_effect/trance/proc/hypnotize(datum/source, list/hearing_args) if(!owner.can_hear()) return - if(hearing_args[HEARING_SPEAKER] == owner) + var/mob/hearing_speaker = hearing_args[HEARING_SPEAKER] + if(hearing_speaker == owner) return var/mob/living/carbon/C = owner var/hypnomsg = uncostumize_say(hearing_args[HEARING_RAW_MESSAGE], hearing_args[HEARING_MESSAGE_MODE]) C.cure_trauma_type(/datum/brain_trauma/hypnosis, TRAUMA_RESILIENCE_SURGERY) //clear previous hypnosis + // The brain trauma itself does its own set of logging, but this is the only place the source of the hypnosis phrase can be found. + hearing_speaker.log_message("has hypnotised [key_name(C)] with the phrase '[hypnomsg]'", LOG_ATTACK) + C.log_message("has been hypnotised by the phrase '[hypnomsg]' spoken by [key_name(hearing_speaker)]", LOG_VICTIM, log_globally = FALSE) addtimer(CALLBACK(C, /mob/living/carbon.proc/gain_trauma, /datum/brain_trauma/hypnosis, TRAUMA_RESILIENCE_SURGERY, hypnomsg), 10) addtimer(CALLBACK(C, /mob/living.proc/Stun, 60, TRUE, TRUE), 15) //Take some time to think about it qdel(src) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 925ac41a0b..6d600eefa1 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -1215,7 +1215,7 @@ if(user != target) var/reverse_message = "has been [what_done] by [ssource][postfix]" - target.log_message(reverse_message, LOG_ATTACK, color="orange", log_globally=FALSE) + target.log_message(reverse_message, LOG_VICTIM, color="orange", log_globally=FALSE) /** * log_wound() is for when someone is *attacked* and suffers a wound. Note that this only captures wounds from damage, so smites/forced wounds aren't logged, as well as demotions like cuts scabbing over diff --git a/code/game/objects/items/implants/implantchair.dm b/code/game/objects/items/implants/implantchair.dm index 7b05cf302e..e32acd105e 100644 --- a/code/game/objects/items/implants/implantchair.dm +++ b/code/game/objects/items/implants/implantchair.dm @@ -189,5 +189,7 @@ return FALSE brainwash(C, objective) message_admins("[ADMIN_LOOKUPFLW(user)] brainwashed [key_name_admin(C)] with objective '[objective]'.") + user.log_message("has brainwashed [key_name(C)] with the objective '[objective]' using \the [src]", LOG_ATTACK) + C.log_message("has been brainwashed with the objective '[objective]' by [key_name(user)] using \the [src]", LOG_VICTIM, log_globally = FALSE) log_game("[key_name(user)] brainwashed [key_name(C)] with objective '[objective]'.") return TRUE diff --git a/code/game/world.dm b/code/game/world.dm index af11b7c93e..75f145b048 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -115,6 +115,7 @@ GLOBAL_LIST(topic_status_cache) GLOB.world_virus_log = "[GLOB.log_directory]/virus.log" GLOB.world_asset_log = "[GLOB.log_directory]/asset.log" GLOB.world_attack_log = "[GLOB.log_directory]/attack.log" + GLOB.world_victim_log = "[GLOB.log_directory]/victim.log" GLOB.world_pda_log = "[GLOB.log_directory]/pda.log" GLOB.world_telecomms_log = "[GLOB.log_directory]/telecomms.log" GLOB.world_manifest_log = "[GLOB.log_directory]/manifest.log" diff --git a/code/modules/antagonists/brainwashing/brainwashing.dm b/code/modules/antagonists/brainwashing/brainwashing.dm index bd7a9a43cb..65c58611cb 100644 --- a/code/modules/antagonists/brainwashing/brainwashing.dm +++ b/code/modules/antagonists/brainwashing/brainwashing.dm @@ -73,7 +73,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) + C.log_message("has been force-brainwashed with the objective '[obj_list]' by admin [key_name(admin)]", LOG_VICTIM) log_admin("[key_name(admin)] has brainwashed [key_name(C)] with the following objectives: [obj_list].") /datum/objective/brainwashing diff --git a/code/modules/surgery/advanced/brainwashing.dm b/code/modules/surgery/advanced/brainwashing.dm index 28103f7f97..2a09fd2b93 100644 --- a/code/modules/surgery/advanced/brainwashing.dm +++ b/code/modules/surgery/advanced/brainwashing.dm @@ -49,6 +49,8 @@ to_chat(target, "A new compulsion fills your mind... you feel forced to obey it!") brainwash(target, objective) message_admins("[ADMIN_LOOKUPFLW(user)] surgically brainwashed [ADMIN_LOOKUPFLW(target)] with the objective '[objective]'.") + user.log_message("has brainwashed [key_name(target)] with the objective '[objective]' using brainwashing surgery.", LOG_ATTACK) + target.log_message("has been brainwashed with the objective '[objective]' by [key_name(user)] using brainwashing surgery.", LOG_VICTIM, log_globally=FALSE) log_game("[key_name(user)] surgically brainwashed [key_name(target)] with the objective '[objective]'.") return TRUE diff --git a/config/entries/logging.txt b/config/entries/logging.txt index 31692afccb..6483a371f0 100644 --- a/config/entries/logging.txt +++ b/config/entries/logging.txt @@ -34,6 +34,9 @@ LOG_EMOTE ## log attack messages LOG_ATTACK +## log victim messages +LOG_VICTIM + ## log pda messages LOG_PDA