Fixed two bugs with robot components.

1. They could be broken but still powered.
2. Melee damage didn't work at all.
This commit is contained in:
cib
2013-07-05 13:43:11 +02:00
parent a1be7e431c
commit f10c08253f
2 changed files with 2 additions and 2 deletions

View File

@@ -50,7 +50,7 @@
electronics_damage = max(0, electronics_damage - electronics)
/datum/robot_component/proc/is_powered()
return installed == 1 && (!energy_consumption || powered)
return (installed == 1) && (brute_damage + electronics_damage < max_damage) && (!energy_consumption || powered)
/datum/robot_component/proc/consume_power()

View File

@@ -56,7 +56,7 @@
/mob/living/silicon/robot/take_organ_damage(var/brute = 0, var/burn = 0, var/sharp = 0)
var/list/components = get_damageable_components()
if(components.len)
if(!components.len)
return
//Combat shielding absorbs a percentage of damage directly into the cell.