exotic blood changes

This commit is contained in:
ZomgPonies
2015-12-05 16:46:07 -05:00
parent dc089e3146
commit fab7f1f6b0
8 changed files with 21 additions and 25 deletions
@@ -62,7 +62,7 @@
var/flags = 0 // Various specific features.
var/clothing_flags = 0 // Underwear and socks.
var/bloodflags = 0
var/exotic_blood
var/bodyflags = 0
var/dietflags = 0 // Make sure you set this, otherwise it won't be able to digest a lot of foods
@@ -319,10 +319,10 @@
flags = IS_WHITELISTED | NO_BREATHE | HAS_LIPS | NO_INTORGANS | NO_SCAN
clothing_flags = HAS_SOCKS
bodyflags = HAS_SKIN_COLOR
bloodflags = BLOOD_SLIME
bodyflags = HAS_SKIN_COLOR | NO_EYES
dietflags = DIET_CARN
reagent_tag = PROCESS_ORG
exotic_blood = "water"
//ventcrawler = 1 //ventcrawling commented out
has_organ = list(
@@ -804,7 +804,7 @@ datum/preferences
else if(backbag == 3 || backbag == 4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(!current_species.bloodflags & BLOOD_SLIME)
if(!current_species.bodyflags & NO_EYES)
preview_icon.Blend(eyes_s, ICON_OVERLAY)
if(underwear_s)
preview_icon.Blend(underwear_s, ICON_OVERLAY)
+10 -16
View File
@@ -19,14 +19,8 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
vessel = new/datum/reagents(600)
vessel.my_atom = src
if(species && species.flags & NO_BLOOD) //In case of transformation to IPC
if(vessel.has_reagent("water") || vessel.has_reagent("blood"))
var/water = vessel.get_reagent_amount("water")
var/blood = vessel.get_reagent_amount("blood")
vessel.remove_reagent("water",water)
vessel.remove_reagent("blood",blood)
if(species.bloodflags & BLOOD_SLIME)
vessel.add_reagent("water",560)
if(species && species.exotic_blood)
vessel.add_reagent(species.exotic_blood,560)
else
vessel.add_reagent("blood",560)
spawn(1)
@@ -46,8 +40,8 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
if(species && species.flags & NO_BLOOD)
return
if(stat != DEAD && bodytemperature >= 170) //Dead or cryosleep people do not pump the blood.
if(species.bloodflags &BLOOD_SLIME)
blood_volume = round(vessel.get_reagent_amount("water"))
if(species.exotic_blood)
blood_volume = round(vessel.get_reagent_amount(species.exotic_blood))
if(blood_volume < 560 && blood_volume)
var/datum/reagent/water/W = locate() in vessel.reagent_list //Grab some blood
if(W) // Make sure there's some blood at all
@@ -180,8 +174,8 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
var/amm = 0.1 * amt
var/turf/T = get_turf(src)
if(src.species.bloodflags &BLOOD_SLIME)
vessel.remove_reagent("water",amm)
if(src.species.exotic_blood)
vessel.remove_reagent(species.exotic_blood,amm)
vessel.reaction(T, TOUCH, amm)
return
@@ -227,10 +221,10 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
//For humans, blood does not appear from blue, it comes from vessels.
/mob/living/carbon/human/take_blood(obj/item/weapon/reagent_containers/container, var/amount)
if(src.species.bloodflags &BLOOD_SLIME)
if(vessel.get_reagent_amount("water") < amount)
if(src.species.exotic_blood)
if(vessel.get_reagent_amount(src.species.exotic_blood) < amount)
return null
var/datum/reagent/W = new /datum/reagent/water
var/datum/reagent/W = new /datum/reagent
W.holder = container
W.volume += amount
var/list/temp_chem = list()
@@ -238,7 +232,7 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
temp_chem += R.id
temp_chem[R.id] = R.volume
W.data["trace_chem"] = list2params(temp_chem)
vessel.remove_reagent("water",amount) // Removes blood if human
vessel.remove_reagent(src.species.exotic_blood,amount) // Removes blood if human
return W
if(species && species.flags & NO_BLOOD)
return null
@@ -371,6 +371,9 @@ var/const/INGEST = 2
//Species with PROCESS_DUO are only affected by reagents that affect both organics and synthetics, like acid and hellwater
if((R.process_flags & ORGANIC) && (R.process_flags & SYNTHETIC) && (H.species.reagent_tag & PROCESS_DUO))
can_process = 1
if(H.species && H.species.exotic_blood)
if(R.id == H.species.exotic_blood)
can_process = 0
//We'll assume that non-human mobs lack the ability to process synthetic-oriented reagents (adjust this if we need to change that assumption)
else
if(R.process_flags != SYNTHETIC)
@@ -97,7 +97,7 @@
var/time = 30 //Injecting through a hardsuit takes longer due to needing to find a port.
if(istype(target,/mob/living/carbon/human))
var/mob/living/carbon/human/H = T
if((H.species.bloodflags & BLOOD_SLIME) || (H.species.flags & NO_BLOOD))
if(H.species.flags & NO_BLOOD)
usr << "<span class='warning'>You are unable to locate any blood.</span>"
return
if(H.wear_suit && istype(H.wear_suit,/obj/item/clothing/suit/space))
@@ -118,7 +118,7 @@
var/datum/reagent/B
if(istype(T,/mob/living/carbon/human))
var/mob/living/carbon/human/H = T
if(H.species && H.species.flags & NO_BLOOD)
if(H.species && H.species.exotic_blood && H.reagents.total_volume)
H.reagents.trans_to(src,amount)
else
B = T.take_blood(src,amount)