mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-21 21:10:30 +01:00
Updates Loadout Backend (#18095)
* Updates Loadout Backend Updates the loadout backend to store gear data in a separate table. This might enable us to increase the number of loadout points available * Bump MariaDB Version to 10.11 * Update editorconfig for SQL * Fix update_character_gear * tgui_alert and TOPIC_NOACTION * Fix missing sur * Actually, its user * Adds a CHECK_TICK, just in case --------- Co-authored-by: Werner <Arrow768@users.noreply.github.com>
This commit is contained in:
@@ -153,7 +153,7 @@
|
||||
handle_sql_loading(SQL_CHARACTER)
|
||||
|
||||
for(var/datum/category_item/player_setup_item/PI in items)
|
||||
PI.load_special(S)
|
||||
PI.load_character_special(S)
|
||||
PI.sanitize_character(GLOB.config.sql_saves)
|
||||
|
||||
/datum/category_group/player_setup_category/proc/save_character(var/savefile/S)
|
||||
@@ -161,10 +161,14 @@
|
||||
for (var/datum/category_item/player_setup_item/PI in items)
|
||||
PI.sanitize_character()
|
||||
|
||||
if (!GLOB.config.sql_saves || !establish_db_connection(GLOB.dbcon))
|
||||
for (var/datum/category_item/player_setup_item/PI in items)
|
||||
var/db_available = GLOB.config.sql_saves && establish_db_connection(GLOB.dbcon)
|
||||
|
||||
for (var/datum/category_item/player_setup_item/PI in items)
|
||||
PI.save_character_special(S)
|
||||
if(!db_available)
|
||||
PI.save_character(S)
|
||||
else if (modified)
|
||||
|
||||
if (db_available && modified)
|
||||
// No save here, because this is only called from the menu and needs to save /everything/.
|
||||
handle_sql_saving(SQL_CHARACTER)
|
||||
modified = 0
|
||||
@@ -238,17 +242,23 @@
|
||||
return
|
||||
|
||||
/*
|
||||
* Called no matter if sql safes are enabled or disabled
|
||||
* Called no matter if sql saves are enabled or disabled (After load_character)
|
||||
*/
|
||||
/datum/category_item/player_setup_item/proc/load_special(var/savefile/S)
|
||||
/datum/category_item/player_setup_item/proc/load_character_special(var/savefile/S)
|
||||
return
|
||||
|
||||
/*
|
||||
* Called when the item is asked to save per character settings
|
||||
* Called when the item is asked to save per character settings - Only called when sql saves are disabled or unavailable
|
||||
*/
|
||||
/datum/category_item/player_setup_item/proc/save_character(var/savefile/S)
|
||||
return
|
||||
|
||||
/*
|
||||
* Called no matter if sql saves are enabled or disabled (Before save_character / handle_sql_saving)
|
||||
*/
|
||||
/datum/category_item/player_setup_item/proc/save_character_special(var/savefile/S)
|
||||
return
|
||||
|
||||
/*
|
||||
* Called when the item is asked to load user/global settings
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user