From 18f01ba2b377f51e8387587b992a7863d7aad00b Mon Sep 17 00:00:00 2001 From: Tigercat2000 Date: Wed, 14 Oct 2015 08:35:24 -0700 Subject: [PATCH 1/3] Radio NanoUI improvements This commit does the following: - Adds radio coloring to the channel names, ex, security is red, service is green. - Removes the broken "Speaker:" part of headsets, if the purpose of on-off buttons is not clear enough, they shouldn't be using radios in the first place! --- .../game/objects/items/devices/radio/radio.dm | 4 ++-- nano/templates/radio_basic.tmpl | 22 +++++++++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 1ef94fde8d2..ce4f7dc2346 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -144,7 +144,7 @@ var/global/list/default_medbay_channels = list( var/chan_stat = channels[ch_name] var/listening = !!(chan_stat & FREQ_LISTENING) != 0 - dat.Add(list(list("chan" = ch_name, "display_name" = ch_name, "secure_channel" = 1, "sec_channel_listen" = !listening))) + dat.Add(list(list("chan" = ch_name, "display_name" = ch_name, "secure_channel" = 1, "sec_channel_listen" = !listening, "chan_span" = frequency_span_class(radiochannels[ch_name])))) return dat @@ -152,7 +152,7 @@ var/global/list/default_medbay_channels = list( var/dat[0] for(var/internal_chan in internal_channels) if(has_channel_access(user, internal_chan)) - dat.Add(list(list("chan" = internal_chan, "display_name" = get_frequency_name(text2num(internal_chan))))) + dat.Add(list(list("chan" = internal_chan, "display_name" = get_frequency_name(text2num(internal_chan)), "chan_span" = frequency_span_class(text2num(internal_chan))))) return dat diff --git a/nano/templates/radio_basic.tmpl b/nano/templates/radio_basic.tmpl index 9aaad8cb489..603bbd6416f 100644 --- a/nano/templates/radio_basic.tmpl +++ b/nano/templates/radio_basic.tmpl @@ -2,6 +2,25 @@ Title: Basic Radio UI Used In File(s): /code/game/objects/item/devices/radio/radio.dm --> + + + + + + {{if data.useSyndMode}} {{:helper.syndicateMode()}} {{/if}} @@ -73,11 +92,10 @@ Used In File(s): /code/game/objects/item/devices/radio/radio.dm
{{for data.chan_list}}
- {{:value.display_name}} + {{:value.display_name}}
{{if value.secure_channel}} - Speaker:  {{:helper.link('On', null, {'ch_name' : value.chan, 'listen' : value.sec_channel_listen}, value.sec_channel_listen ? null : 'selected')}} {{:helper.link('Off', null, {'ch_name' : value.chan, 'listen' : value.sec_channel_listen}, value.sec_channel_listen ? 'selected' : null)}} {{else}} From ea2ce322c8fdc1144ebf7a76668fc1add7b1fb74 Mon Sep 17 00:00:00 2001 From: Tigercat2000 Date: Thu, 15 Oct 2015 15:48:21 -0700 Subject: [PATCH 2/3] Color Tweaks --- nano/templates/radio_basic.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nano/templates/radio_basic.tmpl b/nano/templates/radio_basic.tmpl index 603bbd6416f..73e12caa40a 100644 --- a/nano/templates/radio_basic.tmpl +++ b/nano/templates/radio_basic.tmpl @@ -6,7 +6,7 @@ Used In File(s): /code/game/objects/item/devices/radio/radio.dm From 6eb06baf5ac6bb70f7fbebba74ed7a22a5adfd03 Mon Sep 17 00:00:00 2001 From: Tigercat2000 Date: Fri, 16 Oct 2015 14:12:07 -0700 Subject: [PATCH 3/3] Grab @PsiOmegaDelta's improvements and fixes. --- nano/templates/radio_basic.tmpl | 46 ++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/nano/templates/radio_basic.tmpl b/nano/templates/radio_basic.tmpl index 73e12caa40a..73d37df8a70 100644 --- a/nano/templates/radio_basic.tmpl +++ b/nano/templates/radio_basic.tmpl @@ -26,10 +26,10 @@ Used In File(s): /code/game/objects/item/devices/radio/radio.dm {{/if}}
-
+
Microphone
-
+
{{if data.mic_cut}} {{:helper.link('On', null, null, 'disabled')}} {{:helper.link('Off', null, null, 'disabled')}} @@ -41,10 +41,10 @@ Used In File(s): /code/game/objects/item/devices/radio/radio.dm
-
+
Speaker
-
+
{{if data.spk_cut}} {{:helper.link('On', null, null, 'disabled')}} {{:helper.link('Off', null, null, 'disabled')}} @@ -56,30 +56,34 @@ Used In File(s): /code/game/objects/item/devices/radio/radio.dm
{{if data.has_subspace}} -
- Subspace Transmission: -
-
- {{:helper.link('On', null, {'mode' : 1}, data.subspace ? 'selected' : null)}} - {{:helper.link('Off', null, {'mode' : 0}, data.subspace ? null : 'selected')}} +
+
+ Subspace Transmission: +
+
+ {{:helper.link('On', null, {'mode' : 1}, data.subspace ? 'selected' : null)}} + {{:helper.link('Off', null, {'mode' : 0}, data.subspace ? null : 'selected')}} +
{{/if}} {{if data.has_loudspeaker}} -
- Loudspeaker: -
-
- {{:helper.link('On', null, {'shutup' : 0}, data.loudspeaker ? 'selected' : null)}} - {{:helper.link('Off', null, {'shutup' : 1}, data.loudspeaker ? null : 'selected')}} +
+
+ Loudspeaker: +
+
+ {{:helper.link('On', null, {'shutup' : 0}, data.loudspeaker ? 'selected' : null)}} + {{:helper.link('Off', null, {'shutup' : 1}, data.loudspeaker ? null : 'selected')}} +
{{/if}}
-
+
Frequency: {{:data.freq}}
-
+
{{:helper.link('--', null, {'freq' : -10})}} {{:helper.link('-', null, {'freq' : -2})}} {{:helper.link('+', null, {'freq' : 2})}} @@ -91,10 +95,10 @@ Used In File(s): /code/game/objects/item/devices/radio/radio.dm

Channels

{{for data.chan_list}} -
- {{:value.display_name}} +
+ {{:value.display_name}}
-
+
{{if value.secure_channel}} {{:helper.link('On', null, {'ch_name' : value.chan, 'listen' : value.sec_channel_listen}, value.sec_channel_listen ? null : 'selected')}} {{:helper.link('Off', null, {'ch_name' : value.chan, 'listen' : value.sec_channel_listen}, value.sec_channel_listen ? 'selected' : null)}}