Fixes germ_level going negative (#11850)

This commit is contained in:
Doxxmedearly
2021-05-08 03:42:40 -03:00
committed by GitHub
parent 05e6bffa13
commit febf264361
2 changed files with 9 additions and 3 deletions
+3 -3
View File
@@ -326,11 +326,11 @@
if(antibiotics >= 5)
germ_level = 0 //just finish up this small infection
else
germ_level -= antibiotics * 5 //Clears very quickly, finishing up remnants of infection
germ_level = max(germ_level - (antibiotics * 5), 0) //Clears very quickly, finishing up remnants of infection
else if(germ_level <= INFECTION_LEVEL_TWO)
germ_level -= min(antibiotics, 6) //Still quick, infection's not too bad. At max dose and germ_level 500, should take a minute or two
germ_level = max(germ_level - min(antibiotics, 6), 0) //Still quick, infection's not too bad. At max dose and germ_level 500, should take a minute or two
else
germ_level -= min(antibiotics * 0.5, 3) //Big infections, very slow to stop. At max dose and germ_level 1000, should take five to six minutes
germ_level = max(germ_level - min(antibiotics * 0.5, 3), 0) //Big infections, very slow to stop. At max dose and germ_level 1000, should take five to six minutes
//Adds autopsy data for used_weapon.
/obj/item/organ/proc/add_autopsy_data(var/used_weapon, var/damage)