diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index ce5305f7dc..3a3ffd7ea1 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -5,6 +5,7 @@ item_state = "walkietalkie" desc = "A basic handheld radio that communicates with local telecommunication networks." dog_fashion = /datum/dog_fashion/back + var/list/extra_channels = list() //Allows indivudal channels, used for borgs flags_1 = CONDUCT_1 | HEAR_1 slot_flags = ITEM_SLOT_BELT @@ -69,6 +70,11 @@ if(keyslot.independent) independent = TRUE + if(extra_channels) + for(var/ch_name in extra_channels) + if(!(ch_name in channels)) + channels[ch_name] = extra_channels[ch_name] + for(var/ch_name in channels) secure_radio_connections[ch_name] = add_radio(src, GLOB.radiochannels[ch_name]) diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index d7c6dfe479..de2f4635d4 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -16,6 +16,7 @@ var/list/modules = list() //holds all the usable modules var/list/added_modules = list() //modules not inherient to the robot module, are kept when the module changes var/list/storages = list() + var/list/added_channels = list() //Borg radio stuffs var/cyborg_base_icon = "robot" //produces the icon for the borg and, if no special_light_key is set, the lights var/special_light_key //if we want specific lights, use this instead of copying lights in the dmi @@ -236,6 +237,8 @@ R.typing_indicator_state = /obj/effect/overlay/typing_indicator/machine/dogborg else R.typing_indicator_state = /obj/effect/overlay/typing_indicator/machine + R.radio.extra_channels = RM.added_channels + R.radio.recalculateChannels() R.maxHealth = borghealth R.health = min(borghealth, R.health) qdel(src) @@ -322,6 +325,7 @@ /obj/item/robot_module/medical name = "Medical" + added_channels = list(RADIO_CHANNEL_MEDICAL = 1) basic_modules = list( /obj/item/assembly/flash/cyborg, /obj/item/extinguisher/mini, @@ -432,6 +436,7 @@ /obj/item/robot_module/engineering name = "Engineering" + added_channels = list(RADIO_CHANNEL_ENGINEERING = 1) basic_modules = list( /obj/item/assembly/flash/cyborg, /obj/item/borg/sight/meson, @@ -546,6 +551,7 @@ /obj/item/robot_module/security name = "Security" + added_channels = list(RADIO_CHANNEL_SECURITY = 1) basic_modules = list( /obj/item/assembly/flash/cyborg, /obj/item/extinguisher/mini, @@ -648,6 +654,7 @@ /obj/item/robot_module/peacekeeper name = "Peacekeeper" + added_channels = list(RADIO_CHANNEL_SECURITY = 1) basic_modules = list( /obj/item/assembly/flash/cyborg, /obj/item/extinguisher/mini, @@ -734,6 +741,7 @@ /obj/item/robot_module/clown name = "Clown" + added_channels = list(RADIO_CHANNEL_SERVICE = 1) basic_modules = list( /obj/item/assembly/flash/cyborg, /obj/item/extinguisher/mini, @@ -766,6 +774,7 @@ /obj/item/robot_module/butler name = "Service" + added_channels = list(RADIO_CHANNEL_SERVICE = 1) basic_modules = list( /obj/item/assembly/flash/cyborg, /obj/item/extinguisher/mini, @@ -909,6 +918,7 @@ /obj/item/robot_module/miner name = "Miner" + added_channels = list(RADIO_CHANNEL_SUPPLY = 1) basic_modules = list( /obj/item/assembly/flash/cyborg, /obj/item/extinguisher/mini, @@ -999,6 +1009,7 @@ /obj/item/robot_module/syndicate name = "Syndicate Assault" + added_channels = list(RADIO_CHANNEL_SYNDICATE = 1) basic_modules = list( /obj/item/assembly/flash/cyborg, /obj/item/extinguisher/mini, @@ -1029,6 +1040,7 @@ /obj/item/robot_module/syndicate_medical name = "Syndicate Medical" + added_channels = list(RADIO_CHANNEL_SYNDICATE = 1) basic_modules = list( /obj/item/assembly/flash/cyborg, /obj/item/extinguisher/mini, @@ -1061,6 +1073,7 @@ /obj/item/robot_module/saboteur name = "Syndicate Saboteur" + added_channels = list(RADIO_CHANNEL_SYNDICATE = 1) basic_modules = list( /obj/item/assembly/flash/cyborg, /obj/item/borg/sight/thermal,