diff --git a/code/__HELPERS/_logging.dm b/code/__HELPERS/_logging.dm index 4dd590d9a1..0aa9476fad 100644 --- a/code/__HELPERS/_logging.dm +++ b/code/__HELPERS/_logging.dm @@ -120,6 +120,10 @@ if (CONFIG_GET(flag/log_vote)) WRITE_LOG(GLOB.world_game_log, "VOTE: [text]") +/proc/log_craft(text) + if (CONFIG_GET(flag/log_craft)) + WRITE_LOG(GLOB.world_crafting_log, "CRAFT: [text]") + /proc/log_topic(text) WRITE_LOG(GLOB.world_game_log, "TOPIC: [text]") diff --git a/code/_globalvars/logging.dm b/code/_globalvars/logging.dm index 2a97c596b2..a13a958ef7 100644 --- a/code/_globalvars/logging.dm +++ b/code/_globalvars/logging.dm @@ -32,6 +32,8 @@ GLOBAL_VAR(world_map_error_log) GLOBAL_PROTECT(world_map_error_log) GLOBAL_VAR(subsystem_log) GLOBAL_PROTECT(subsystem_log) +GLOBAL_VAR(world_crafting_log) +GLOBAL_PROTECT(world_crafting_log) GLOBAL_LIST_EMPTY(bombers) GLOBAL_PROTECT(bombers) diff --git a/code/controllers/configuration/entries/general.dm b/code/controllers/configuration/entries/general.dm index 2a08ce77a8..2b3d9d2f72 100644 --- a/code/controllers/configuration/entries/general.dm +++ b/code/controllers/configuration/entries/general.dm @@ -43,6 +43,8 @@ /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 diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 4180681754..8065cd5723 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -202,6 +202,7 @@ if(O) O.setDir(usr.dir) use(R.req_amount * multiplier) + log_craft("[O] crafted by [usr] at [loc_name(O.loc)]") //START: oh fuck i'm so sorry if(istype(O, /obj/structure/windoor_assembly)) diff --git a/code/game/world.dm b/code/game/world.dm index df0eba70cd..7afaf62bb8 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -116,6 +116,7 @@ GLOBAL_LIST(topic_status_cache) GLOB.query_debug_log = "[GLOB.log_directory]/query_debug.log" GLOB.world_job_debug_log = "[GLOB.log_directory]/job_debug.log" GLOB.subsystem_log = "[GLOB.log_directory]/subsystem.log" + GLOB.world_crafting_log = "[GLOB.log_directory]/crafting.log" #ifdef UNIT_TESTS GLOB.test_log = file("[GLOB.log_directory]/tests.log") @@ -131,6 +132,7 @@ GLOBAL_LIST(topic_status_cache) start_log(GLOB.world_runtime_log) start_log(GLOB.world_job_debug_log) start_log(GLOB.subsystem_log) + start_log(GLOB.world_crafting_log) GLOB.changelog_hash = md5('html/changelog.html') //for telling if the changelog has changed recently if(fexists(GLOB.config_error_log)) diff --git a/code/modules/crafting/craft.dm b/code/modules/crafting/craft.dm index 0e14f9f5be..9f14b07bb5 100644 --- a/code/modules/crafting/craft.dm +++ b/code/modules/crafting/craft.dm @@ -158,6 +158,7 @@ I.CheckParts(parts, R) if(send_feedback) SSblackbox.record_feedback("tally", "object_crafted", 1, I.type) + log_craft("[I] crafted by [user] at [loc_name(I.loc)]") return 0 return "." return ", missing tool." diff --git a/config/config.txt b/config/config.txt index fafb3e5791..a89827809f 100644 --- a/config/config.txt +++ b/config/config.txt @@ -110,6 +110,9 @@ LOG_GAME ## log player votes LOG_VOTE +## log player crafting +LOG_CRAFT + ## log client Whisper LOG_WHISPER