mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-11 16:14:08 +01:00
Merge pull request #712 from dumpdavidson/EMP_radios
Radios more vulnerable to EMP (Issue #711)
This commit is contained in:
@@ -20,6 +20,11 @@
|
||||
keyslot1 = new /obj/item/device/encryptionkey/
|
||||
recalculateChannels()
|
||||
|
||||
/obj/item/device/radio/headset/talk_into(mob/living/M as mob, message, channel)
|
||||
if (!listening)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/device/radio/headset/receive_range(freq, level)
|
||||
if(ishuman(src.loc))
|
||||
var/mob/living/carbon/human/H = src.loc
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
on = 0
|
||||
else
|
||||
var/area/A = src.loc.loc
|
||||
if(!A || !isarea(A) || !A.master)
|
||||
if(!A || !isarea(A) || !A.master || emped)
|
||||
on = 0
|
||||
else
|
||||
on = A.master.powered(EQUIP) // set "on" to the power status
|
||||
|
||||
@@ -24,6 +24,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
var/subspace_transmission = 0
|
||||
var/syndie = 0//Holder to see if it's a syndicate encrpyed radio
|
||||
var/maxf = 1499
|
||||
var/emped = 0 // since radios don't use machinery stat binary flags they get a seperate variable
|
||||
// "Example" = FREQ_LISTENING|FREQ_BROADCASTING
|
||||
flags = FPRINT | CONDUCT | TABLEPASS
|
||||
slot_flags = SLOT_BELT
|
||||
@@ -83,11 +84,14 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
|
||||
var/dat = ""
|
||||
|
||||
if(!istype(src, /obj/item/device/radio/headset)) //Headsets dont get a mic button
|
||||
dat += "<b>Microphone:</b> [broadcasting ? "<A href='byond://?src=\ref[src];talk=0'>Engaged</A>" : "<A href='byond://?src=\ref[src];talk=1'>Disengaged</A>"]<BR>"
|
||||
|
||||
dat += {"
|
||||
if(!istype(src, /obj/item/device/radio/headset))
|
||||
dat += {"
|
||||
<b>Microphone:</b> [broadcasting ? "<A href='byond://?src=\ref[src];talk=0'>Engaged</A>" : "<A href='byond://?src=\ref[src];talk=1'>Disengaged</A>"]<BR>
|
||||
<b>Speaker:</b> [listening ? "<A href='byond://?src=\ref[src];listen=0'>Engaged</A>" : "<A href='byond://?src=\ref[src];listen=1'>Disengaged</A>"]<BR>
|
||||
"}
|
||||
else //Headsets dont get a mic button, speaker controls both
|
||||
dat += "<b>Power:</b> [listening ? "<A href='byond://?src=\ref[src];listen=0'>Engaged</A>" : "<A href='byond://?src=\ref[src];listen=1'>Disengaged</A>"]<BR>"
|
||||
dat += {"
|
||||
<b>Frequency:</b>
|
||||
<A href='byond://?src=\ref[src];freq=-10'>-</A>
|
||||
<A href='byond://?src=\ref[src];freq=-2'>-</A>
|
||||
@@ -116,8 +120,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
/obj/item/device/radio/proc/text_sec_channel(var/chan_name, var/chan_stat)
|
||||
var/list = !!(chan_stat&FREQ_LISTENING)!=0
|
||||
return {"
|
||||
<B>[chan_name]</B><br>
|
||||
Speaker: <A href='byond://?src=\ref[src];ch_name=[chan_name];listen=[!list]'>[list ? "Engaged" : "Disengaged"]</A><BR>
|
||||
<B>[chan_name]</B>: <A href='byond://?src=\ref[src];ch_name=[chan_name];listen=[!list]'>[list ? "Engaged" : "Disengaged"]</A><BR>
|
||||
"}
|
||||
|
||||
/obj/item/device/radio/Topic(href, href_list)
|
||||
@@ -223,6 +226,8 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
//world << "DEBUG: channel=\"[channel]\" switching to \"[channels[1]]\""
|
||||
channel = channels[1]
|
||||
connection = secure_radio_connections[channel]
|
||||
if (!channels[channel]) // if the channel is turned off, don't broadcast
|
||||
return
|
||||
else
|
||||
connection = radio_connection
|
||||
channel = null
|
||||
@@ -662,10 +667,20 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
else return
|
||||
|
||||
/obj/item/device/radio/emp_act(severity)
|
||||
if (emped == 1) //
|
||||
return
|
||||
if (listening && ismob(loc)) // if the radio is turned on and on someone's person they notice
|
||||
loc << "<span class='warning'>\The [src] overloads.</span>"
|
||||
broadcasting = 0
|
||||
listening = 0
|
||||
for (var/ch_name in channels)
|
||||
channels[ch_name] = 0
|
||||
on = 0
|
||||
spawn(200)
|
||||
emped = 0
|
||||
if (!istype(src, /obj/item/device/radio/intercom)) // intercoms will turn back on on their own
|
||||
on = 1
|
||||
emped = 1
|
||||
..()
|
||||
|
||||
///////////////////////////////
|
||||
|
||||
@@ -62,6 +62,14 @@ should be listed in the changelog upon commit tho. Thanks. -->
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='commit sansserif'>
|
||||
<h2 class='date'>4 June 2013</h2>
|
||||
<h3 class='author'>Dumpdavidson updated:</h3>
|
||||
<ul class='changes bgimages16'>
|
||||
<li class='tweak'>Headsets can no longer broadcast into a channel that is disabled.<br>Headsets now have a button to turn off the power instead of the speaker. This button disables all communication functions.<br>EMPs now force affected radios off for about 20 seconds.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class='commit sansserif'>
|
||||
<h2 class='date'>25 May 2013</h2>
|
||||
|
||||
Reference in New Issue
Block a user