upstream-merge-16484 [MDB IGNORE] (#9289)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
Selis
2024-10-25 21:39:18 +02:00
committed by GitHub
co-authored by Kashargul
parent b32c1ed032
commit 026253a175
277 changed files with 471452 additions and 36179 deletions
+5 -5
View File
@@ -14,7 +14,7 @@ SUBSYSTEM_DEF(sqlite)
return SS_INIT_SUCCESS // CHOMPEdit
/datum/controller/subsystem/sqlite/proc/connect()
if(!CONFIG_GET(flag/sqlite_enabled)) // CHOMPEdit
if(!CONFIG_GET(flag/sqlite_enabled))
return
if(!sqlite_db)
@@ -104,17 +104,17 @@ SUBSYSTEM_DEF(sqlite)
return !sqlite_check_for_errors(query, "Insert Feedback")
/datum/controller/subsystem/sqlite/proc/can_submit_feedback(client/C)
if(!CONFIG_GET(flag/sqlite_enabled)) // CHOMPEdit
if(!CONFIG_GET(flag/sqlite_enabled))
return FALSE
if(CONFIG_GET(number/sqlite_feedback_min_age) && !is_old_enough(C)) // CHOMPEdit
if(CONFIG_GET(number/sqlite_feedback_min_age) && !is_old_enough(C))
return FALSE
if(CONFIG_GET(number/sqlite_feedback_cooldown) > 0 && get_feedback_cooldown(C.key, CONFIG_GET(number/sqlite_feedback_cooldown), sqlite_db) > 0) // CHOMPEdit
if(CONFIG_GET(number/sqlite_feedback_cooldown) > 0 && get_feedback_cooldown(C.key, CONFIG_GET(number/sqlite_feedback_cooldown), sqlite_db) > 0)
return FALSE
return TRUE
// Returns TRUE if the player is 'old' enough, according to the config.
/datum/controller/subsystem/sqlite/proc/is_old_enough(client/C)
if(get_player_age(C.key) < CONFIG_GET(number/sqlite_feedback_min_age)) // CHOMPEdit
if(get_player_age(C.key) < CONFIG_GET(number/sqlite_feedback_min_age))
return FALSE
return TRUE