Fixes accent icon text tags not showing up on the radio. (#13861)

This commit is contained in:
Matt Atlas
2022-05-10 22:57:08 +02:00
committed by GitHub
parent 91c5efd33d
commit 869e2cb5e7
3 changed files with 47 additions and 6 deletions
+2 -5
View File
@@ -243,9 +243,6 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
var/list/obj/item/device/radio/radios = list()
// --- Gets the accent icon, if there is any ---
var/accent_icon = M.get_accent_icon(speaking, M)
// --- Broadcast only to intercom devices ---
if(data == 1)
@@ -361,7 +358,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
var/part_b_extra = ""
if(data == 3) // intercepted radio message
part_b_extra = " <i>(Intercepted)</i>"
var/part_a = "<span class='[frequency_span_class(display_freq)]'>[accent_icon ? accent_icon + " " : ""]<b>\[[freq_text]\][part_b_extra]</b> <span class='name'>" // goes in the actual output
var/part_a = "<span class='[frequency_span_class(display_freq)]'>%ACCENT%<b>\[[freq_text]\][part_b_extra]</b> <span class='name'>" // goes in the actual output
// --- Some more pre-message formatting ---
var/part_b = "</span> <span class='message'></span>" // Tweaked for security headsets -- TLE
@@ -424,7 +421,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
/* --- Process all the mobs that heard a masked voice (understood) --- */
//Note that accent tags are handled in hear_radio.
if (length(heard_masked))
for (var/mob/R in heard_masked)
R.hear_radio(message, verbage, speaking, part_a, part_b, part_c, M, 0, name)
+4 -1
View File
@@ -177,7 +177,10 @@
speaker_name = "Unknown"
var/changed_voice
var/accent_icon
var/accent_icon = speaker.get_accent_icon(language, src)
accent_icon = accent_icon ? accent_icon + " " : ""
part_a = replacetext(part_a, "%ACCENT%", accent_icon)
if(istype(src, /mob/living/silicon/ai) && !hard_to_hear)
var/jobname // the mob's "job"
@@ -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: MattAtlas
# 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:
- bugfix: "Accent text tags now show up in the radio."