mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-13 16:13:19 +01:00
Re-enables organ infections, adds wound infection
Conflicts: code/game/atoms.dm code/modules/mob/living/carbon/carbon.dm code/setup.dm
This commit is contained in:
@@ -72,12 +72,18 @@
|
||||
if(E.status & ORGAN_BROKEN && !(E.status & ORGAN_SPLINTED) )
|
||||
broken = 1
|
||||
|
||||
if (!lying && world.time - l_move_time < 15)
|
||||
//Moving around with fractured ribs won't do you any good
|
||||
if (broken && E.internal_organs && prob(15))
|
||||
if (!lying && world.time - l_move_time < 15)
|
||||
if (broken && E.internal_organs && prob(15))
|
||||
var/datum/organ/internal/I = pick(E.internal_organs)
|
||||
custom_pain("You feel broken bones moving in your [E.display_name]!", 1)
|
||||
I.take_damage(rand(3,5))
|
||||
|
||||
//Moving makes open wounds get infected much faster
|
||||
if (E.wounds.len)
|
||||
for(var/datum/wound/W in E.wounds)
|
||||
if (W.can_infect())
|
||||
W.germ_level += 1
|
||||
|
||||
//Special effects for limbs.
|
||||
if(E.name in list("l_hand","l_arm","r_hand","r_arm") && (broken||malfunction))
|
||||
|
||||
@@ -300,7 +300,10 @@ This function completely restores a damaged organ to perfect condition.
|
||||
if(last_dam != brute_dam + burn_dam) // Process when we are fully healed up.
|
||||
last_dam = brute_dam + burn_dam
|
||||
return 1
|
||||
last_dam = brute_dam + burn_dam
|
||||
else
|
||||
last_dam = brute_dam + burn_dam
|
||||
if(germ_level > GANGREN_LEVEL_ONE)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/organ/external/process()
|
||||
@@ -336,31 +339,34 @@ This function completely restores a damaged organ to perfect condition.
|
||||
return
|
||||
|
||||
//Updating germ levels. Handles organ germ levels and necrosis.
|
||||
#define GANGREN_LEVEL_ONE 100
|
||||
#define GANGREN_LEVEL_TWO 1000
|
||||
#define GANGREN_LEVEL_TERMINAL 2500
|
||||
#define GERM_TRANSFER_AMOUNT germ_level/500
|
||||
//#define GERM_TRANSFER_AMOUNT germ_level/500
|
||||
/datum/organ/external/proc/update_germs()
|
||||
|
||||
if(status & ORGAN_ROBOT|ORGAN_DESTROYED) //Robotic limbs shouldn't be infected, nor should nonexistant limbs.
|
||||
if(status & (ORGAN_ROBOT|ORGAN_DESTROYED)) //Robotic limbs shouldn't be infected, nor should nonexistant limbs.
|
||||
germ_level = 0
|
||||
return
|
||||
|
||||
if(germ_level > 0 && owner.bodytemperature >= 170) //cryo stops germs from moving and doing their bad stuffs
|
||||
if(owner.bodytemperature >= 170) //cryo stops germs from moving and doing their bad stuffs
|
||||
//Syncing germ levels with external wounds
|
||||
for(var/datum/wound/W in wounds)
|
||||
if(!W.bandaged && !W.salved)
|
||||
W.germ_level = max(W.germ_level, germ_level) //Wounds get all the germs
|
||||
if (W.germ_level > germ_level) //Badly infected wounds raise internal germ levels
|
||||
germ_level++
|
||||
|
||||
if(germ_level > GANGREN_LEVEL_ONE && prob(round(germ_level/100)))
|
||||
germ_level++
|
||||
owner.adjustToxLoss(1)
|
||||
//Open wounds can become infected
|
||||
if (owner.germ_level > W.germ_level && W.can_infect())
|
||||
W.germ_level++
|
||||
|
||||
//Infected wounds raise the organ's germ level
|
||||
W.germ_level = max(W.germ_level, germ_level) //Wounds get all the germs
|
||||
if (W.germ_level > germ_level) //Badly infected wounds raise internal germ levels
|
||||
germ_level++
|
||||
|
||||
if(germ_level > GANGREN_LEVEL_TWO)
|
||||
germ_level++
|
||||
owner.adjustToxLoss(1)
|
||||
|
||||
else if(germ_level > GANGREN_LEVEL_ONE && prob(round(germ_level/10))) //aiming for a light infection to become serious after 40 minutes, standing still
|
||||
germ_level += 1
|
||||
owner.adjustToxLoss(1)
|
||||
|
||||
|
||||
/*
|
||||
if(germ_level > GANGREN_LEVEL_TERMINAL)
|
||||
if (!(status & ORGAN_DEAD))
|
||||
|
||||
Reference in New Issue
Block a user