mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 04:27:35 +01:00
Replaces all occurrences of the between() proc with the native clamp() proc
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user