Merge pull request #6428 from atlantiscze/cyborg-power

Cyborg power overhaul
This commit is contained in:
Chinsky
2014-09-25 00:19:13 +04:00
14 changed files with 316 additions and 114 deletions
@@ -682,9 +682,12 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
//Giving borgs their own radio to have some more room to work with -Sieve
/obj/item/device/radio/borg
var/mob/living/silicon/robot/myborg = null // Cyborg which owns this radio. Used for power checks
var/obj/item/device/encryptionkey/keyslot = null//Borg radios can handle a single encryption key
var/shut_up = 0
icon = 'icons/obj/robot_component.dmi' // Cyborgs radio icons should look like the component.
icon_state = "radio"
canhear_range = 3
/obj/item/device/radio/borg/attackby(obj/item/weapon/W as obj, mob/user as mob)
// ..()
@@ -774,6 +777,13 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
channels = list()
else
recalculateChannels()
if (href_list["shutup"]) // Toggle loudspeaker mode, AKA everyone around you hearing your radio.
shut_up = !shut_up
if(shut_up)
canhear_range = 0
else
canhear_range = 3
..()
/obj/item/device/radio/borg/interact(mob/user as mob)
@@ -790,6 +800,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
<A href='byond://?src=\ref[src];freq=2'>+</A>
<A href='byond://?src=\ref[src];freq=10'>+</A><BR>
<A href='byond://?src=\ref[src];mode=1'>Toggle Broadcast Mode</A><BR>
<A href='byond://?src=\ref[src];shutup=1'>Toggle Loudspeaker</A><BR>
"}
if(!subspace_transmission)//Don't even bother if subspace isn't turned on