reworks game preferences (characters v2 staging) (#6310)

Co-authored-by: silicons <no@you.cat>
Co-authored-by: LordME <58342752+TheLordME@users.noreply.github.com>
This commit is contained in:
silicons
2024-04-08 12:44:30 +02:00
committed by GitHub
co-authored by silicons LordME
parent 9f1b911556
commit 39bc14bb4a
427 changed files with 3981 additions and 2842 deletions
@@ -15,6 +15,8 @@ SUBSYSTEM_DEF(dbcore)
var/connection // Arbitrary handle returned from rust_g.
var/was_ever_connected = FALSE
/datum/controller/subsystem/dbcore/Initialize()
//We send warnings to the admins during subsystem init, as the clients will be New'd and messages
//will queue properly with goonchat
@@ -95,6 +97,12 @@ SUBSYSTEM_DEF(dbcore)
. = (result["status"] == "ok")
if (.)
connection = result["handle"]
if(was_ever_connected)
// we got re-connected.
for(var/datum/controller/subsystem/subsystem in Master.subsystems)
subsystem.on_sql_reconnect()
world.on_sql_reconnect()
was_ever_connected = TRUE
else
connection = null
last_error = result["data"]
@@ -361,3 +369,9 @@ Delayed insert mode was removed in mysql 7 and only works with MyISAM type table
text = replacetext(text, ";", "")
text = replacetext(text, "&", "")
return text
/**
* Override this proc when you need to hook into it.
*/
/world/proc/on_sql_reconnect()
return