mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-20 04:17:33 +01:00
57067892d8
* part 1 * compiles? * IT WORKS * vis contents * fixes * umbrelloid * umbrella 2 * dsasdd * stuff * lmao --------- Co-authored-by: Matt Atlas <liermattia@gmail.com>
24 lines
1.0 KiB
Plaintext
24 lines
1.0 KiB
Plaintext
|
|
GLOBAL_LIST_EMPTY(current_mob_ambience)
|
|
/obj/abstract/weather_system
|
|
|
|
// Weakref lists used to track mobs within our weather
|
|
// system; alternative to keeping big lists of actual mobs or
|
|
// having mobs constantly poked by weather systems.
|
|
|
|
var/tmp/list/mobs_on_cooldown = list() // Has this mob recently been messed with by the weather?
|
|
var/tmp/list/mob_shown_weather = list() // Has this mob been sent the summary message about the current weather?
|
|
var/tmp/list/mob_shown_wind = list() // Has this mob been sent the summary message about the current wind?
|
|
|
|
// 'cooldown' in this context refers to weather effects like hail damage or being shown cosmetic messages.
|
|
/obj/abstract/weather_system/proc/set_cooldown(var/mob/living/M, var/delay = 5 SECONDS)
|
|
var/mobref = WEAKREF(M)
|
|
if(!(mobref in mobs_on_cooldown))
|
|
mobs_on_cooldown[mobref] = TRUE
|
|
addtimer(CALLBACK(src, PROC_REF(clear_cooldown), mobref), delay)
|
|
return TRUE
|
|
return FALSE
|
|
|
|
/obj/abstract/weather_system/proc/clear_cooldown(var/mobref)
|
|
mobs_on_cooldown -= mobref
|