From 9424d892baf03b74f67e4b694af32131dfb3bbb3 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sun, 19 Oct 2014 00:50:13 -0400 Subject: [PATCH] Fixes robot radio component not using power Also shifts power usage so binary talk uses less power while radio uses more. --- code/game/objects/items/devices/radio/radio.dm | 7 +++++++ code/modules/mob/language.dm | 6 ++++++ code/modules/mob/living/silicon/robot/component.dm | 6 ++++-- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 843ce25b29..c18bb3fe59 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -689,6 +689,13 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use icon_state = "radio" canhear_range = 3 +/obj/item/device/radio/borg/talk_into() + ..() + if (isrobot(src.loc)) + var/mob/living/silicon/robot/R = src.loc + var/datum/robot_component/C = R.components["radio"] + R.cell_use_power(C.active_usage) + /obj/item/device/radio/borg/attackby(obj/item/weapon/W as obj, mob/user as mob) // ..() user.set_machine(src) diff --git a/code/modules/mob/language.dm b/code/modules/mob/language.dm index c94ab17b1a..b49374cecd 100755 --- a/code/modules/mob/language.dm +++ b/code/modules/mob/language.dm @@ -244,6 +244,12 @@ continue M.show_message("synthesised voice beeps, \"beep beep beep\"",2) + //robot binary xmitter component power usage + if (isrobot(speaker)) + var/mob/living/silicon/robot/R = speaker + var/datum/robot_component/C = R.components["comms"] + R.cell_use_power(C.active_usage) + /datum/language/binary/drone name = "Drone Talk" desc = "A heavily encoded damage control coordination stream." diff --git a/code/modules/mob/living/silicon/robot/component.dm b/code/modules/mob/living/silicon/robot/component.dm index b3f0ac7837..d37f05cbe8 100644 --- a/code/modules/mob/living/silicon/robot/component.dm +++ b/code/modules/mob/living/silicon/robot/component.dm @@ -112,7 +112,8 @@ /datum/robot_component/radio name = "radio" external_type = /obj/item/robot_parts/robot_component/radio - active_usage = 10 + idle_usage = 15 //it's not actually possible to tell when we receive a message over our radio, so just use 10W every tick for passive listening + active_usage = 75 //transmit power max_damage = 40 @@ -122,7 +123,8 @@ /datum/robot_component/binary_communication name = "binary communication device" external_type = /obj/item/robot_parts/robot_component/binary_communication_device - active_usage = 10 + idle_usage = 5 + active_usage = 25 max_damage = 30