diff --git a/code/__DEFINES/span.dm b/code/__DEFINES/span.dm index d1077823858..18ce0a96a71 100644 --- a/code/__DEFINES/span.dm +++ b/code/__DEFINES/span.dm @@ -1,3 +1,6 @@ +// Just a generic span with class +#define span_class(class, str) ("" + str + "") + // Sorted alphabetically #define span_abductor(str) ("" + str + "") #define span_admin(str) ("" + str + "") diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm index 8ad4f0d77d1..578c671bf53 100644 --- a/code/game/objects/items/devices/radio/headset.dm +++ b/code/game/objects/items/devices/radio/headset.dm @@ -47,23 +47,31 @@ GLOBAL_LIST_INIT(channel_tokens, list( /obj/item/radio/headset/examine(mob/user) . = ..() - if(item_flags & IN_INVENTORY && loc == user) - // construction of frequency description - var/list/avail_chans = list("Use [RADIO_KEY_COMMON] for the currently tuned frequency") - if(special_channels & RADIO_SPECIAL_BINARY) - avail_chans += "use [MODE_TOKEN_BINARY] for [MODE_BINARY]" - if(length(channels)) - for(var/i in 1 to length(channels)) - if(i == 1) - avail_chans += "use [MODE_TOKEN_DEPARTMENT] or [GLOB.channel_tokens[channels[i]]] for [LOWER_TEXT(channels[i])]" - else - avail_chans += "use [GLOB.channel_tokens[channels[i]]] for [LOWER_TEXT(channels[i])]" - . += span_notice("A small screen on the headset displays the following available frequencies:\n[english_list(avail_chans)].") - - if(command) - . += span_info("Alt-click to toggle the high-volume mode.") - else + if(!(item_flags & IN_INVENTORY) || loc != user) . += span_notice("A small screen on the headset flashes, it's too small to read without holding or wearing the headset.") + return + + // construction of frequency description + var/list/available_channels = list() + available_channels += "
  • [span_radio(RADIO_KEY_COMMON)] for the currently tuned frequency
  • " + if(special_channels & RADIO_SPECIAL_BINARY) + available_channels += "
  • [span_binarysay(MODE_TOKEN_BINARY)] for [span_binarysay(capitalize(MODE_BINARY))]
  • " + + for(var/i in 1 to length(channels)) + var/channel_name = channels[i] + var/channel_token = GLOB.channel_tokens[channel_name] + var/channel_span_class = get_radio_span(GLOB.radiochannels[channel_name]) + + if(i == 1) + available_channels += "
  • [span_class(channel_span_class, MODE_TOKEN_DEPARTMENT)] or [span_class(channel_span_class, channel_token)] for [span_class(channel_span_class, channel_name)]
  • " + else + available_channels += "
  • [span_class(channel_span_class, channel_token)] for [span_class(channel_span_class, channel_name)]
  • " + + . += span_notice("A small screen on the headset displays the following available frequencies:") + . += span_notice("") + + if(command) + . += span_info("Alt-click to toggle the high-volume mode.") /obj/item/radio/headset/Initialize(mapload) . = ..() diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 25060d23af5..8391edb8319 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -528,7 +528,7 @@ /obj/item/radio/examine(mob/user) . = ..() if (frequency && in_range(src, user)) - . += span_notice("It is set to broadcast over the [frequency/10] frequency.") + . += span_notice("It is set to broadcast over the [span_radio("[frequency/10]")] frequency.") if (unscrewed) . += span_notice("It can be attached and modified.") else