mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 12:29:46 +01:00
Announcements are only visible on station levels (#6924)
This commit is contained in:
@@ -42,49 +42,46 @@
|
||||
message = sanitize(message, extra = 0)
|
||||
message_title = sanitizeSafe(message_title)
|
||||
|
||||
Message(message, message_title)
|
||||
MessageAndSound(message, message_title, message_sound)
|
||||
if(do_newscast)
|
||||
NewsCast(message, message_title)
|
||||
if(do_print)
|
||||
post_comm_message(message_title, message)
|
||||
Sound(message_sound)
|
||||
Log(message, message_title)
|
||||
|
||||
datum/announcement/proc/Message(message as text, message_title as text)
|
||||
/datum/announcement/proc/MessageAndSound(var/message as text, var/message_title as text, var/message_sound)
|
||||
for(var/mob/M in player_list)
|
||||
if(!istype(M,/mob/abstract/new_player) && !isdeaf(M))
|
||||
to_chat(M, "<h2 class='alert'>[title]</h2>")
|
||||
to_chat(M, "<span class='alert'>[message]</span>")
|
||||
if (announcer)
|
||||
to_chat(M, "<span class='alert'> -[html_encode(announcer)]</span>")
|
||||
var/turf/T = get_turf(M)
|
||||
if(T && isStationLevel(T.z))
|
||||
to_chat(M, "<h2 class='alert'>[title]</h2>")
|
||||
to_chat(M, "<span class='alert'>[message]</span>")
|
||||
if (announcer)
|
||||
to_chat(M, "<span class='alert'> -[html_encode(announcer)]</span>")
|
||||
if(message_sound && !isdeaf(M) && (M.client.prefs.asfx_togs & ASFX_VOX))
|
||||
sound_to(M, message_sound)
|
||||
|
||||
datum/announcement/minor/Message(message as text, message_title as text)
|
||||
/datum/announcement/minor/MessageAndSound(var/message as text, var/message_title as text)
|
||||
to_world("<b>[message]</b>")
|
||||
|
||||
datum/announcement/priority/Message(message as text, message_title as text)
|
||||
to_world("<h1 class='alert'>[message_title]</h1>")
|
||||
to_world("<span class='alert'>[message]</span>")
|
||||
if(announcer)
|
||||
to_world("<span class='alert'> -[html_encode(announcer)]</span>")
|
||||
to_world("<br>")
|
||||
|
||||
datum/announcement/priority/command/Message(message as text, message_title as text)
|
||||
var/command
|
||||
command += "<h1 class='alert'>[current_map.boss_name] Update</h1>"
|
||||
/datum/announcement/priority/command/MessageAndSound(var/message as text, var/message_title as text, var/message_sound)
|
||||
var/command_title
|
||||
command_title += "<h1 class='alert'>[current_map.boss_name] Update</h1>"
|
||||
if (message_title)
|
||||
command += "<br><h2 class='alert'>[message_title]</h2>"
|
||||
command_title += "<br><h2 class='alert'>[message_title]</h2>"
|
||||
|
||||
command += "<br><span class='alert'>[message]</span><br>"
|
||||
command += "<br>"
|
||||
for(var/mob/M in player_list)
|
||||
if(!istype(M,/mob/abstract/new_player) && !isdeaf(M))
|
||||
to_chat(M, command)
|
||||
var/command_body
|
||||
command_body += "<br><span class='alert'>[message]</span><br>"
|
||||
command_body += "<br>"
|
||||
. = ..(command_body, command_title, message_sound)
|
||||
|
||||
datum/announcement/priority/security/Message(message as text, message_title as text)
|
||||
/datum/announcement/priority/security/MessageAndSound(var/message as text, var/message_title as text, var/message_sound)
|
||||
to_world("<font size=4 color='red'>[message_title]</font>")
|
||||
to_world("<font color='red'>[message]</font>")
|
||||
if(message_sound)
|
||||
to_world(message_sound)
|
||||
|
||||
datum/announcement/proc/NewsCast(message as text, message_title as text)
|
||||
/datum/announcement/proc/NewsCast(message as text, message_title as text)
|
||||
if(!newscast)
|
||||
return
|
||||
|
||||
@@ -96,24 +93,7 @@ datum/announcement/proc/NewsCast(message as text, message_title as text)
|
||||
news.can_be_redacted = 0
|
||||
announce_newscaster_news(news)
|
||||
|
||||
datum/announcement/proc/PlaySound(var/message_sound)
|
||||
if(!message_sound)
|
||||
return
|
||||
for(var/mob/M in player_list)
|
||||
if(!istype(M,/mob/abstract/new_player) && !isdeaf(M) && (M.client.prefs.asfx_togs & ASFX_VOX))
|
||||
to_chat(M, message_sound)
|
||||
|
||||
datum/announcement/proc/Sound(var/message_sound)
|
||||
PlaySound(message_sound)
|
||||
|
||||
datum/announcement/priority/Sound(var/message_sound)
|
||||
if(message_sound)
|
||||
to_world(message_sound)
|
||||
|
||||
datum/announcement/priority/command/Sound(var/message_sound)
|
||||
PlaySound(message_sound)
|
||||
|
||||
datum/announcement/proc/Log(message as text, message_title as text)
|
||||
/datum/announcement/proc/Log(message as text, message_title as text)
|
||||
if(log)
|
||||
log_say("[key_name(usr)] has made \a [announcement_type]: [message_title] - [message] - [announcer]",ckey=key_name(usr))
|
||||
message_admins("[key_name_admin(usr)] has made \a [announcement_type].", 1)
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
################################
|
||||
# Example Changelog File
|
||||
#
|
||||
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||
#
|
||||
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||
# When it is, any changes listed below will disappear.
|
||||
#
|
||||
# Valid Prefixes:
|
||||
# bugfix
|
||||
# wip (For works in progress)
|
||||
# tweak
|
||||
# soundadd
|
||||
# sounddel
|
||||
# rscadd (general adding of nice things)
|
||||
# rscdel (general deleting of nice things)
|
||||
# imageadd
|
||||
# imagedel
|
||||
# maptweak
|
||||
# spellcheck (typo fixes)
|
||||
# experiment
|
||||
# balance
|
||||
# admin
|
||||
# backend
|
||||
# security
|
||||
# refactor
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: Arrow768
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
|
||||
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- tweak: "Announcemnts (except alert level changes) are only visible on station levels."
|
||||
Reference in New Issue
Block a user