From 139565a05d4f8b1a1ef888f364c1b3c31ccd8279 Mon Sep 17 00:00:00 2001 From: Flleeppyy Date: Sat, 7 Feb 2026 17:10:15 -0800 Subject: [PATCH 1/2] Use cooldowns for this --- code/__DEFINES/cooldowns.dm | 2 ++ code/modules/client/preferences.dm | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/code/__DEFINES/cooldowns.dm b/code/__DEFINES/cooldowns.dm index d9501c3defb..62d7496cfcb 100644 --- a/code/__DEFINES/cooldowns.dm +++ b/code/__DEFINES/cooldowns.dm @@ -53,6 +53,8 @@ #define COOLDOWN_DECLARE(cd_index) var/##cd_index = 0 +#define STATIC_COOLDOWN_DECLARE(cd_index) var/static/##cd_index = 0 + #define COOLDOWN_START(cd_source, cd_index, cd_time) (cd_source.cd_index = world.time + (cd_time)) //Returns true if the cooldown has run its course, false otherwise diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index aebcb318cd9..8bfd8a4aaf5 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -14,7 +14,7 @@ var/db_flags - var/save_load_cooldown + COOLDOWN_DECLARE(save_load_cooldown) var/list/exp = list() @@ -129,10 +129,10 @@ return 1 /datum/preferences/proc/check_cooldown() - if(save_load_cooldown != world.time && (save_load_cooldown + PREF_SAVELOAD_COOLDOWN > world.time)) + if(!COOLDOWN_FINISHED(src, save_load_cooldown)) return FALSE - save_load_cooldown = world.time + COOLDOWN_START(src, save_load_cooldown, PREF_SAVELOAD_COOLDOWN) return TRUE From 5daba23a60f27d429016d3f4765df139e8090982 Mon Sep 17 00:00:00 2001 From: Flleeppyy Date: Sat, 7 Feb 2026 17:11:10 -0800 Subject: [PATCH 2/2] remove warnings --- code/modules/admin/verbs/playsound.dm | 4 ---- 1 file changed, 4 deletions(-) diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm index b5c3662e2e0..188b78f8001 100644 --- a/code/modules/admin/verbs/playsound.dm +++ b/code/modules/admin/verbs/playsound.dm @@ -1,6 +1,5 @@ var/list/sounds_cache = list() -#warn test Play Sound /client/proc/play_sound(S as sound) set category = "Fun" set name = "Play Global Sound" @@ -37,7 +36,6 @@ var/list/sounds_cache = list() SSblackbox.record_feedback("tally", "admin_verb", 1, "Play Global Sound") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -#warn test Play Local Sound /client/proc/play_local_sound(S as sound) set category = "Admin.Fun" set name = "Play Local Sound" @@ -49,7 +47,6 @@ var/list/sounds_cache = list() playsound(get_turf(src.mob), S, 50, FALSE, FALSE) SSblackbox.record_feedback("tally", "admin_verb", 1, "Play Local Sound") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -#warn test Play Direct Mob Sound /client/proc/play_direct_mob_sound(S as sound, mob/M) set category = "Admin.Fun" set name = "Play Direct Mob Sound" @@ -165,7 +162,6 @@ var/list/sounds_cache = list() SSblackbox.record_feedback("tally", "admin_verb", 1, "Play Internet Sound") -#warn test Play Internet Sound /client/proc/play_web_sound() set category = "Admin.Fun" set name = "Play Internet Sound"