[MIRROR] reimplements attack and player logs (#12553)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2026-03-19 15:03:53 -07:00
committed by GitHub
parent bb90e792ca
commit 99afe463dc
50 changed files with 411 additions and 270 deletions
@@ -729,7 +729,7 @@
/datum/config_entry/flag/allow_simple_mob_recolor
/// Chatlogs are now saved by calling the chatlogging library instead of letting the clients handle it
/// REQUIRES an database
/// REQUIRES a database
/datum/config_entry/flag/chatlog_database_backend
default = FALSE
@@ -737,6 +737,11 @@
/// REQUIRES chatlog_database_backend to be enabled
/datum/config_entry/string/chatlog_database_api_endpoint
/// Enables logging dialogue and attack logs to the database
/// REQUIRES a database
/datum/config_entry/flag/database_logging
default = FALSE
/datum/config_entry/flag/forbid_admin_profiling
/datum/config_entry/flag/pixel_size_limit
+5
View File
@@ -44,6 +44,11 @@ SUBSYSTEM_DEF(dbcore)
/datum/controller/subsystem/dbcore/Initialize()
Connect()
if(IsConnected() && CONFIG_GET(flag/database_logging))
var/datum/db_query/query_truncate = NewQuery("TRUNCATE erro_dialog")
if(!query_truncate.Execute())
log_sql("ERROR TRYING TO CLEAR erro_dialog: "+query_truncate.ErrorMsg())
qdel(query_truncate)
return SS_INIT_SUCCESS
/datum/controller/subsystem/dbcore/stat_entry(msg)
-1
View File
@@ -41,7 +41,6 @@ SUBSYSTEM_DEF(mobs)
// Lets handle all of these while we have time, should always remain extremely small...
if(length(death_list)) // Don't contact DB if this list is empty
if(CONFIG_GET(flag/sql_enabled))
establish_db_connection()
if(!SSdbcore.IsConnected())
log_game("SQL ERROR during death reporting. Failed to connect.")
else
@@ -20,7 +20,6 @@ SUBSYSTEM_DEF(persist)
if(!CONFIG_GET(flag/time_off))
return
establish_db_connection()
if(!SSdbcore.IsConnected())
src.currentrun.Cut()
return