reimplements attack and player logs (#19313)

* reomplements attack and player logs

* right log cat

* updates logging, makesDB optional

* regex serarch

* .

* .

* .

* sucks

* db load

* .

* .

* db logging
This commit is contained in:
Kashargul
2026-03-19 22:37:45 +01:00
committed by GitHub
parent 861b270c25
commit 6c768b06ec
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