Having an infection raises your body temperature

Also the toxin damage taken during INFECTION_LEVEL_ONE is greatly
reduced.
Fixes robotic internal organs getting infections.
Fixes the organ_failure random event. Forgot to set the affected organ
as needing processing.
This commit is contained in:
mwerezak
2014-06-21 16:55:07 -04:00
parent b9fa433087
commit 1a57ed7355
3 changed files with 14 additions and 6 deletions

View File

@@ -40,4 +40,6 @@ datum/event/organ_failure/start()
else
O.germ_level = max(rand(INFECTION_LEVEL_ONE,INFECTION_LEVEL_ONE*2), O.germ_level)
C.bad_external_organs |= O
severity--

View File

@@ -357,12 +357,14 @@ This function completely restores a damaged organ to perfect condition.
if(germ_level >= INFECTION_LEVEL_ONE)
//having an infection raises your body temperature
var/temperature_increase = (owner.species.heat_level_1 - owner.species.body_temperature - 1)* min(germ_level/INFECTION_LEVEL_THREE, 1)
if (owner.bodytemperature < temperature_increase)
var/fever_temperature = (owner.species.heat_level_1 - owner.species.body_temperature - 1)* min(germ_level/INFECTION_LEVEL_THREE, 1) + owner.species.body_temperature
if (owner.bodytemperature < fever_temperature)
//world << "fever: [owner.bodytemperature] < [fever_temperature], raising temperature."
owner.bodytemperature++
if(prob(round(germ_level/10))) //aiming for a light infection to become serious after 40 minutes, standing still
germ_level++
if (prob(5))
germ_level++
owner.adjustToxLoss(1)
if(germ_level >= INFECTION_LEVEL_TWO)

View File

@@ -37,6 +37,10 @@
if (!germ_level)
return
if (robotic >= 2) //TODO make robotic internal and external organs separate types of organ instead of a flag
germ_level = 0
return
var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin")
if (germ_level > 0 && antibiotics > 5)