From fab7f1f6b0624a788e1d2788aabdda063b6284be Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Sat, 5 Dec 2015 16:46:07 -0500 Subject: [PATCH] exotic blood changes --- code/__DEFINES/flags.dm | 3 +-- code/datums/datacore.dm | 2 +- .../living/carbon/human/species/species.dm | 2 +- .../living/carbon/human/species/station.dm | 4 +-- .../mob/new_player/preferences_setup.dm | 2 +- code/modules/organs/blood.dm | 26 +++++++------------ code/modules/reagents/Chemistry-Holder.dm | 3 +++ .../reagents/reagent_containers/syringes.dm | 4 +-- 8 files changed, 21 insertions(+), 25 deletions(-) diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index ff9d805a138..20930f1cdb8 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -54,8 +54,6 @@ #define HAS_UNDERSHIRT 2 #define HAS_SOCKS 4 -//Species Blood Flags -#define BLOOD_SLIME 1 //Species Body Flags #define FEET_CLAWS 1 #define FEET_PADDED 2 @@ -64,6 +62,7 @@ #define HAS_SKIN_TONE 16 #define HAS_SKIN_COLOR 32 #define TAIL_WAGGING 64 +#define NO_EYES 128 //Species Diet Flags #define DIET_CARN 1 diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index 97de7c19e51..7f0e58d3bbb 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -312,7 +312,7 @@ proc/get_id_photo(var/mob/living/carbon/human/H) else clothes_s = new /icon('icons/mob/uniform.dmi', "grey_s") clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) - if(!H.species.bloodflags & BLOOD_SLIME) + if(!H.species.bodyflags & NO_EYES) preview_icon.Blend(eyes_s, ICON_OVERLAY) if(clothes_s) preview_icon.Blend(clothes_s, ICON_OVERLAY) diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 6462d413e7b..6c12bc9b5a7 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -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 diff --git a/code/modules/mob/living/carbon/human/species/station.dm b/code/modules/mob/living/carbon/human/species/station.dm index 9f9c0642988..1e85a1e2e52 100644 --- a/code/modules/mob/living/carbon/human/species/station.dm +++ b/code/modules/mob/living/carbon/human/species/station.dm @@ -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( diff --git a/code/modules/mob/new_player/preferences_setup.dm b/code/modules/mob/new_player/preferences_setup.dm index c6f9c2814c7..969bf2aebcb 100644 --- a/code/modules/mob/new_player/preferences_setup.dm +++ b/code/modules/mob/new_player/preferences_setup.dm @@ -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) diff --git a/code/modules/organs/blood.dm b/code/modules/organs/blood.dm index e65ed5bb870..f3f9c48b614 100644 --- a/code/modules/organs/blood.dm +++ b/code/modules/organs/blood.dm @@ -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 diff --git a/code/modules/reagents/Chemistry-Holder.dm b/code/modules/reagents/Chemistry-Holder.dm index 47e1546de1a..084883d55f9 100644 --- a/code/modules/reagents/Chemistry-Holder.dm +++ b/code/modules/reagents/Chemistry-Holder.dm @@ -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) diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index a9bbdb68de6..ee90720d0bc 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -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 << "You are unable to locate any blood." 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)