From 61ab2a5a539a5b2ff9c3e3a0dcdcc3488a35556c Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sat, 13 Feb 2021 19:47:17 -0700 Subject: [PATCH] logging fixes --- .../configuration/entries/general.dm | 48 -------------- .../configuration/entries/logging.dm | 66 +++++++++++++++++++ .../food_and_drinks/food/snacks_pie.dm | 2 +- .../kitchen_machinery/deep_fryer.dm | 2 +- code/modules/pool/pool_controller.dm | 2 +- .../reagents/reagent_containers/dropper.dm | 6 +- .../reagents/reagent_containers/hypospray.dm | 4 +- .../reagents/reagent_containers/rags.dm | 4 +- code/modules/surgery/dental_implant.dm | 2 +- tgstation.dme | 1 + 10 files changed, 78 insertions(+), 59 deletions(-) create mode 100644 code/controllers/configuration/entries/logging.dm diff --git a/code/controllers/configuration/entries/general.dm b/code/controllers/configuration/entries/general.dm index 3c93952b65..4d985c7234 100644 --- a/code/controllers/configuration/entries/general.dm +++ b/code/controllers/configuration/entries/general.dm @@ -26,50 +26,6 @@ /datum/config_entry/flag/hub // if the game appears on the hub or not -/datum/config_entry/flag/log_ooc // log OOC channel - -/datum/config_entry/flag/log_access // log login/logout - -/datum/config_entry/flag/log_say // log client say - -/datum/config_entry/flag/log_admin // log admin actions - protection = CONFIG_ENTRY_LOCKED - -/datum/config_entry/flag/log_prayer // log prayers - -/datum/config_entry/flag/log_law // log lawchanges - -/datum/config_entry/flag/log_game // log game events - -/datum/config_entry/flag/log_virus // log virology data - -/datum/config_entry/flag/log_vote // log voting - -/datum/config_entry/flag/log_craft // log crafting - -/datum/config_entry/flag/log_whisper // log client whisper - -/datum/config_entry/flag/log_attack // log attack messages - -/datum/config_entry/flag/log_emote // log emotes - -/datum/config_entry/flag/log_adminchat // log admin chat messages - protection = CONFIG_ENTRY_LOCKED - -/datum/config_entry/flag/log_shuttle // log shuttle related actions, ie shuttle computers, shuttle manipulator, emergency console - -/datum/config_entry/flag/log_pda // log pda messages - -/datum/config_entry/flag/log_telecomms // log telecomms messages - -/datum/config_entry/flag/log_twitter // log certain expliotable parrots and other such fun things in a JSON file of twitter valid phrases. - -/datum/config_entry/flag/log_world_topic // log all world.Topic() calls - -/datum/config_entry/flag/log_manifest // log crew manifest to seperate file - -/datum/config_entry/flag/log_job_debug // log roundstart divide occupations debug information to a file - /datum/config_entry/flag/allow_admin_ooccolor // Allows admins with relevant permissions to have their own ooc colour /datum/config_entry/flag/allow_vote_restart // allow votes to restart @@ -472,10 +428,6 @@ /datum/config_entry/string/default_view_square config_entry_value = "15x15" -/datum/config_entry/flag/log_pictures - -/datum/config_entry/flag/picture_logging_camera - /datum/config_entry/number/max_bunker_days config_entry_value = 7 min_val = 1 diff --git a/code/controllers/configuration/entries/logging.dm b/code/controllers/configuration/entries/logging.dm new file mode 100644 index 0000000000..88273c6636 --- /dev/null +++ b/code/controllers/configuration/entries/logging.dm @@ -0,0 +1,66 @@ +/datum/config_entry/flag/log_ooc // log OOC channel + config_entry_value = TRUE + +/datum/config_entry/flag/log_access // log login/logout + config_entry_value = TRUE + +/datum/config_entry/flag/log_say // log client say + config_entry_value = TRUE + +/datum/config_entry/flag/log_admin // log admin actions + protection = CONFIG_ENTRY_LOCKED + +/datum/config_entry/flag/log_prayer // log prayers + config_entry_value = TRUE + +/datum/config_entry/flag/log_law // log lawchanges + config_entry_value = TRUE + +/datum/config_entry/flag/log_game // log game events + config_entry_value = TRUE + +/datum/config_entry/flag/log_virus // log virology data + config_entry_value = TRUE + +/datum/config_entry/flag/log_vote // log voting + config_entry_value = TRUE + +/datum/config_entry/flag/log_craft // log crafting + config_entry_value = TRUE + +/datum/config_entry/flag/log_whisper // log client whisper + config_entry_value = TRUE + +/datum/config_entry/flag/log_attack // log attack messages + config_entry_value = TRUE + +/datum/config_entry/flag/log_emote // log emotes + config_entry_value = TRUE + +/datum/config_entry/flag/log_adminchat // log admin chat messages + protection = CONFIG_ENTRY_LOCKED + +/datum/config_entry/flag/log_shuttle // log shuttle related actions, ie shuttle computers, shuttle manipulator, emergency console + config_entry_value = TRUE + +/datum/config_entry/flag/log_pda // log pda messages + config_entry_value = TRUE + +/datum/config_entry/flag/log_telecomms // log telecomms messages + 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. + config_entry_value = TRUE + +/datum/config_entry/flag/log_world_topic // log all world.Topic() calls + config_entry_value = TRUE + +/datum/config_entry/flag/log_manifest // log crew manifest to seperate file + config_entry_value = TRUE + +/datum/config_entry/flag/log_job_debug // log roundstart divide occupations debug information to a file + config_entry_value = TRUE + +/datum/config_entry/flag/log_pictures + +/datum/config_entry/flag/picture_logging_camera diff --git a/code/modules/food_and_drinks/food/snacks_pie.dm b/code/modules/food_and_drinks/food/snacks_pie.dm index a4287d3d19..5329829637 100644 --- a/code/modules/food_and_drinks/food/snacks_pie.dm +++ b/code/modules/food_and_drinks/food/snacks_pie.dm @@ -54,7 +54,7 @@ H.visible_message("[H] is creamed by [src]!", "You've been creamed by [src]!") playsound(H, "desceration", 50, TRUE) if(!H.is_mouth_covered()) - reagents.trans_to(H, 15, log = TRUE) //Cream pie combat + reagents.trans_to(H, 15, log = "creampie hit") //Cream pie combat if(!H.creamed) // one layer at a time H.add_overlay(creamoverlay) H.creamed = TRUE diff --git a/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm b/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm index fecc9467a1..ebde504ec0 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm @@ -79,7 +79,7 @@ God bless America. to_chat(user, "There's nothing to dissolve [I] in!") return user.visible_message("[user] drops [I] into [src].", "You dissolve [I] in [src].") - I.reagents.trans_to(src, I.reagents.total_volume) + I.reagents.trans_to(src, I.reagents.total_volume, log = "pill into deep fryer") qdel(I) return if(istype(I,/obj/item/clothing/head/mob_holder)) diff --git a/code/modules/pool/pool_controller.dm b/code/modules/pool/pool_controller.dm index 17faa7a3e3..9f670de282 100644 --- a/code/modules/pool/pool_controller.dm +++ b/code/modules/pool/pool_controller.dm @@ -146,7 +146,7 @@ return reagents.clear_reagents() // This also reacts them. No nitroglycerin deathpools, sorry gamers :( - W.reagents.trans_to(reagents, max_beaker_transfer) + W.reagents.trans_to(reagents, max_beaker_transfer, log = "pool fill from reagent container") user.visible_message("[src] makes a slurping noise.", "All of the contents of [W] are quickly suctioned out by the machine![user] tries to squirt something into [target]'s eyes, but fails!", \ "[user] tries to squirt something into [target]'s eyes, but fails!") @@ -67,7 +67,7 @@ var/mob/M = target log_combat(user, M, "squirted", reagents.log_list()) - trans = src.reagents.trans_to(target, amount_per_transfer_from_this) + trans = src.reagents.trans_to(target, amount_per_transfer_from_this, log = "dropper drop") to_chat(user, "You transfer [trans] unit\s of the solution.") update_icon() @@ -81,7 +81,7 @@ to_chat(user, "[target] is empty!") return - var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this) + var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this, log = "dropper fill") to_chat(user, "You fill [src] with [trans] unit\s of the solution.") diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index 1f89af420e..143025aed1 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -41,7 +41,7 @@ if(M.reagents) var/trans = 0 if(!infinite) - trans = reagents.trans_to(M, amount_per_transfer_from_this, log = TRUE) + trans = reagents.trans_to(M, amount_per_transfer_from_this, log = "hypospray injection") else trans = reagents.copy_to(M, amount_per_transfer_from_this) @@ -427,7 +427,7 @@ var/fraction = min(vial.amount_per_transfer_from_this/vial.reagents.total_volume, 1) vial.reagents.reaction(L, method, fraction) - vial.reagents.trans_to(target, vial.amount_per_transfer_from_this, log = TRUE) + vial.reagents.trans_to(target, vial.amount_per_transfer_from_this, log = "hypospray fill") var/long_sound = vial.amount_per_transfer_from_this >= 15 playsound(loc, long_sound ? 'sound/items/hypospray_long.ogg' : pick('sound/items/hypospray.ogg','sound/items/hypospray2.ogg'), 50, 1, -1) to_chat(user, "You [fp_verb] [vial.amount_per_transfer_from_this] units of the solution. The hypospray's cartridge now contains [vial.reagents.total_volume] units.") diff --git a/code/modules/reagents/reagent_containers/rags.dm b/code/modules/reagents/reagent_containers/rags.dm index 5d94e78809..8a6e2bf2e7 100644 --- a/code/modules/reagents/reagent_containers/rags.dm +++ b/code/modules/reagents/reagent_containers/rags.dm @@ -39,7 +39,7 @@ C.visible_message("[user] is trying to smother \the [C] with \the [src]!", "[user] is trying to smother you with \the [src]!", "You hear some struggling and muffled cries of surprise.") if(do_after(user, 20, target = C)) reagents.reaction(C, INGEST) - reagents.trans_to(C, 5, log = TRUE) + reagents.trans_to(C, 5, log = "rag smother") C.visible_message("[user] has smothered \the [C] with \the [src]!", "[user] has smothered you with \the [src]!", "You hear some struggling and a heavy breath taken.") log_combat(user, C, "smothered", log_object) else @@ -107,7 +107,7 @@ reagents.clear_reagents() else msg += "'s liquids into \the [target]" - reagents.trans_to(target, reagents.total_volume, log = TRUE) + reagents.trans_to(target, reagents.total_volume, log = "rag squeeze dry") to_chat(user, "[msg].") return TRUE diff --git a/code/modules/surgery/dental_implant.dm b/code/modules/surgery/dental_implant.dm index 311c886c9d..f41f299439 100644 --- a/code/modules/surgery/dental_implant.dm +++ b/code/modules/surgery/dental_implant.dm @@ -36,6 +36,6 @@ log_combat(owner, null, "swallowed an implanted pill", target) if(target.reagents.total_volume) target.reagents.reaction(owner, INGEST) - target.reagents.trans_to(owner, target.reagents.total_volume, log = TRUE) + target.reagents.trans_to(owner, target.reagents.total_volume, log = "dental pill swallow") qdel(target) return 1 diff --git a/tgstation.dme b/tgstation.dme index f733aee27c..45c16fab9d 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -293,6 +293,7 @@ #include "code\controllers\configuration\entries\fail2topic.dm" #include "code\controllers\configuration\entries\game_options.dm" #include "code\controllers\configuration\entries\general.dm" +#include "code\controllers\configuration\entries\logging.dm" #include "code\controllers\configuration\entries\persistence.dm" #include "code\controllers\configuration\entries\plushies.dm" #include "code\controllers\configuration\entries\policy.dm"