From c67ea2c1e4d8a4a8bc95b38295b6bd0e4c4bc31d Mon Sep 17 00:00:00 2001 From: Markolie Date: Sun, 2 Nov 2014 22:58:19 +0100 Subject: [PATCH] Fixes an issue where borgs who have their power cell removed or damaged are still able to see and move. The expected behaviour should be that they turn blind and are unable to move, which is what happens when a borg runs out of charge completely. Per http://nanotrasen.se/phpBB3/viewtopic.php?f=13&t=2748 --- code/modules/mob/living/silicon/robot/life.dm | 10 ++++++---- .../modules/mob/living/silicon/robot/robot_movement.dm | 7 ++++++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index 815c598bc1f..1eb397d48c6 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -37,7 +37,8 @@ if (is_component_functioning("power cell") && cell) if(src.cell.charge <= 0) uneq_all() - src.stat = 1 + src.stat = 1 + Paralyse(3) else if(src.module_state_1) src.cell.use(3) @@ -56,7 +57,8 @@ src.stat = 0 else uneq_all() - src.stat = 1 + src.stat = 1 + Paralyse(3) /mob/living/silicon/robot/proc/handle_regular_status_updates() @@ -129,12 +131,12 @@ if (src.stat != 0) uneq_all() - if(!is_component_functioning("radio")) + if(!is_component_functioning("radio") || src.stat == 1) radio.on = 0 else radio.on = 1 - if(is_component_functioning("camera")) + if(is_component_functioning("camera") && src.stat == 0) src.blinded = 0 else src.blinded = 1 diff --git a/code/modules/mob/living/silicon/robot/robot_movement.dm b/code/modules/mob/living/silicon/robot/robot_movement.dm index c3b7d43c05c..fc47e0c3d11 100644 --- a/code/modules/mob/living/silicon/robot/robot_movement.dm +++ b/code/modules/mob/living/silicon/robot/robot_movement.dm @@ -23,4 +23,9 @@ return tally+config.robot_delay /mob/living/silicon/robot/Move() - ..() \ No newline at end of file + if (!is_component_functioning("actuator") || !is_component_functioning("power cell") || !cell) + return + + else + if (src.cell.charge > 0) + ..() \ No newline at end of file