From 55bdf1c3cebf4c464943d7a6e93fe006ea02fef4 Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Fri, 29 Apr 2016 18:08:57 -0700 Subject: [PATCH 1/5] Adds a noisy deletion timer to autosay mobs so we don't have silent failure --- code/game/objects/items/devices/radio/radio.dm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 415f604758a..0a98cfe5fc9 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -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. From 95123e5360890183e630a102d9c6f09343a037ee Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Fri, 29 Apr 2016 18:11:43 -0700 Subject: [PATCH 2/5] Makes the message better --- code/game/objects/items/devices/radio/radio.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 0a98cfe5fc9..a7b45580016 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -275,7 +275,7 @@ var/global/list/default_medbay_channels = list( ..() /mob/living/automatedannouncer/proc/autocleanup() - log_debug("An announcer somehow managed to outlive the radio! Deleting! Area: [get_area(src)], Loc: [src.locs[1]]" + log_debug("An announcer somehow managed to outlive the radio! Deleting! Area: [get_area(src)], Loc: [src.loc.loc]" qdel(src) // Interprets the message mode when talking into a radio, possibly returning a connection datum From df583c0196a7a1bef12f79a9b4befd0968ea3d39 Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Fri, 29 Apr 2016 18:14:10 -0700 Subject: [PATCH 3/5] No runtimes allowed ever --- code/game/objects/items/devices/radio/radio.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index a7b45580016..6edaf58bc7c 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -275,7 +275,7 @@ var/global/list/default_medbay_channels = list( ..() /mob/living/automatedannouncer/proc/autocleanup() - log_debug("An announcer somehow managed to outlive the radio! Deleting! Area: [get_area(src)], Loc: [src.loc.loc]" + log_debug("An announcer somehow managed to outlive the radio! Deleting! Area: [get_area(src)]" qdel(src) // Interprets the message mode when talking into a radio, possibly returning a connection datum From 71c6dfb4b6f09757095f6029b88a92b12d6c2710 Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Fri, 29 Apr 2016 18:15:23 -0700 Subject: [PATCH 4/5] I did something dumb --- code/game/objects/items/devices/radio/radio.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 6edaf58bc7c..9c77b5aaf02 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -275,7 +275,7 @@ var/global/list/default_medbay_channels = list( ..() /mob/living/automatedannouncer/proc/autocleanup() - log_debug("An announcer somehow managed to outlive the radio! Deleting! Area: [get_area(src)]" + log_debug("An announcer somehow managed to outlive the radio! Deleting! Area: [get_area(src)]") qdel(src) // Interprets the message mode when talking into a radio, possibly returning a connection datum From e6258c31cf1b31eea12207e2aee8d09d3d1c3592 Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Sat, 30 Apr 2016 01:42:36 -0700 Subject: [PATCH 5/5] Adds name and message --- code/game/objects/items/devices/radio/radio.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 9c77b5aaf02..741ecfa7fa2 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -251,6 +251,7 @@ var/global/list/default_medbay_channels = list( var/mob/living/automatedannouncer/A = new /mob/living/automatedannouncer(src) A.name = from A.role = role + A.message = message Broadcast_Message(connection, A, 0, "*garbled automated announcement*", src, message, from, "Automated Announcement", from, "synthesized voice", @@ -263,6 +264,7 @@ var/global/list/default_medbay_channels = list( /mob/living/automatedannouncer var/role = "" var/lifetime_timer + var/message = "" universal_speak = 1 /mob/living/automatedannouncer/New() @@ -275,7 +277,7 @@ var/global/list/default_medbay_channels = list( ..() /mob/living/automatedannouncer/proc/autocleanup() - log_debug("An announcer somehow managed to outlive the radio! Deleting! Area: [get_area(src)]") + log_debug("An announcer somehow managed to outlive the radio! Deleting! Area: [get_area(src)], Name: \"[name]\", Message: \"[message]\"") qdel(src) // Interprets the message mode when talking into a radio, possibly returning a connection datum