mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-22 05:25:15 +01:00
Make server announcement OOC [NO GBP] (#80741)
## About The Pull Request Makes the server admin announcement use tgchat's OOC colors and stops using announcement.ogg, so players don't mistake it for a Centcom announcement.   ## Why It's Good For The Game Melbert was right. ## Changelog 🆑 LT3 fix: OOC announcements will now be in shown in OOC colors /🆑
This commit is contained in:
@@ -72,6 +72,7 @@
|
||||
#define span_linkify(str) ("<span class='linkify'>" + str + "</span>")
|
||||
#define span_looc(str) ("<span class='looc'>" + str + "</span>")
|
||||
#define span_major_announcement_text(str) ("<span class='major_announcement_text'>" + str + "</span>")
|
||||
#define span_major_announcement_title(str) ("<span class='major_announcement_title'>" + str + "</span>")
|
||||
#define span_medal(str) ("<span class='medal'>" + str + "</span>")
|
||||
#define span_medradio(str) ("<span class='medradio'>" + str + "</span>")
|
||||
#define span_memo(str) ("<span class='memo'>" + str + "</span>")
|
||||
@@ -88,6 +89,7 @@
|
||||
#define span_notice(str) ("<span class='notice'>" + str + "</span>")
|
||||
#define span_noticealien(str) ("<span class='noticealien'>" + str + "</span>")
|
||||
#define span_ooc(str) ("<span class='ooc'>" + str + "</span>")
|
||||
#define span_ooc_announcement_text(str) ("<span class='ooc_announcement_text'>" + str + "</span>")
|
||||
#define span_papyrus(str) ("<span class='papyrus'>" + str + "</span>")
|
||||
#define span_phobia(str) ("<span class='phobia'>" + str + "</span>")
|
||||
#define span_prefix(str) ("<span class='prefix'>" + str + "</span>")
|
||||
@@ -121,6 +123,7 @@
|
||||
#define span_spiderbroodmother(str) ("<span class='spiderbroodmother'>" + str + "</span>")
|
||||
#define span_spiderscout(str) ("<span class='spiderscout'>" + str + "</span>")
|
||||
#define span_spiderbreacher(str) ("<span class='spiderbreacher'>" + str + "</span>")
|
||||
#define span_subheader_announcement_text(str) ("<span class='subheader_announcement_text'>" + str + "</span>")
|
||||
#define span_suicide(str) ("<span class='suicide'>" + str + "</span>")
|
||||
#define span_suppradio(str) ("<span class='suppradio'>" + str + "</span>")
|
||||
#define span_syndradio(str) ("<span class='syndradio'>" + str + "</span>")
|
||||
|
||||
@@ -21,16 +21,15 @@
|
||||
* * color_override - optional, set a color for the announcement box
|
||||
*/
|
||||
|
||||
/proc/send_formatted_announcement(
|
||||
/proc/send_ooc_announcement(
|
||||
text,
|
||||
title = "",
|
||||
players,
|
||||
play_sound = TRUE,
|
||||
sound_override = 'sound/ai/default/attention.ogg',
|
||||
sound_override = 'sound/misc/bloop.ogg',
|
||||
sender_override = "Server Admin Announcement",
|
||||
encode_title = TRUE,
|
||||
encode_text = TRUE,
|
||||
color_override = "grey",
|
||||
)
|
||||
if(isnull(text))
|
||||
return
|
||||
@@ -44,9 +43,10 @@
|
||||
if(!length(text))
|
||||
return
|
||||
|
||||
announcement_strings += span_announcement_header(generate_unique_announcement_header(title, sender_override))
|
||||
announcement_strings += span_major_announcement_text(text)
|
||||
var/finalized_announcement = create_announcement_div(jointext(announcement_strings, ""), color_override)
|
||||
announcement_strings += span_major_announcement_title(sender_override)
|
||||
announcement_strings += span_subheader_announcement_text(title)
|
||||
announcement_strings += span_ooc_announcement_text(text)
|
||||
var/finalized_announcement = create_ooc_announcement_div(jointext(announcement_strings, ""))
|
||||
|
||||
if(islist(players))
|
||||
for(var/mob/target in players)
|
||||
@@ -72,5 +72,7 @@
|
||||
* * color - optional, set a div color other than default
|
||||
*/
|
||||
/proc/create_announcement_div(message, color = "default")
|
||||
var/processed_message = "<div class='chat_alert_[color]'>[message]</div>"
|
||||
return processed_message
|
||||
return "<div class='chat_alert_[color]'>[message]</div>"
|
||||
|
||||
/proc/create_ooc_announcement_div(message)
|
||||
return "<div class='ooc_alert'>[message]</div>"
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
if(message)
|
||||
if(!check_rights(R_SERVER,0))
|
||||
message = adminscrub(message,500)
|
||||
send_formatted_announcement(message, "From [usr.client.holder.fakekey ? "Administrator" : usr.key]")
|
||||
send_ooc_announcement(message, "From [usr.client.holder.fakekey ? "Administrator" : usr.key]")
|
||||
log_admin("Announce: [key_name(usr)] : [message]")
|
||||
BLACKBOX_LOG_ADMIN_VERB("Announce")
|
||||
|
||||
|
||||
@@ -1064,6 +1064,24 @@ $border-width-px: $border-width * 1px;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.ooc_alert {
|
||||
background: #4d4100;
|
||||
border: 1px solid #cca300;
|
||||
margin: 0.5em;
|
||||
padding: 0.5em 0.5em 0.5em 0.2em;
|
||||
color: #ffffff;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.ooc_announcement_text {
|
||||
color: #cca300;
|
||||
padding: 0.5em 0 0 0.35em;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
@each $color-name, $color-value in $alert-stripe-colors {
|
||||
.chat_alert_#{$color-name} {
|
||||
color: #ffffff;
|
||||
|
||||
@@ -1091,6 +1091,24 @@ $border-width-px: $border-width * 1px;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.ooc_alert {
|
||||
background: #bdc8ff;
|
||||
border: 1px solid #002eb8;
|
||||
margin: 0.5em;
|
||||
padding: 0.5em 0.5em 0.5em 0.2em;
|
||||
color: #00283a;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.ooc_announcement_text {
|
||||
color: #002eb8;
|
||||
padding: 0.5em 0 0 0.35em;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
@each $color-name, $color-value in $alert-stripe-colors {
|
||||
.chat_alert_#{$color-name} {
|
||||
color: #ffffff;
|
||||
|
||||
Reference in New Issue
Block a user