between() -> clamp() & swaps args 1 and 2 in uses

This commit is contained in:
Spookerton
2024-02-05 15:47:07 +00:00
parent dfac4a77fe
commit ebbf0e33fb
68 changed files with 137 additions and 146 deletions
@@ -84,4 +84,4 @@
// Damages the component. Contains necessary checks. Negative damage "heals" the component.
/obj/item/computer_hardware/take_damage(var/amount)
damage += round(amount) // We want nice rounded numbers here.
damage = between(0, damage, max_damage) // Clamp the value.
damage = clamp(damage, 0, max_damage) // Clamp the value.