Robust annoucments handling (#16090)

This commit is contained in:
Fluffy
2023-03-24 22:33:40 +01:00
committed by GitHub
parent 1790d593d7
commit 72c56f8cfe
2 changed files with 43 additions and 2 deletions

View File

@@ -48,7 +48,7 @@
var/turf/T = get_turf(M)
if(T)
to_chat(M, msg)
if(message_sound && !isdeaf(M) && (M.client.prefs.sfx_toggles & ASFX_VOX))
if(message_sound && !isdeaf(M) && (M.client?.prefs.sfx_toggles & ASFX_VOX))
sound_to(M, message_sound)
if(do_newscast)
NewsCast(message, message_title)
@@ -113,4 +113,4 @@
AnnounceArrivalSimple(character.real_name, rank, join_message)
/proc/AnnounceArrivalSimple(var/name, var/rank = "visitor", var/join_message = "has arrived on the [current_map.station_type]", var/new_sound = 'sound/misc/announcements/notice.ogg')
global_announcer.autosay("[name], [rank], [join_message].", "Arrivals Announcer")
global_announcer.autosay("[name], [rank], [join_message].", "Arrivals Announcer")