tg changes
This commit is contained in:
@@ -205,9 +205,33 @@
|
||||
else
|
||||
return returned
|
||||
|
||||
|
||||
///Callback called by a timer to end an associative-list-indexed cooldown.
|
||||
/**
|
||||
* Callback called by a timer to end an associative-list-indexed cooldown.
|
||||
*
|
||||
* Arguments:
|
||||
* * source - datum storing the cooldown
|
||||
* * index - string index storing the cooldown on the cooldowns associative list
|
||||
*
|
||||
* This sends a signal reporting the cooldown end.
|
||||
*/
|
||||
/proc/end_cooldown(datum/source, index)
|
||||
if(QDELETED(source))
|
||||
return
|
||||
COOLDOWN_END(source, index)
|
||||
SEND_SIGNAL(source, COMSIG_CD_STOP(index))
|
||||
TIMER_COOLDOWN_END(source, index)
|
||||
|
||||
|
||||
/**
|
||||
* Proc used by stoppable timers to end a cooldown before the time has ran out.
|
||||
*
|
||||
* Arguments:
|
||||
* * source - datum storing the cooldown
|
||||
* * index - string index storing the cooldown on the cooldowns associative list
|
||||
*
|
||||
* This sends a signal reporting the cooldown end, passing the time left as an argument.
|
||||
*/
|
||||
/proc/reset_cooldown(datum/source, index)
|
||||
if(QDELETED(source))
|
||||
return
|
||||
SEND_SIGNAL(source, COMSIG_CD_RESET(index), S_TIMER_COOLDOWN_TIMELEFT(source, index))
|
||||
TIMER_COOLDOWN_END(source, index)
|
||||
|
||||
Reference in New Issue
Block a user