mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2026-08-27 22:57:47 +01:00
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:
co-authored by
silicons
LordME
parent
9f1b911556
commit
39bc14bb4a
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user