Adds a noisy deletion timer to autosay mobs

so we don't have silent failure
This commit is contained in:
Crazylemon64
2016-04-29 18:08:57 -07:00
parent 501fa17958
commit 55bdf1c3ce
@@ -262,8 +262,22 @@ var/global/list/default_medbay_channels = list(
// I'm not sure who thought that was a good idea. -- Crazylemon
/mob/living/automatedannouncer
var/role = ""
var/lifetime_timer
universal_speak = 1
/mob/living/automatedannouncer/New()
lifetime_timer = addtimer(src, "autocleanup", SecondsToTicks(10))
..()
/mob/living/automatedannouncer/Destroy()
if(lifetime_timer)
deltimer(lifetime_timer)
..()
/mob/living/automatedannouncer/proc/autocleanup()
log_debug("An announcer somehow managed to outlive the radio! Deleting! Area: [get_area(src)], Loc: [src.locs[1]]"
qdel(src)
// Interprets the message mode when talking into a radio, possibly returning a connection datum
/obj/item/device/radio/proc/handle_message_mode(mob/living/M as mob, message, message_mode)
// If a channel isn't specified, send to common.