blood dna is fixed, your ERP code is too
This commit is contained in:
@@ -111,17 +111,11 @@ GLOBAL_LIST_INIT(all_types_bloods,list(
|
||||
|
||||
GLOBAL_LIST_INIT(blood_types, list(
|
||||
"blood",
|
||||
"syntheticblood",
|
||||
"xenoblood",
|
||||
"oilblood",
|
||||
"jellyblood"
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(blood_id_types, list(
|
||||
"blood" = /datum/reagent/blood,
|
||||
"syntheticblood" = /datum/reagent/blood/synthetics,
|
||||
"xenoblood" = /datum/reagent/blood/xenomorph,
|
||||
"oilblood" = /datum/reagent/blood/oil,
|
||||
"jellyblood" = /datum/reagent/blood/jellyblood
|
||||
))
|
||||
|
||||
|
||||
+9
-12
@@ -332,22 +332,19 @@
|
||||
|
||||
//returns the mob's dna info as a list, to be inserted in an object's blood_DNA list
|
||||
/mob/living/proc/get_blood_dna_list()
|
||||
if(get_blood_id() != "blood")
|
||||
if(get_blood_id() != "blood" || "jellyblood")
|
||||
return
|
||||
return list("ANIMAL DNA" = "Y-")
|
||||
|
||||
/mob/living/carbon/get_blood_dna_list()
|
||||
var/blood_id = get_blood_id()
|
||||
for(var/B in GLOB.blood_id_types)
|
||||
var/list/bluhduh = typecacheof(B)
|
||||
if(!blood_id in bluhduh)
|
||||
return
|
||||
var/list/blood_dna = list()
|
||||
if(dna)
|
||||
blood_dna[dna.unique_enzymes] = dna.blood_type
|
||||
else
|
||||
blood_dna["UNKNOWN DNA"] = "X*"
|
||||
return blood_dna
|
||||
if(get_blood_id() != "blood" || "jellyblood")
|
||||
return
|
||||
var/list/blood_dna = list()
|
||||
if(dna)
|
||||
blood_dna[dna.unique_enzymes] = dna.blood_type
|
||||
else
|
||||
blood_dna["UNKNOWN DNA"] = "X*"
|
||||
return blood_dna
|
||||
|
||||
/mob/living/carbon/alien/get_blood_dna_list()
|
||||
return list("UNKNOWN DNA" = "X*")
|
||||
|
||||
@@ -123,16 +123,16 @@
|
||||
//Gets blood from mob to a container or other mob, preserving all data in it.
|
||||
/mob/living/proc/transfer_blood_to(atom/movable/AM, amount, forced)
|
||||
if(!blood_volume || !AM.reagents)
|
||||
return 0
|
||||
return FALSE
|
||||
if(blood_volume < (BLOOD_VOLUME_BAD * blood_ratio) && !forced)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if(blood_volume < amount)
|
||||
amount = blood_volume
|
||||
|
||||
var/blood_id = get_blood_id()
|
||||
if(!blood_id)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
blood_volume -= amount
|
||||
|
||||
@@ -140,84 +140,73 @@
|
||||
|
||||
if(iscarbon(AM))
|
||||
var/mob/living/carbon/C = AM
|
||||
for(var/datum/reagent/blood/bluhduh in GLOB.blood_types[blood_id])
|
||||
if(blood_id == C.get_blood_id())//both mobs have the same blood substance
|
||||
if(bluhduh) //actual blood reagent
|
||||
if(blood_data["viruses"])
|
||||
for(var/thing in blood_data["viruses"])
|
||||
var/datum/disease/D = thing
|
||||
if((D.spread_flags & DISEASE_SPREAD_SPECIAL) || (D.spread_flags & DISEASE_SPREAD_NON_CONTAGIOUS))
|
||||
continue
|
||||
C.ForceContractDisease(D)
|
||||
if(!(blood_data["blood_type"] in get_safe_blood(C.dna.blood_type)))
|
||||
if((blood_data["blood_type"] == "GEL") && (C.dna.species.exotic_blood != "jellyblood"))
|
||||
C.reagents.add_reagent("bonehurtingjuice", amount * 1.5) //filthy xenos bloooood
|
||||
else if((blood_data["blood_type"] == "HF") && (C.dna.species.exotic_blood != "oilblood"))
|
||||
C.reagents.add_reagent("bonehurtingjuice", amount * 1) //don't fucking put oil in people
|
||||
else if((blood_data["blood_type"] == "X*") && (C.dna.species.exotic_blood != "xenoblood"))
|
||||
C.reagents.add_reagent("sacid", amount * 1.5) //acid blooood
|
||||
else
|
||||
C.reagents.add_reagent("bonehurtingjuice", amount * 0.5)
|
||||
else
|
||||
C.blood_volume = min(C.blood_volume + round(amount, 0.1), BLOOD_VOLUME_MAXIMUM)
|
||||
return 1
|
||||
if(blood_id == C.get_blood_id())//both mobs have the same blood substance
|
||||
if(blood_id == "blood" || "jellyblood") //normal blood
|
||||
if(blood_data["viruses"])
|
||||
for(var/thing in blood_data["viruses"])
|
||||
var/datum/disease/D = thing
|
||||
if((D.spread_flags & DISEASE_SPREAD_SPECIAL) || (D.spread_flags & DISEASE_SPREAD_NON_CONTAGIOUS))
|
||||
continue
|
||||
C.ForceContractDisease(D)
|
||||
if(!(blood_data["blood_type"] in get_safe_blood(C.dna.blood_type)))
|
||||
C.reagents.add_reagent("bonehurtingjuice", amount * 0.5)
|
||||
return TRUE
|
||||
|
||||
C.blood_volume = min(C.blood_volume + round(amount, 0.1), BLOOD_VOLUME_MAXIMUM)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
AM.reagents.add_reagent(blood_id, amount, blood_data, bodytemperature)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
|
||||
/mob/living/proc/get_blood_data(blood_id)
|
||||
return
|
||||
|
||||
/mob/living/carbon/get_blood_data(blood_id)
|
||||
for(var/datum/reagent/blood/bluhduh in GLOB.blood_types[blood_id])
|
||||
if(bluhduh) //actual blood reagent
|
||||
var/blood_data = list()
|
||||
//set the blood data
|
||||
blood_data["donor"] = src
|
||||
blood_data["viruses"] = list()
|
||||
if(blood_id == "blood" || "jellyblood") //actual blood reagent
|
||||
var/blood_data = list()
|
||||
//set the blood data
|
||||
blood_data["donor"] = src
|
||||
blood_data["viruses"] = list()
|
||||
|
||||
for(var/thing in diseases)
|
||||
var/datum/disease/D = thing
|
||||
blood_data["viruses"] += D.Copy()
|
||||
for(var/thing in diseases)
|
||||
var/datum/disease/D = thing
|
||||
blood_data["viruses"] += D.Copy()
|
||||
|
||||
blood_data["blood_DNA"] = copytext(dna.unique_enzymes,1,0)
|
||||
blood_data["bloodcolor"] = bloodtype_to_color(dna.blood_type)
|
||||
if(disease_resistances && disease_resistances.len)
|
||||
blood_data["resistances"] = disease_resistances.Copy()
|
||||
var/list/temp_chem = list()
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
temp_chem[R.id] = R.volume
|
||||
blood_data["trace_chem"] = list2params(temp_chem)
|
||||
if(mind)
|
||||
blood_data["mind"] = mind
|
||||
else if(last_mind)
|
||||
blood_data["mind"] = last_mind
|
||||
if(ckey)
|
||||
blood_data["ckey"] = ckey
|
||||
else if(last_mind)
|
||||
blood_data["ckey"] = ckey(last_mind.key)
|
||||
blood_data["blood_DNA"] = copytext(dna.unique_enzymes,1,0)
|
||||
blood_data["bloodcolor"] = bloodtype_to_color(dna.blood_type)
|
||||
if(disease_resistances && disease_resistances.len)
|
||||
blood_data["resistances"] = disease_resistances.Copy()
|
||||
var/list/temp_chem = list()
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
temp_chem[R.id] = R.volume
|
||||
blood_data["trace_chem"] = list2params(temp_chem)
|
||||
if(mind)
|
||||
blood_data["mind"] = mind
|
||||
else if(last_mind)
|
||||
blood_data["mind"] = last_mind
|
||||
if(ckey)
|
||||
blood_data["ckey"] = ckey
|
||||
else if(last_mind)
|
||||
blood_data["ckey"] = ckey(last_mind.key)
|
||||
|
||||
if(!suiciding)
|
||||
blood_data["cloneable"] = 1
|
||||
blood_data["blood_type"] = copytext(dna.blood_type,1,0)
|
||||
blood_data["gender"] = gender
|
||||
blood_data["real_name"] = real_name
|
||||
blood_data["features"] = dna.features
|
||||
blood_data["factions"] = faction
|
||||
blood_data["quirks"] = list()
|
||||
for(var/V in roundstart_quirks)
|
||||
var/datum/quirk/T = V
|
||||
blood_data["quirks"] += T.type
|
||||
blood_data["changeling_loudness"] = 0
|
||||
if(mind)
|
||||
var/datum/antagonist/changeling/ling = mind.has_antag_datum(/datum/antagonist/changeling)
|
||||
if(istype(ling))
|
||||
blood_data["changeling_loudness"] = ling.loudfactor
|
||||
return blood_data
|
||||
if(!suiciding)
|
||||
blood_data["cloneable"] = 1
|
||||
blood_data["blood_type"] = copytext(dna.blood_type,1,0)
|
||||
blood_data["gender"] = gender
|
||||
blood_data["real_name"] = real_name
|
||||
blood_data["features"] = dna.features
|
||||
blood_data["factions"] = faction
|
||||
blood_data["quirks"] = list()
|
||||
for(var/V in roundstart_quirks)
|
||||
var/datum/quirk/T = V
|
||||
blood_data["quirks"] += T.type
|
||||
blood_data["changeling_loudness"] = 0
|
||||
if(mind)
|
||||
var/datum/antagonist/changeling/ling = mind.has_antag_datum(/datum/antagonist/changeling)
|
||||
if(istype(ling))
|
||||
blood_data["changeling_loudness"] = ling.loudfactor
|
||||
return blood_data
|
||||
|
||||
//get the id of the substance this mob use as blood.
|
||||
/mob/proc/get_blood_id()
|
||||
@@ -285,7 +274,7 @@
|
||||
drop.transfer_mob_blood_dna(src)
|
||||
return
|
||||
else
|
||||
LAZYINITLIST(temp_blood_DNA)
|
||||
temp_blood_DNA = list()
|
||||
temp_blood_DNA |= drop.blood_DNA.Copy() //we transfer the dna from the drip to the splatter
|
||||
qdel(drop)//the drip is replaced by a bigger splatter
|
||||
else
|
||||
@@ -301,17 +290,19 @@
|
||||
B.bloodiness += BLOOD_AMOUNT_PER_DECAL
|
||||
B.transfer_mob_blood_dna(src) //give blood info to the blood decal.
|
||||
if(temp_blood_DNA)
|
||||
if(isalien(src))
|
||||
B.add_blood_DNA(list("UNKNOWN DNA" = "X*"))
|
||||
else
|
||||
B.add_blood_DNA(temp_blood_DNA)
|
||||
B.blood_DNA |= temp_blood_DNA
|
||||
|
||||
/mob/living/carbon/human/add_splatter_floor(turf/T, small_drip)
|
||||
if(!(NOBLOOD in dna.species.species_traits))
|
||||
..()
|
||||
|
||||
/mob/living/carbon/alien/add_splatter_floor(turf/T, small_drip)
|
||||
.=..()
|
||||
if(!T)
|
||||
T = get_turf(src)
|
||||
var/obj/effect/decal/cleanable/blood/splatter/B = locate() in T.contents
|
||||
if(!B)
|
||||
B = new(T)
|
||||
B.blood_DNA["UNKNOWN DNA"] = "X*"
|
||||
|
||||
/mob/living/silicon/robot/add_splatter_floor(turf/T, small_drip)
|
||||
if(!T)
|
||||
|
||||
@@ -310,7 +310,10 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
|
||||
/datum/species/proc/on_species_loss(mob/living/carbon/human/C, datum/species/new_species, pref_load)
|
||||
if(C.dna.species.exotic_bloodtype)
|
||||
C.dna.blood_type = random_blood_type()
|
||||
if(!new_species.exotic_bloodtype)
|
||||
C.dna.blood_type = random_blood_type()
|
||||
else
|
||||
C.dna.blood_type = new_species.exotic_bloodtype
|
||||
if(DIGITIGRADE in species_traits)
|
||||
C.Digitigrade_Leg_Swap(TRUE)
|
||||
for(var/X in inherent_traits)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/datum/reagent/blood
|
||||
data = list("donor"=null,"viruses"=null,"blood_DNA"=null, "bloodcolor" = BLOOD_COLOR_HUMAN, "blood_type"= "O+","resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null)
|
||||
data = list("donor"=null,"viruses"=null,"blood_DNA"=null, "bloodcolor" = BLOOD_COLOR_HUMAN, "blood_type"= null,"resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null)
|
||||
name = "Blood"
|
||||
id = "blood"
|
||||
color = BLOOD_COLOR_HUMAN // rgb: 200, 0, 0
|
||||
@@ -27,35 +27,46 @@
|
||||
|
||||
if(iscarbon(L))
|
||||
var/mob/living/carbon/C = L
|
||||
for(var/bluhduh in GLOB.blood_types)
|
||||
if(C.get_blood_id() == bluhduh)
|
||||
if(method == INJECT || (method == INGEST && C.dna && C.dna.species && (DRINKSBLOOD in C.dna.species.species_traits)))
|
||||
if(!data || !(data["blood_type"] in get_safe_blood(C.dna.blood_type)))
|
||||
C.reagents.add_reagent("bonehurtingjuice", reac_volume * 0.5)
|
||||
if(data && (data["blood_type"] == "GEL") && (C.dna.species.exotic_blood != "jellyblood"))
|
||||
C.reagents.add_reagent("bonehurtingjuice", reac_volume * 1.5) //filthy xenos bloooood
|
||||
if(data && (data["blood_type"] == "HF") && (C.dna.species.exotic_blood != "oilblood"))
|
||||
C.reagents.add_reagent("bonehurtingjuice", reac_volume * 1) //don't drink oil, silly vampire
|
||||
if(data && (data["blood_type"] == "X*") && (C.dna.species.exotic_blood != "xenoblood"))
|
||||
C.reagents.add_reagent("sacid", reac_volume * 1.5) //acid blooood, dumb vampire
|
||||
else
|
||||
C.blood_volume = min(C.blood_volume + round(reac_volume, 0.1), BLOOD_VOLUME_MAXIMUM)
|
||||
|
||||
if(reac_volume >= 10 && istype(L))
|
||||
L.add_blood_DNA(list(data["blood_DNA"] = data["blood_type"]))
|
||||
if(C.get_blood_id() == ("blood" || "jellyblood") && (method == INJECT || (method == INGEST && C.dna && C.dna.species && (DRINKSBLOOD in C.dna.species.species_traits))))
|
||||
if(!data || !(data["blood_type"] in get_safe_blood(C.dna.blood_type)))
|
||||
C.reagents.add_reagent("bonehurtingjuice", reac_volume * 0.5)
|
||||
else
|
||||
C.blood_volume = min(C.blood_volume + round(reac_volume, 0.1), BLOOD_VOLUME_MAXIMUM)
|
||||
|
||||
/datum/reagent/blood/reaction_obj(obj/O, volume)
|
||||
if(volume >= 3 && istype(O))
|
||||
O.add_blood_DNA(list(data["blood_DNA"] = data["blood_type"]))
|
||||
|
||||
/datum/reagent/blood/on_new(list/data)
|
||||
if(iscarbon(src))
|
||||
var/mob/living/carbon/C = src
|
||||
var/blood_id = C.get_blood_id()
|
||||
data = C.get_blood_data(blood_id)
|
||||
if(istype(data))
|
||||
SetViruses(src, data)
|
||||
color = bloodtype_to_color(data["blood_type"])
|
||||
if(data["blood_type"] == "SY")
|
||||
name = "Synthetic Blood"
|
||||
taste_description = "oily"
|
||||
|
||||
if(data["blood_type"] == "X*")
|
||||
name = "Xenomorph Blood"
|
||||
taste_description = "acidic heresy"
|
||||
shot_glass_icon_state = "shotglassgreen"
|
||||
pH = 2.5
|
||||
|
||||
if(data["blood_type"] == "HF")
|
||||
name = "Hydraulic Blood"
|
||||
taste_description = "burnt oil"
|
||||
pH = 9.75
|
||||
|
||||
if(data["blood_type"] == "BUG")
|
||||
name = "Insect Blood"
|
||||
taste_description = "greasy"
|
||||
pH = 7.25
|
||||
|
||||
if(data["blood_type"] == "L")
|
||||
name = "Lizard Blood"
|
||||
taste_description = "spicy"
|
||||
pH = 6.85
|
||||
|
||||
|
||||
|
||||
/datum/reagent/blood/on_merge(list/mix_data)
|
||||
if(data && mix_data)
|
||||
@@ -102,30 +113,6 @@
|
||||
B.reagents.add_reagent(id, reac_volume)
|
||||
B.update_icon()
|
||||
|
||||
/datum/reagent/blood/synthetics
|
||||
data = list("donor"=null,"viruses"=null,"blood_DNA"=null, "bloodcolor" = BLOOD_COLOR_SYNTHETIC, "blood_type"="SY","resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null)
|
||||
name = "Synthetic Blood"
|
||||
id = "syntheticblood"
|
||||
taste_description = "oily"
|
||||
color = BLOOD_COLOR_SYNTHETIC // rgb: 11, 7, 48
|
||||
|
||||
/datum/reagent/blood/xenomorph
|
||||
data = list("donor"=null,"viruses"=null,"blood_DNA"=null, "bloodcolor" = BLOOD_COLOR_XENO, "blood_type"="X*","resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null)
|
||||
name = "Xenomorph Blood"
|
||||
id = "xenoblood"
|
||||
taste_description = "acidic heresy"
|
||||
color = BLOOD_COLOR_XENO // greenish yellow ooze
|
||||
shot_glass_icon_state = "shotglassgreen"
|
||||
pH = 2.5
|
||||
|
||||
/datum/reagent/blood/oil
|
||||
data = list("donor"=null,"viruses"=null,"blood_DNA"=null, "bloodcolor" = BLOOD_COLOR_OIL, "blood_type"="HF","resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null)
|
||||
name = "Hydraulic Blood"
|
||||
id = "oilblood"
|
||||
taste_description = "burnt oil"
|
||||
color = BLOOD_COLOR_OIL // dark, y'know, expected batman colors.
|
||||
pH = 9.75
|
||||
|
||||
/datum/reagent/blood/jellyblood
|
||||
data = list("donor"=null,"viruses"=null,"blood_DNA"=null, "bloodcolor" = BLOOD_COLOR_SLIME, "blood_type"="GEL","resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null)
|
||||
name = "Slime Jelly Blood"
|
||||
|
||||
@@ -217,7 +217,6 @@
|
||||
miss_sound = 'sound/weapons/slashmiss.ogg'
|
||||
meat = /obj/item/reagent_containers/food/snacks/meat/slab/xeno
|
||||
skinned_type = /obj/item/stack/sheet/animalhide/xeno
|
||||
exotic_blood = "xenoblood"
|
||||
exotic_bloodtype = "X*"
|
||||
damage_overlay_type = "xeno"
|
||||
liked_food = MEAT
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/ipc
|
||||
mutanttongue = /obj/item/organ/tongue/robot/ipc
|
||||
mutant_heart = /obj/item/organ/heart/ipc
|
||||
|
||||
exotic_blood = "oilblood"
|
||||
exotic_bloodtype = "HF"
|
||||
|
||||
var/datum/action/innate/monitor_change/screen
|
||||
|
||||
@@ -299,10 +299,10 @@
|
||||
|
||||
//So slimes can play too.
|
||||
/datum/chemical_reaction/fermi/enthrall/slime
|
||||
required_catalysts = list("slimejelly" = 1)
|
||||
required_catalysts = list("jellyblood" = 1)
|
||||
|
||||
/datum/chemical_reaction/fermi/enthrall/slime/FermiFinish(datum/reagents/holder, var/atom/my_atom)
|
||||
var/datum/reagent/toxin/slimejelly/B = locate(/datum/reagent/toxin/slimejelly) in my_atom.reagents.reagent_list//The one line change.
|
||||
var/datum/reagent/blood/jellyblood/B = locate(/datum/reagent/blood/jellyblood) in my_atom.reagents.reagent_list//The one line change.
|
||||
var/datum/reagent/fermi/enthrall/E = locate(/datum/reagent/fermi/enthrall) in my_atom.reagents.reagent_list
|
||||
if(!B.data)
|
||||
var/list/seen = viewers(5, get_turf(my_atom))
|
||||
|
||||
Reference in New Issue
Block a user