From 6f8fc5125d461dbd409222a72ce4502363f2706b Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Tue, 15 Mar 2022 10:24:46 -0700 Subject: [PATCH 1/6] Update space.dm --- code/_rendering/parallax/types/space.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/_rendering/parallax/types/space.dm b/code/_rendering/parallax/types/space.dm index 38ad62aede..1a6cf191cb 100644 --- a/code/_rendering/parallax/types/space.dm +++ b/code/_rendering/parallax/types/space.dm @@ -17,7 +17,7 @@ P.pixel_x = planet_offset_x P.pixel_y = planet_offset_y . += P - if(random_layer) + if(ispath(random_layer, /atom/movable/screen/parallax_layer)) . += new random_layer if(ispath(random_layer, /atom/movable/screen/parallax_layer/space/random/space_gas)) var/atom/movable/screen/parallax_layer/space/random/space_gas/SG = locate(random_layer) in objects From 37fef7fbbae5f7b815578309ebbc183f5e412aad Mon Sep 17 00:00:00 2001 From: SandPoot Date: Wed, 16 Mar 2022 15:33:31 -0300 Subject: [PATCH 2/6] Upload files --- code/__HELPERS/_logging.dm | 4 + .../configuration/entries/logging.dm | 81 +++++++++++++------ config/entries/logging.txt | 3 + 3 files changed, 63 insertions(+), 25 deletions(-) diff --git a/code/__HELPERS/_logging.dm b/code/__HELPERS/_logging.dm index 4bc9ccaacd..44e877dbf4 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/victim)) + WRITE_LOG(GLOB.world_attack_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/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/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 From baee52349b156c8f77b4b49671f43b1429fbbb24 Mon Sep 17 00:00:00 2001 From: SandPoot Date: Wed, 16 Mar 2022 15:41:07 -0300 Subject: [PATCH 3/6] Upload files --- code/datums/status_effects/debuffs.dm | 3 +++ code/game/atoms.dm | 2 +- code/game/objects/items/implants/implantchair.dm | 2 ++ code/modules/antagonists/brainwashing/brainwashing.dm | 2 +- code/modules/surgery/advanced/brainwashing.dm | 2 ++ 5 files changed, 9 insertions(+), 2 deletions(-) diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm index dbec6c6ee2..2d0a095f5b 100644 --- a/code/datums/status_effects/debuffs.dm +++ b/code/datums/status_effects/debuffs.dm @@ -1010,6 +1010,9 @@ 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 '[hearing_args[HEARING_RAW_MESSAGE]]'", LOG_ATTACK) + C.log_message("has been hypnotised by the phrase '[hearing_args[HEARING_RAW_MESSAGE]]' 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/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 From 4da5a57688ba1786d60b03dd6113073201a3abc4 Mon Sep 17 00:00:00 2001 From: SandPoot Date: Wed, 16 Mar 2022 18:33:32 -0300 Subject: [PATCH 4/6] global --- code/__HELPERS/_logging.dm | 4 ++-- code/_globalvars/logging.dm | 2 ++ code/datums/status_effects/debuffs.dm | 7 ++++--- code/game/world.dm | 1 + 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/code/__HELPERS/_logging.dm b/code/__HELPERS/_logging.dm index 44e877dbf4..25b5334a2b 100644 --- a/code/__HELPERS/_logging.dm +++ b/code/__HELPERS/_logging.dm @@ -110,8 +110,8 @@ WRITE_LOG(GLOB.world_attack_log, "ATTACK: [text]") /proc/log_victim(text) - if (CONFIG_GET(flag/victim)) - WRITE_LOG(GLOB.world_attack_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)) 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/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm index 2d0a095f5b..b5a7a38915 100644 --- a/code/datums/status_effects/debuffs.dm +++ b/code/datums/status_effects/debuffs.dm @@ -1005,14 +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 '[hearing_args[HEARING_RAW_MESSAGE]]'", LOG_ATTACK) - C.log_message("has been hypnotised by the phrase '[hearing_args[HEARING_RAW_MESSAGE]]' spoken by [key_name(hearing_speaker)]", LOG_VICTIM, log_globally = FALSE) + 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/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" From 043f6ddf5e1239cf88ff40160a780cf9cbcd66ed Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Thu, 17 Mar 2022 19:00:29 -0500 Subject: [PATCH 5/6] Automatic changelog generation for PR #15559 [ci skip] --- html/changelogs/AutoChangeLog-pr-15559.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-15559.yml diff --git a/html/changelogs/AutoChangeLog-pr-15559.yml b/html/changelogs/AutoChangeLog-pr-15559.yml new file mode 100644 index 0000000000..530b44d2b5 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-15559.yml @@ -0,0 +1,4 @@ +author: "SandPoot" +delete-after: True +changes: + - bugfix: "Fixed LOG_VICTIM." From fe59c7c2be8ab20f8af0b91970e5e31e16a71de5 Mon Sep 17 00:00:00 2001 From: Changelogs Date: Fri, 18 Mar 2022 00:37:38 +0000 Subject: [PATCH 6/6] Automatic changelog compile [ci skip] --- html/changelogs/AutoChangeLog-pr-15559.yml | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 html/changelogs/AutoChangeLog-pr-15559.yml diff --git a/html/changelogs/AutoChangeLog-pr-15559.yml b/html/changelogs/AutoChangeLog-pr-15559.yml deleted file mode 100644 index 530b44d2b5..0000000000 --- a/html/changelogs/AutoChangeLog-pr-15559.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "SandPoot" -delete-after: True -changes: - - bugfix: "Fixed LOG_VICTIM."