mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-24 05:38:15 +01:00
Fixed embedding.
This commit is contained in:
@@ -337,7 +337,7 @@ This function completely restores a damaged organ to perfect condition.
|
||||
|
||||
//Updating germ levels. Handles organ germ levels and necrosis.
|
||||
/*
|
||||
The INFECTION_LEVEL values defined in setup.dm control the time it takes to reach the different
|
||||
The INFECTION_LEVEL values defined in setup.dm control the time it takes to reach the different
|
||||
infection levels. Since infection growth is exponential, you can adjust the time it takes to get
|
||||
from one germ_level to another using the rough formula:
|
||||
|
||||
@@ -349,10 +349,10 @@ the actual time is dependent on RNG.
|
||||
|
||||
INFECTION_LEVEL_ONE below this germ level nothing happens, and the infection doesn't grow
|
||||
INFECTION_LEVEL_TWO above this germ level the infection will start to spread to internal and adjacent organs
|
||||
INFECTION_LEVEL_THREE above this germ level the player will take additional toxin damage per second, and will die in minutes without
|
||||
INFECTION_LEVEL_THREE above this germ level the player will take additional toxin damage per second, and will die in minutes without
|
||||
antitox. also, above this germ level you will need to overdose on spaceacillin to reduce the germ_level.
|
||||
|
||||
Note that amputating the affected organ does in fact remove the infection from the
|
||||
Note that amputating the affected organ does in fact remove the infection from the
|
||||
player's body, though, antitox and spaceacillin are easy enough to get I doubt it will ever be needed.
|
||||
*/
|
||||
/datum/organ/external/proc/update_germs()
|
||||
@@ -367,7 +367,7 @@ player's body, though, antitox and spaceacillin are easy enough to get I doubt i
|
||||
//Open wounds can become infected
|
||||
if (owner.germ_level > W.germ_level && W.infection_check())
|
||||
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
|
||||
@@ -376,41 +376,41 @@ player's body, though, antitox and spaceacillin are easy enough to get I doubt i
|
||||
var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin")
|
||||
if (germ_level > 0 && antibiotics > 5)
|
||||
if (prob(4*antibiotics)) germ_level-- //the higher the germ level the more antibiotics you'll need.
|
||||
|
||||
|
||||
if(germ_level >= INFECTION_LEVEL_ONE)
|
||||
//having an infection raises your body temperature
|
||||
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)))
|
||||
germ_level++
|
||||
if (prob(5)) //adjust this to tweak how fast people take toxin damage from infections
|
||||
owner.adjustToxLoss(1)
|
||||
|
||||
|
||||
if(germ_level >= INFECTION_LEVEL_TWO)
|
||||
//spread the infection
|
||||
for (var/datum/organ/internal/I in internal_organs)
|
||||
if (I.germ_level < germ_level)
|
||||
I.germ_level++
|
||||
|
||||
|
||||
if (children) //To child organs
|
||||
for (var/datum/organ/external/child in children)
|
||||
if (child.germ_level < germ_level && !(child.status & ORGAN_ROBOT))
|
||||
if (child.germ_level < INFECTION_LEVEL_ONE*2 || prob(30))
|
||||
child.germ_level++
|
||||
|
||||
|
||||
if (parent)
|
||||
if (parent.germ_level < germ_level && !(parent.status & ORGAN_ROBOT))
|
||||
if (parent.germ_level < INFECTION_LEVEL_ONE*2 || prob(30))
|
||||
parent.germ_level++
|
||||
|
||||
|
||||
if(germ_level >= INFECTION_LEVEL_THREE && antibiotics < 30) //overdosing is necessary to stop severe infections
|
||||
if (!(status & ORGAN_DEAD))
|
||||
status |= ORGAN_DEAD
|
||||
owner << "<span class='notice'>You can't feel your [display_name] anymore...</span>"
|
||||
|
||||
|
||||
germ_level++
|
||||
owner.adjustToxLoss(1)
|
||||
|
||||
@@ -753,7 +753,7 @@ player's body, though, antitox and spaceacillin are easy enough to get I doubt i
|
||||
/datum/organ/external/proc/process_grasp(var/obj/item/c_hand, var/hand_name)
|
||||
if (!c_hand)
|
||||
return
|
||||
|
||||
|
||||
if(is_broken())
|
||||
owner.u_equip(c_hand)
|
||||
var/emote_scream = pick("screams in pain and", "lets out a sharp cry and", "cries out and")
|
||||
@@ -778,7 +778,9 @@ player's body, though, antitox and spaceacillin are easy enough to get I doubt i
|
||||
if(ismob(W.loc))
|
||||
var/mob/living/H = W.loc
|
||||
H.drop_item()
|
||||
W.loc = owner/****************************************************
|
||||
W.loc = owner
|
||||
|
||||
/****************************************************
|
||||
ORGAN DEFINES
|
||||
****************************************************/
|
||||
|
||||
@@ -806,7 +808,7 @@ player's body, though, antitox and spaceacillin are easy enough to get I doubt i
|
||||
max_damage = 50
|
||||
min_broken_damage = 20
|
||||
body_part = ARM_LEFT
|
||||
|
||||
|
||||
process()
|
||||
..()
|
||||
process_grasp(owner.l_hand, "left hand")
|
||||
@@ -827,7 +829,7 @@ player's body, though, antitox and spaceacillin are easy enough to get I doubt i
|
||||
max_damage = 50
|
||||
min_broken_damage = 20
|
||||
body_part = ARM_RIGHT
|
||||
|
||||
|
||||
process()
|
||||
..()
|
||||
process_grasp(owner.r_hand, "right hand")
|
||||
@@ -866,7 +868,7 @@ player's body, though, antitox and spaceacillin are easy enough to get I doubt i
|
||||
max_damage = 30
|
||||
min_broken_damage = 15
|
||||
body_part = HAND_RIGHT
|
||||
|
||||
|
||||
process()
|
||||
..()
|
||||
process_grasp(owner.r_hand, "right hand")
|
||||
@@ -878,7 +880,7 @@ player's body, though, antitox and spaceacillin are easy enough to get I doubt i
|
||||
max_damage = 30
|
||||
min_broken_damage = 15
|
||||
body_part = HAND_LEFT
|
||||
|
||||
|
||||
process()
|
||||
..()
|
||||
process_grasp(owner.l_hand, "left hand")
|
||||
|
||||
Reference in New Issue
Block a user