mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-03 05:52:17 +00:00
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:
@@ -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()
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user