This commit is contained in:
Shadowlight213
2016-07-31 20:00:10 -07:00
parent ec1279c31f
commit 23c9acdc62
13 changed files with 137 additions and 66 deletions
@@ -85,5 +85,5 @@
// Damages the component. Contains necessary checks. Negative damage "heals" the component.
/obj/item/weapon/computer_hardware/proc/take_damage(var/amount)
damage += round(amount) // We want nice rounded numbers here.
damage = between(0, damage, max_damage) // Clamp the value.
damage = max(0, min(damage, max_damage)) // Clamp the value.