From 61d21b3caba5d575dae54aee88b11000593c4399 Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Thu, 8 Dec 2011 22:02:46 -0700 Subject: [PATCH] Added the ability for borgs to ude departmental radios --- code/game/objects/radio/radio.dm | 2 +- code/modules/mob/living/say.dm | 2 +- code/modules/mob/living/silicon/robot/robot.dm | 6 ++++++ code/modules/mob/living/silicon/say.dm | 10 +++++++--- config/admins.txt | 2 +- 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/code/game/objects/radio/radio.dm b/code/game/objects/radio/radio.dm index d451662c597..1a0307fd97c 100644 --- a/code/game/objects/radio/radio.dm +++ b/code/game/objects/radio/radio.dm @@ -407,7 +407,7 @@ for (var/ch_name in channels) radio_controller.remove_object(src, radiochannels[ch_name]) secure_radio_connections = new - channels = list() + channels = op for (var/ch_name in op) secure_radio_connections[ch_name] = radio_controller.add_object(src, radiochannels[ch_name], RADIO_CHAT) return diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 962800892f4..d44ed6d422e 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -117,7 +117,7 @@ if (message_mode) message = trim(copytext(message, 3)) if (!ishuman(src) && (message_mode=="department" || (message_mode in radiochannels))) - message_mode = null //only humans can use headsets + message_mode = null //only humans can use headsets if (!message) return diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 82cc5efa84d..59fc7a2dbb0 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -88,12 +88,14 @@ else icon_state = "Service2" modtype = "Butler" + radio.borg(src, list()) if("Miner") module = new /obj/item/weapon/robot_module/miner(src) hands.icon_state = "miner" icon_state = "Miner" modtype = "Miner" + radio.borg(src, list("Mining" = 1)) if("Medical") var/sprite = input(src,"Chassis Style", "Chassis Style", "Cancel") in list("Humanoid","Non-Humanoid") @@ -104,6 +106,7 @@ if (sprite == "Non-Humanoid") src.icon_state = "surgeon" modtype = "Med" + radio.borg(src, list("Medical" = 1)) if("Security") var/sprite = input(src,"Chassis Style", "Chassis Style", "Cancel") in list("Humanoid","Non-Humanoid") @@ -114,6 +117,7 @@ if (sprite == "Non-Humanoid") src.icon_state = "bloodhound" modtype = "Sec" + radio.borg(src, list("Security" = 1)) if("Engineering") var/sprite = input(src,"Chassis Style", "Chassis Style", "Cancel") in list("Humanoid","Non-Humanoid") @@ -124,6 +128,7 @@ if (sprite == "Non-Humanoid") src.icon_state = "landmate" modtype = "Eng" + radio.borg(src, list("Engineering" = 1)) if("Janitor") var/sprite = input(src,"Chassis Style", "Chassis Style", "Cancel") in list("Humanoid","Non-Humanoid") @@ -134,6 +139,7 @@ if (sprite == "Non-Humanoid") src.icon_state = "mopgearrex" modtype = "Jan" + radio.borg(src, list()) overlays -= "eyes" //Takes off the eyes that it started with updateicon() diff --git a/code/modules/mob/living/silicon/say.dm b/code/modules/mob/living/silicon/say.dm index 6108dd392ba..53577373c05 100644 --- a/code/modules/mob/living/silicon/say.dm +++ b/code/modules/mob/living/silicon/say.dm @@ -26,9 +26,13 @@ message = copytext(message, 3) message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) holopad_talk(message) - else//Will not allow anyone by an active AI to use this function. - src << "This function is not available to you." - return + else if(istype(src,/mob/living/silicon/robot)) //Will not allow anyone by an active AI to use this function. + message = copytext(message, 3) + message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) + var/mob/living/silicon/robot/R = src + R.radio.talk_into(src, message, "department") + else + src << "You cannot use that channel." else return ..(message) else diff --git a/config/admins.txt b/config/admins.txt index 063b55edc49..1f94f129b12 100644 --- a/config/admins.txt +++ b/config/admins.txt @@ -4,7 +4,7 @@ cacophony - Game Admin cajoes - Game Admin cib - Game Master compactninja - Game Master -headswe - Game Master +skymarshal - Game Master iaryni - Game Master masterofapples - Game Admin megacaesar - Game Admin