mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Make the global announcer really global
This commit is contained in:
@@ -55,6 +55,10 @@ var/global/datum/controller/subsystem/ticker/ticker
|
|||||||
/datum/controller/subsystem/ticker/Initialize()
|
/datum/controller/subsystem/ticker/Initialize()
|
||||||
pregame_timeleft = config.pregame_time
|
pregame_timeleft = config.pregame_time
|
||||||
send2mainirc("Server lobby is loaded and open at byond://[config.serverurl ? config.serverurl : (config.server ? config.server : "[world.address]:[world.port]")]")
|
send2mainirc("Server lobby is loaded and open at byond://[config.serverurl ? config.serverurl : (config.server ? config.server : "[world.address]:[world.port]")]")
|
||||||
|
|
||||||
|
// Set up the global announcer
|
||||||
|
GLOB.autospeaker = new (null, null, null, 1)
|
||||||
|
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/datum/controller/subsystem/ticker/fire(resumed = FALSE)
|
/datum/controller/subsystem/ticker/fire(resumed = FALSE)
|
||||||
|
|||||||
@@ -284,7 +284,10 @@ var/global/list/default_medbay_channels = list(
|
|||||||
if(.)
|
if(.)
|
||||||
SSnanoui.update_uis(src)
|
SSnanoui.update_uis(src)
|
||||||
|
|
||||||
|
GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer)
|
||||||
/obj/item/device/radio/proc/autosay(var/message, var/from, var/channel, var/list/zlevels) //BS12 EDIT
|
/obj/item/device/radio/proc/autosay(var/message, var/from, var/channel, var/list/zlevels) //BS12 EDIT
|
||||||
|
if(!GLOB.autospeaker)
|
||||||
|
return
|
||||||
var/datum/radio_frequency/connection = null
|
var/datum/radio_frequency/connection = null
|
||||||
if(channel && channels && channels.len > 0)
|
if(channel && channels && channels.len > 0)
|
||||||
if(channel == "department")
|
if(channel == "department")
|
||||||
@@ -299,9 +302,8 @@ var/global/list/default_medbay_channels = list(
|
|||||||
if(!LAZYLEN(zlevels))
|
if(!LAZYLEN(zlevels))
|
||||||
zlevels = list(0)
|
zlevels = list(0)
|
||||||
|
|
||||||
var/static/mob/living/silicon/ai/announcer/A = new /mob/living/silicon/ai/announcer(src, null, null, 1)
|
GLOB.autospeaker.SetName(from)
|
||||||
A.SetName(from)
|
Broadcast_Message(connection, GLOB.autospeaker,
|
||||||
Broadcast_Message(connection, A,
|
|
||||||
0, "*garbled automated announcement*", src,
|
0, "*garbled automated announcement*", src,
|
||||||
message_to_multilingual(message), from, "Automated Announcement", from, "synthesized voice",
|
message_to_multilingual(message), from, "Automated Announcement", from, "synthesized voice",
|
||||||
DATA_FAKE, 0, zlevels, connection.frequency, "states")
|
DATA_FAKE, 0, zlevels, connection.frequency, "states")
|
||||||
|
|||||||
Reference in New Issue
Block a user