Merge pull request #4968 from Fox-McCloud/blood-refactor

Blood Refactor+Fixes
This commit is contained in:
TheDZD
2016-07-11 20:57:25 -04:00
committed by GitHub
12 changed files with 94 additions and 120 deletions
+8 -4
View File
@@ -59,7 +59,7 @@ datum/reagent/styptic_powder/on_mob_life(var/mob/living/M as mob)
..()
return
datum/reagent/salglu_solution
/datum/reagent/salglu_solution
name = "Saline-Glucose Solution"
id = "salglu_solution"
description = "This saline and glucose solution can help stabilize critically injured patients and cleanse wounds."
@@ -68,13 +68,17 @@ datum/reagent/salglu_solution
penetrates_skin = 1
metabolization_rate = 0.15
datum/reagent/salglu_solution/on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
/datum/reagent/salglu_solution/on_mob_life(mob/living/M)
if(!M)
M = holder.my_atom
if(prob(33))
M.adjustBruteLoss(-2*REM)
M.adjustFireLoss(-2*REM)
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(!H.species.exotic_blood && !(H.species.flags & NO_BLOOD) && prob(33))
H.vessel.add_reagent("blood", 1)
..()
return
datum/reagent/synthflesh
name = "Synthflesh"
@@ -9,19 +9,25 @@
nutriment_factor = 12 * REAGENTS_METABOLISM
color = "#664330" // rgb: 102, 67, 48
/datum/reagent/nutriment/on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
/datum/reagent/nutriment/on_mob_life(mob/living/M)
if(!M)
M = holder.my_atom
if(!(M.mind in ticker.mode.vampires))
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.can_eat()) //Make sure the species has it's dietflag set, otherwise it can't digest any nutrients
H.nutrition += nutriment_factor // For hunger and fatness
if(prob(50)) M.adjustBruteLoss(-1)
if(prob(50))
M.adjustBruteLoss(-1)
if(H.species.exotic_blood)
H.vessel.add_reagent(H.species.exotic_blood, 0.4)
else
if(!(H.species.flags & NO_BLOOD))
H.vessel.add_reagent("blood", 0.4)
if(istype(M,/mob/living/simple_animal)) //Any nutrients can heal simple animals
if(prob(50)) M.heal_organ_damage(1,0)
if(prob(50))
M.heal_organ_damage(1,0)
..()
return
/datum/reagent/protein // Meat-based protein, digestable by carnivores and omnivores, worthless to herbivores
name = "Protein"
@@ -150,20 +150,15 @@
description = "Pure iron is a metal."
reagent_state = SOLID
color = "#C8A5DC" // rgb: 200, 165, 220
/*
/datum/reagent/iron/on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
if((M.virus) && (prob(8) && (M.virus.name=="Magnitis")))
if(M.virus.spread == "Airborne")
M.virus.spread = "Remissive"
M.virus.stage--
if(M.virus.stage <= 0)
M.resistances += M.virus.type
M.virus = null
holder.remove_reagent(src.id, 0.2)
return
*/
/datum/reagent/iron/on_mob_life(mob/living/M)
if(!M)
M = holder.my_atom
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(!H.species.exotic_blood && !(H.species.flags & NO_BLOOD))
H.vessel.add_reagent("blood", 0.8)
..()
//foam