mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-14 16:44:33 +01:00
Adds a noisy deletion timer to autosay mobs
so we don't have silent failure
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user