Replaces all occurrences of the between() proc with the native clamp() proc

This commit is contained in:
Arvenius169
2021-06-02 17:31:05 -04:00
parent 65b70a878d
commit 1202954e09
9 changed files with 19 additions and 19 deletions
+2 -2
View File
@@ -164,7 +164,7 @@
if(germ_level >= INFECTION_LEVEL_ONE)
var/fever_temperature = (owner.dna.species.heat_level_1 - owner.dna.species.body_temperature - 5) * min(germ_level / INFECTION_LEVEL_TWO, 1) + owner.dna.species.body_temperature
owner.bodytemperature += between(0, (fever_temperature - T20C) / BODYTEMP_COLD_DIVISOR + 1, fever_temperature - owner.bodytemperature)
owner.bodytemperature += clamp((fever_temperature - T20C) / BODYTEMP_COLD_DIVISOR + 1, 0, fever_temperature - owner.bodytemperature)
if(germ_level >= INFECTION_LEVEL_TWO)
var/obj/item/organ/external/parent = owner.get_organ(parent_organ)
@@ -208,7 +208,7 @@
/obj/item/organ/proc/receive_damage(amount, silent = 0)
if(tough)
return
damage = between(0, damage + amount, max_damage)
damage = clamp(damage + amount, 0, max_damage)
//only show this if the organ is not robotic
if(owner && parent_organ && amount > 0)