mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-17 10:03:50 +01:00
Moves pAI saves to the DB
This commit is contained in:
@@ -114,6 +114,9 @@
|
||||
/// Is the client watchlisted
|
||||
var/watchlisted = FALSE
|
||||
|
||||
/// Client's pAI save
|
||||
var/datum/pai_save/pai_save
|
||||
|
||||
/client/vv_edit_var(var_name, var_value)
|
||||
switch(var_name)
|
||||
// I know we will never be in a world where admins are editing client vars to let people bypass TOS
|
||||
|
||||
@@ -287,6 +287,8 @@
|
||||
|
||||
log_client_to_db(tdata) // Make sure our client exists in the DB
|
||||
|
||||
pai_save = new(src)
|
||||
|
||||
// This is where we load all of the clients stuff from the DB
|
||||
if(SSdbcore.IsConnected())
|
||||
// Load in all our client data from the DB
|
||||
@@ -449,6 +451,7 @@
|
||||
GLOB.directory -= ckey
|
||||
GLOB.clients -= src
|
||||
QDEL_NULL(chatOutput)
|
||||
QDEL_NULL(pai_save)
|
||||
if(movingmob)
|
||||
movingmob.client_mobs_in_contents -= mob
|
||||
UNSETEMPTY(movingmob.client_mobs_in_contents)
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
/datum/client_login_processor/pai_save
|
||||
priority = 40
|
||||
|
||||
/datum/client_login_processor/pai_save/get_query(client/C)
|
||||
return C.pai_save.get_query()
|
||||
|
||||
/datum/client_login_processor/pai_save/process_result(datum/db_query/Q, client/C)
|
||||
C.pai_save.load_data(Q)
|
||||
Reference in New Issue
Block a user