Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions code/__DEFINES/cooldowns.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions code/modules/admin/verbs/playsound.dm
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions code/modules/client/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

var/db_flags

var/save_load_cooldown
COOLDOWN_DECLARE(save_load_cooldown)

var/list/exp = list()

Expand Down Expand Up @@ -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


Expand Down
Loading