mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-26 01:52:29 +00:00
Fixes #5532 and increases the time required for organs to become infected from wounds
Also removes the now unnecessary get_cure_threshold() proc, caps the rate at which an organ can receive germs from wounds, and makes germs spread from external to internal organs happen one organ at a time instead of all at once.
This commit is contained in:
@@ -32,7 +32,6 @@
|
||||
src.owner = H
|
||||
|
||||
/datum/organ/internal/process()
|
||||
|
||||
//Process infections
|
||||
if (!germ_level)
|
||||
return
|
||||
@@ -48,23 +47,23 @@
|
||||
//** Handle the effects of infections
|
||||
var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin")
|
||||
|
||||
if (germ_level < INFECTION_LEVEL_ONE/2 && prob(60))
|
||||
germ_level--
|
||||
|
||||
if (germ_level >= INFECTION_LEVEL_ONE/2)
|
||||
//aiming for germ level to go from ambient to INFECTION_LEVEL_TWO in an average of 15 minutes
|
||||
if(antibiotics < 5 && prob(round(germ_level/6)))
|
||||
germ_level++
|
||||
if(prob(1))
|
||||
take_damage(1,silent=prob(60))
|
||||
|
||||
if (germ_level >= INFECTION_LEVEL_TWO)
|
||||
var/datum/organ/external/parent = owner.get_organ(parent_organ)
|
||||
//spread germs
|
||||
if (antibiotics < get_cure_threshold() && parent.germ_level < germ_level && ( parent.germ_level < INFECTION_LEVEL_ONE*2 || prob(30) ))
|
||||
if (antibiotics < 5 && parent.germ_level < germ_level && ( parent.germ_level < INFECTION_LEVEL_ONE*2 || prob(30) ))
|
||||
parent.germ_level++
|
||||
|
||||
if (prob(3)) //about once every 30 seconds
|
||||
take_damage(1,silent=prob(30))
|
||||
|
||||
|
||||
/datum/organ/internal/proc/take_damage(amount, var/silent=0)
|
||||
if(src.robotic == 2)
|
||||
src.damage += (amount * 0.8)
|
||||
@@ -124,6 +123,11 @@
|
||||
parent_organ = "chest"
|
||||
|
||||
process()
|
||||
..()
|
||||
if (germ_level > INFECTION_LEVEL_ONE)
|
||||
if(prob(1))
|
||||
owner.emote("cough") //respitory tract infection
|
||||
|
||||
if(is_bruised())
|
||||
if(prob(2))
|
||||
spawn owner.emote("me", 1, "coughs up blood!")
|
||||
@@ -138,6 +142,14 @@
|
||||
var/process_accuracy = 10
|
||||
|
||||
process()
|
||||
..()
|
||||
if (germ_level > INFECTION_LEVEL_ONE)
|
||||
if(prob(1))
|
||||
owner << "\red Your skin itches."
|
||||
if (germ_level > INFECTION_LEVEL_TWO)
|
||||
if(prob(1))
|
||||
spawn owner.vomit()
|
||||
|
||||
if(owner.life_tick % process_accuracy == 0)
|
||||
if(src.damage < 0)
|
||||
src.damage = 0
|
||||
@@ -180,6 +192,7 @@
|
||||
parent_organ = "head"
|
||||
|
||||
process() //Eye damage replaces the old eye_stat var.
|
||||
..()
|
||||
if(is_bruised())
|
||||
owner.eye_blurry = 20
|
||||
if(is_broken())
|
||||
|
||||
Reference in New Issue
Block a user