This commit is contained in:
Ghommie
2019-10-29 13:38:16 +01:00
1118 changed files with 9437 additions and 5695 deletions
@@ -175,7 +175,7 @@
data["chosenPillStyle"] = chosenPillStyle
data["isPillBottleLoaded"] = bottle ? 1 : 0
if(bottle)
GET_COMPONENT_FROM(STRB, /datum/component/storage, bottle)
var/datum/component/storage/STRB = bottle.GetComponent(/datum/component/storage)
data["pillBotContent"] = bottle.contents.len
data["pillBotMaxContent"] = STRB.max_items
@@ -263,7 +263,7 @@
var/target_loc = bottle ? bottle : drop_location()
var/drop_threshold = INFINITY
if(bottle)
GET_COMPONENT_FROM(STRB, /datum/component/storage, bottle)
var/datum/component/storage/STRB = bottle.GetComponent(/datum/component/storage)
if(STRB)
drop_threshold = STRB.max_items - bottle.contents.len
@@ -188,7 +188,7 @@
to_chat(usr, "<span class='warning'>ERROR: Cannot replicate virus strain.</span>")
return
A = A.Copy()
var/list/data = list("viruses" = list(A))
var/list/data = list("blood_DNA" = "UNKNOWN DNA", "blood_type" = "SY", "viruses" = list(A))
var/obj/item/reagent_containers/glass/bottle/B = new(drop_location())
B.name = "[A.name] culture bottle"
B.desc = "A small bottle. Contains [A.agent] culture in synthblood medium."
@@ -423,7 +423,7 @@
. = 1
/datum/reagent/drug/happiness/addiction_act_stage1(mob/living/M)// all work and no play makes jack a dull boy
GET_COMPONENT_FROM(mood, /datum/component/mood, M)
var/datum/component/mood/mood = M.GetComponent(/datum/component/mood)
mood.setSanity(min(mood.sanity, SANITY_DISTURBED))
M.Jitter(5)
if(prob(20))
@@ -431,7 +431,7 @@
..()
/datum/reagent/drug/happiness/addiction_act_stage2(mob/living/M)
GET_COMPONENT_FROM(mood, /datum/component/mood, M)
var/datum/component/mood/mood = M.GetComponent(/datum/component/mood)
mood.setSanity(min(mood.sanity, SANITY_UNSTABLE))
M.Jitter(10)
if(prob(30))
@@ -439,7 +439,7 @@
..()
/datum/reagent/drug/happiness/addiction_act_stage3(mob/living/M)
GET_COMPONENT_FROM(mood, /datum/component/mood, M)
var/datum/component/mood/mood = M.GetComponent(/datum/component/mood)
mood.setSanity(min(mood.sanity, SANITY_CRAZY))
M.Jitter(15)
if(prob(40))
@@ -447,7 +447,7 @@
..()
/datum/reagent/drug/happiness/addiction_act_stage4(mob/living/carbon/human/M)
GET_COMPONENT_FROM(mood, /datum/component/mood, M)
var/datum/component/mood/mood = M.GetComponent(/datum/component/mood)
mood.setSanity(SANITY_INSANE)
M.Jitter(20)
if(prob(50))
@@ -1443,7 +1443,7 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M)
M.dizziness = max(0, M.dizziness-6)
M.confused = max(0, M.confused-6)
M.disgust = max(0, M.disgust-6)
GET_COMPONENT_FROM(mood, /datum/component/mood, M)
var/datum/component/mood/mood = M.GetComponent(/datum/component/mood)
if(mood.sanity <= SANITY_NEUTRAL) // only take effect if in negative sanity and then...
mood.setSanity(min(mood.sanity+5, SANITY_NEUTRAL)) // set minimum to prevent unwanted spiking over neutral
..()
@@ -1,9 +1,9 @@
/datum/reagent/blood
data = list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=null,"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 = "#C80000" // rgb: 200, 0, 0
description = "Blood from a human, or otherwise."
color = BLOOD_COLOR_HUMAN // rgb: 200, 0, 0
description = "Blood from some creature."
metabolization_rate = 5 //fast rate so it disappears fast.
taste_description = "iron"
taste_mult = 1.3
@@ -28,27 +28,75 @@
if(iscarbon(L))
var/mob/living/carbon/C = L
if(C.get_blood_id() == "blood" && (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("toxin", reac_volume * 0.5)
else
C.blood_volume = min(C.blood_volume + round(reac_volume, 0.1), BLOOD_VOLUME_MAXIMUM)
var/blood_id = C.get_blood_id()
if((blood_id == "blood" || blood_id == "jellyblood") && (method == INJECT || (method == INGEST && C.dna && C.dna.species && (DRINKSBLOOD in C.dna.species.species_traits))))
C.blood_volume = min(C.blood_volume + round(reac_volume, 0.1), BLOOD_VOLUME_MAXIMUM * C.blood_ratio)
// we don't care about bloodtype here, we're just refilling the mob
if(reac_volume >= 10 && istype(L))
if(reac_volume >= 10 && istype(L) && method != INJECT)
L.add_blood_DNA(list(data["blood_DNA"] = data["blood_type"]))
/datum/reagent/blood/on_mob_life(mob/living/carbon/C) //Because lethals are preferred over stamina. damnifino.
var/blood_id = C.get_blood_id()
if((blood_id == "blood" || blood_id == "jellyblood"))
if(!data || !(data["blood_type"] in get_safe_blood(C.dna.blood_type))) //we only care about bloodtype here because this is where the poisoning should be
C.adjustToxLoss(rand(2,8)*REM, TRUE, TRUE) //forced to ensure people don't use it to gain beneficial toxin as slime person
..()
/datum/reagent/blood/reaction_obj(obj/O, volume)
if(volume >= 3 && istype(O))
O.add_blood_DNA(list(data["blood_DNA"] = data["blood_type"]))
O.add_blood_DNA(data)
/datum/reagent/blood/reaction_turf(turf/T, reac_volume)//splash the blood all over the place
if(!istype(T))
return
if(reac_volume < 3)
return
var/obj/effect/decal/cleanable/blood/B = locate() in T //find some blood here
if(!B)
B = new(T)
if(data["blood_DNA"])
B.blood_DNA[data["blood_DNA"]] = data["blood_type"]
if(!B.reagents)
B.reagents.add_reagent(id, reac_volume)
B.update_icon()
/datum/reagent/blood/on_new(list/data)
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)
if(data["blood_DNA"] != mix_data["blood_DNA"])
data["cloneable"] = 0 //On mix, consider the genetic sampling unviable for pod cloning if the DNA sample doesn't match.
data["cloneable"] = FALSE //On mix, consider the genetic sampling unviable for pod cloning if the DNA sample doesn't match.
if(data["viruses"] || mix_data["viruses"])
var/list/mix1 = data["viruses"]
@@ -78,27 +126,111 @@
var/datum/disease/D = thing
. += D
/datum/reagent/blood/reaction_turf(turf/T, reac_volume)//splash the blood all over the place
if(!istype(T))
return
if(reac_volume < 3)
return
/datum/reagent/blood/synthetics
data = list("donor"=null,"viruses"=null,"blood_DNA"="REPLICATED", "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
var/obj/effect/decal/cleanable/blood/B = locate() in T //find some blood here
if(!B)
B = new(T)
if(data["blood_DNA"])
B.add_blood_DNA(list(data["blood_DNA"] = data["blood_type"]))
/datum/reagent/blood/lizard
data = list("donor"=null,"viruses"=null,"blood_DNA"=null, "bloodcolor" = BLOOD_COLOR_LIZARD, "blood_type"="L","resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null)
name = "Lizard Blood"
id = "lizardblood"
taste_description = "spicy"
color = BLOOD_COLOR_LIZARD // rgb: 11, 7, 48
pH = 6.85
/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"
id = "jellyblood"
description = "A gooey semi-liquid produced from one of the deadliest lifeforms in existence. SO REAL."
color = BLOOD_COLOR_SLIME
taste_description = "slime"
taste_mult = 1.3
pH = 4
/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/insect
data = list("donor"=null,"viruses"=null,"blood_DNA"=null, "bloodcolor" = BLOOD_COLOR_BUG, "blood_type"="BUG","resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null)
name = "Insectoid Blood"
id = "bugblood"
taste_description = "waxy"
color = BLOOD_COLOR_BUG // Bug colored, I guess.
pH = 7.25
/datum/reagent/blood/jellyblood/on_mob_life(mob/living/carbon/M)
if(prob(10))
if(M.dna?.species?.exotic_bloodtype != "GEL")
to_chat(M, "<span class='danger'>Your insides are burning!</span>")
M.adjustToxLoss(rand(20,60)*REM, 0)
. = 1
else if(prob(40) && isjellyperson(M))
M.heal_bodypart_damage(2*REM)
. = 1
..()
/datum/reagent/liquidgibs
name = "Liquid gibs"
id = "liquidgibs"
color = "#FF9966"
color = BLOOD_COLOR_HUMAN
description = "You don't even want to think about what's in here."
taste_description = "gross iron"
shot_glass_icon_state = "shotglassred"
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)
pH = 7.45
/datum/reagent/liquidgibs/xeno
name = "Liquid xeno gibs"
id = "liquidxenogibs"
color = BLOOD_COLOR_XENO
taste_description = "blended heresy"
shot_glass_icon_state = "shotglassgreen"
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)
pH = 2.5
/datum/reagent/liquidgibs/slime
name = "Slime sludge"
id = "liquidslimegibs"
color = BLOOD_COLOR_SLIME
taste_description = "slime"
shot_glass_icon_state = "shotglassgreen"
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)
pH = 4
/datum/reagent/liquidgibs/synth
name = "Synthetic sludge"
id = "liquidsyntheticgibs"
color = BLOOD_COLOR_SYNTHETIC
taste_description = "jellied plastic"
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)
/datum/reagent/liquidgibs/oil
name = "Hydraulic sludge"
id = "liquidoilgibs"
color = BLOOD_COLOR_OIL
taste_description = "chunky burnt 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)
pH = 9.75
/datum/reagent/vaccine
//data must contain virus type
name = "Vaccine"
@@ -585,6 +717,30 @@
race = /datum/species/android
mutationtext = "<span class='danger'>The pain subsides. You feel... artificial.</span>"
//Citadel Races
/datum/reagent/mutationtoxin/mammal
name = "Mammal Mutation Toxin"
id = "mammalmutationtoxin"
description = "A glowing toxin."
color = "#5EFF3B" //RGB: 94, 255, 59
race = /datum/species/mammal
mutationtext = "<span class='danger'>The pain subsides. You feel... fluffier.</span>"
/datum/reagent/mutationtoxin/insect
name = "Insect Mutation Toxin"
id = "insectmutationtoxin"
description = "A glowing toxin."
color = "#5EFF3B" //RGB: 94, 255, 59
race = /datum/species/insect
mutationtext = "<span class='danger'>The pain subsides. You feel... attracted to dark, moist areas.</span>"
/datum/reagent/mutationtoxin/xenoperson
name = "Xeno-Hybrid Mutation Toxin"
id = "xenopersonmutationtoxin"
description = "A glowing toxin."
color = "#5EFF3B" //RGB: 94, 255, 59
race = /datum/species/xeno
mutationtext = "<span class='danger'>The pain subsides. You feel... oddly longing for the Queen.</span>" //sadly, not the British one.
//BLACKLISTED RACES
/datum/reagent/mutationtoxin/skeleton
@@ -947,12 +1103,12 @@
reagent_state = SOLID
taste_description = "iron"
pH = 6
overdose_threshold = 30
color = "#c2391d"
/datum/reagent/iron/on_mob_life(mob/living/carbon/C)
if(C.blood_volume < (BLOOD_VOLUME_NORMAL*C.blood_ratio))
C.blood_volume += 0.5
C.blood_volume += 0.01 //we'll have synthetics from medbay.
..()
/datum/reagent/iron/reaction_mob(mob/living/M, method=TOUCH, reac_volume)
@@ -961,6 +1117,17 @@
M.reagents.add_reagent("toxin", reac_volume)
..()
/datum/reagent/iron/overdose_start(mob/living/M)
to_chat(M, "<span class='userdanger'>You start feeling your guts twisting painfully!</span>")
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "[id]_overdose", /datum/mood_event/overdose, name)
/datum/reagent/iron/overdose_process(mob/living/carbon/C)
if(prob(20))
var/obj/item/organ/liver/L = C.getorganslot(ORGAN_SLOT_LIVER)
if (istype(L))
C.applyLiverDamage(2) //mild until the fabled med rework comes out. the organ damage galore
..()
/datum/reagent/gold
name = "Gold"
id = "gold"
@@ -1077,17 +1244,19 @@
pH = 5.5
/datum/reagent/space_cleaner/reaction_obj(obj/O, reac_volume)
if(istype(O, /obj/effect/decal/cleanable))
if(istype(O, /obj/effect/decal/cleanable) || istype(O, /obj/item/projectile/bullet/reusable/foam_dart) || istype(O, /obj/item/ammo_casing/caseless/foam_dart))
qdel(O)
else
if(O)
O.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
SEND_SIGNAL(O, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
SEND_SIGNAL(O, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
O.clean_blood()
/datum/reagent/space_cleaner/reaction_turf(turf/T, reac_volume)
if(reac_volume >= 1)
T.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
SEND_SIGNAL(T, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
SEND_SIGNAL(T, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
T.clean_blood()
for(var/obj/effect/decal/cleanable/C in T)
qdel(C)
@@ -1105,26 +1274,33 @@
H.lip_style = null
H.update_body()
for(var/obj/item/I in C.held_items)
SEND_SIGNAL(I, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
SEND_SIGNAL(I, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
I.clean_blood()
if(C.wear_mask)
if(SEND_SIGNAL(C.wear_mask, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD))
SEND_SIGNAL(C.wear_mask, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
if(C.wear_mask.clean_blood())
C.update_inv_wear_mask()
if(ishuman(M))
var/mob/living/carbon/human/H = C
if(H.head)
if(SEND_SIGNAL(H.head, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD))
SEND_SIGNAL(H.head, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
if(H.head.clean_blood())
H.update_inv_head()
if(H.wear_suit)
if(SEND_SIGNAL(H.wear_suit, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD))
SEND_SIGNAL(H.wear_suit, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
if(H.wear_suit.clean_blood())
H.update_inv_wear_suit()
else if(H.w_uniform)
if(SEND_SIGNAL(H.w_uniform, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD))
SEND_SIGNAL(H.w_uniform, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
if(H.w_uniform.clean_blood())
H.update_inv_w_uniform()
if(H.shoes)
if(SEND_SIGNAL(H.shoes, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD))
SEND_SIGNAL(H.shoes, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
if(H.shoes.clean_blood())
H.update_inv_shoes()
H.wash_cream()
SEND_SIGNAL(M, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
SEND_SIGNAL(M, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
M.clean_blood()
/datum/reagent/space_cleaner/ez_clean
name = "EZ Clean"
@@ -2119,26 +2295,22 @@
chemical_flags = REAGENT_INVISIBLE
/datum/reagent/changeling_string/on_mob_metabolize(mob/living/carbon/C)
if(C && C.dna && data["desired_dna"])
if(ishuman(C) && C.dna && data["desired_dna"])
original_dna = new C.dna.type
C.dna.copy_dna(original_dna)
var/datum/dna/new_dna = data["desired_dna"]
new_dna.copy_dna(C.dna)
new_dna.transfer_identity(C, TRUE)
C.real_name = new_dna.real_name
C.updateappearance(mutcolor_update=1)
C.update_body()
C.updateappearance(mutcolor_update = TRUE)
C.domutcheck()
C.regenerate_icons()
..()
/datum/reagent/changeling_string/on_mob_end_metabolize(mob/living/carbon/C)
if(original_dna)
original_dna.copy_dna(C.dna)
original_dna.transfer_identity(C, TRUE)
C.real_name = original_dna.real_name
C.updateappearance(mutcolor_update=1)
C.update_body()
C.updateappearance(mutcolor_update = TRUE)
C.domutcheck()
C.regenerate_icons()
..()
/datum/reagent/changeling_string/Destroy()
@@ -283,6 +283,12 @@
results = list("regen_jelly" = 2)
required_reagents = list("tricordrazine" = 1, "slimejelly" = 1)
/datum/chemical_reaction/jelly_convert
name = "Blood Jelly Conversion"
id = "blood_jelly"
results = list("slimejelly" = 1)
required_reagents = list("toxin" = 1, "jellyblood" = 1)
/datum/chemical_reaction/corazone
name = "Corazone"
id = "corazone"
+1 -1
View File
@@ -26,7 +26,7 @@
create_reagents(volume, reagent_flags)
if(spawned_disease)
var/datum/disease/F = new spawned_disease()
var/list/data = list("viruses"= list(F))
var/list/data = list("blood_DNA" = "UNKNOWN DNA", "blood_type" = "SY","viruses"= list(F))
reagents.add_reagent("blood", disease_amount, data)
add_initial_reagents()
@@ -4,13 +4,16 @@
icon = 'icons/obj/bloodpack.dmi'
icon_state = "bloodpack"
volume = 200
reagent_flags = DRAINABLE
var/blood_type = null
var/labelled = 0
var/color_to_apply = "#FFFFFF"
var/mutable_appearance/fill_overlay
/obj/item/reagent_containers/blood/Initialize()
. = ..()
if(blood_type != null)
reagents.add_reagent("blood", 200, list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=blood_type,"resistances"=null,"trace_chem"=null))
reagents.add_reagent("blood", 200, list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_colour"=color, "blood_type"=blood_type,"resistances"=null,"trace_chem"=null))
update_icon()
/obj/item/reagent_containers/blood/on_reagent_change(changetype)
@@ -18,6 +21,7 @@
var/datum/reagent/blood/B = reagents.has_reagent("blood")
if(B && B.data && B.data["blood_type"])
blood_type = B.data["blood_type"]
color_to_apply = bloodtype_to_color(blood_type)
else
blood_type = null
update_pack_name()
@@ -45,7 +49,7 @@
/obj/item/reagent_containers/blood/random/Initialize()
icon_state = "bloodpack"
blood_type = pick("A+", "A-", "B+", "B-", "O+", "O-", "L")
blood_type = pick("A+", "A-", "B+", "B-", "O+", "O-", "L", "SY", "HF", "GEL", "BUG")
return ..()
/obj/item/reagent_containers/blood/APlus
@@ -72,6 +76,18 @@
/obj/item/reagent_containers/blood/universal
blood_type = "U"
/obj/item/reagent_containers/blood/synthetics
blood_type = "SY"
/obj/item/reagent_containers/blood/oilblood
blood_type = "HF"
/obj/item/reagent_containers/blood/jellyblood
blood_type = "GEL"
/obj/item/reagent_containers/blood/insect
blood_type = "BUG"
/obj/item/reagent_containers/blood/attackby(obj/item/I, mob/user, params)
if (istype(I, /obj/item/pen) || istype(I, /obj/item/toy/crayon))
if(!user.is_literate())
@@ -196,3 +196,318 @@
volume = 250
list_reagents = list("holywater" = 150, "tiresolution" = 50, "dizzysolution" = 50)
amount_per_transfer_from_this = 50
#define HYPO_SPRAY 0
#define HYPO_INJECT 1
#define WAIT_SPRAY 25
#define WAIT_INJECT 25
#define SELF_SPRAY 15
#define SELF_INJECT 15
#define DELUXE_WAIT_SPRAY 20
#define DELUXE_WAIT_INJECT 20
#define DELUXE_SELF_SPRAY 10
#define DELUXE_SELF_INJECT 10
#define COMBAT_WAIT_SPRAY 0
#define COMBAT_WAIT_INJECT 0
#define COMBAT_SELF_SPRAY 0
#define COMBAT_SELF_INJECT 0
//A vial-loaded hypospray. Cartridge-based!
/obj/item/hypospray/mkii
name = "hypospray mk.II"
icon_state = "hypo2"
icon = 'icons/obj/syringe.dmi'
desc = "A new development from DeForest Medical, this hypospray takes 30-unit vials as the drug supply for easy swapping."
w_class = WEIGHT_CLASS_TINY
var/list/allowed_containers = list(/obj/item/reagent_containers/glass/bottle/vial/tiny, /obj/item/reagent_containers/glass/bottle/vial/small)
var/mode = HYPO_INJECT
var/obj/item/reagent_containers/glass/bottle/vial/vial
var/start_vial = /obj/item/reagent_containers/glass/bottle/vial/small
var/spawnwithvial = TRUE
var/inject_wait = WAIT_INJECT
var/spray_wait = WAIT_SPRAY
var/spray_self = SELF_SPRAY
var/inject_self = SELF_INJECT
var/quickload = FALSE
var/penetrates = FALSE
/obj/item/hypospray/mkii/brute
start_vial = /obj/item/reagent_containers/glass/bottle/vial/small/preloaded/bicaridine
/obj/item/hypospray/mkii/toxin
start_vial = /obj/item/reagent_containers/glass/bottle/vial/small/preloaded/antitoxin
/obj/item/hypospray/mkii/oxygen
start_vial = /obj/item/reagent_containers/glass/bottle/vial/small/preloaded/dexalin
/obj/item/hypospray/mkii/burn
start_vial = /obj/item/reagent_containers/glass/bottle/vial/small/preloaded/kelotane
/obj/item/hypospray/mkii/tricord
start_vial = /obj/item/reagent_containers/glass/bottle/vial/small/preloaded/tricord
/obj/item/hypospray/mkii/enlarge
spawnwithvial = FALSE
/obj/item/hypospray/mkii/CMO
name = "hypospray mk.II deluxe"
allowed_containers = list(/obj/item/reagent_containers/glass/bottle/vial/tiny, /obj/item/reagent_containers/glass/bottle/vial/small, /obj/item/reagent_containers/glass/bottle/vial/large)
icon_state = "cmo2"
desc = "The Deluxe Hypospray can take larger-size vials. It also acts faster and delivers more reagents per spray."
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
start_vial = /obj/item/reagent_containers/glass/bottle/vial/large/preloaded/CMO
inject_wait = DELUXE_WAIT_INJECT
spray_wait = DELUXE_WAIT_SPRAY
spray_self = DELUXE_SELF_SPRAY
inject_self = DELUXE_SELF_INJECT
/obj/item/hypospray/mkii/CMO/combat
name = "combat hypospray mk.II"
desc = "A combat-ready deluxe hypospray that acts almost instantly. It can be tactically reloaded by using a vial on it."
icon_state = "combat2"
start_vial = /obj/item/reagent_containers/glass/bottle/vial/large/preloaded/combat
inject_wait = COMBAT_WAIT_INJECT
spray_wait = COMBAT_WAIT_SPRAY
spray_self = COMBAT_SELF_SPRAY
inject_self = COMBAT_SELF_INJECT
quickload = TRUE
penetrates = TRUE
/obj/item/hypospray/mkii/Initialize()
. = ..()
if(!spawnwithvial)
update_icon()
return
if(start_vial)
vial = new start_vial
update_icon()
/obj/item/hypospray/mkii/update_icon()
..()
icon_state = "[initial(icon_state)][vial ? "" : "-e"]"
if(ismob(loc))
var/mob/M = loc
M.update_inv_hands()
return
/obj/item/hypospray/mkii/examine(mob/user)
. = ..()
if(vial)
to_chat(user, "[vial] has [vial.reagents.total_volume]u remaining.")
else
to_chat(user, "It has no vial loaded in.")
to_chat(user, "[src] is set to [mode ? "Inject" : "Spray"] contents on application.")
/obj/item/hypospray/mkii/proc/unload_hypo(obj/item/I, mob/user)
if((istype(I, /obj/item/reagent_containers/glass/bottle/vial)))
var/obj/item/reagent_containers/glass/bottle/vial/V = I
V.forceMove(user.loc)
user.put_in_hands(V)
to_chat(user, "<span class='notice'>You remove [vial] from [src].</span>")
vial = null
update_icon()
playsound(loc, 'sound/weapons/empty.ogg', 50, 1)
else
to_chat(user, "<span class='notice'>This hypo isn't loaded!</span>")
return
/obj/item/hypospray/mkii/attackby(obj/item/I, mob/living/user)
if((istype(I, /obj/item/reagent_containers/glass/bottle/vial) && vial != null))
if(!quickload)
to_chat(user, "<span class='warning'>[src] can not hold more than one vial!</span>")
return FALSE
unload_hypo(vial, user)
if((istype(I, /obj/item/reagent_containers/glass/bottle/vial)))
var/obj/item/reagent_containers/glass/bottle/vial/V = I
if(!is_type_in_list(V, allowed_containers))
to_chat(user, "<span class='notice'>[src] doesn't accept this type of vial.</span>")
return FALSE
if(!user.transferItemToLoc(V,src))
return FALSE
vial = V
user.visible_message("<span class='notice'>[user] has loaded a vial into [src].</span>","<span class='notice'>You have loaded [vial] into [src].</span>")
update_icon()
playsound(loc, 'sound/weapons/autoguninsert.ogg', 35, 1)
return TRUE
else
to_chat(user, "<span class='notice'>This doesn't fit in [src].</span>")
return FALSE
return FALSE
/obj/item/hypospray/mkii/AltClick(mob/user)
if(vial)
vial.attack_self(user)
// Gunna allow this for now, still really don't approve - Pooj
/obj/item/hypospray/mkii/emag_act(mob/user)
. = ..()
if(obj_flags & EMAGGED)
to_chat(user, "[src] happens to be already overcharged.")
return
inject_wait = COMBAT_WAIT_INJECT
spray_wait = COMBAT_WAIT_SPRAY
spray_self = COMBAT_SELF_INJECT
inject_self = COMBAT_SELF_SPRAY
penetrates = TRUE
to_chat(user, "You overcharge [src]'s control circuit.")
obj_flags |= EMAGGED
return TRUE
/obj/item/hypospray/mkii/attack_hand(mob/user)
. = ..() //Don't bother changing this or removing it from containers will break.
/obj/item/hypospray/mkii/attack(obj/item/I, mob/user, params)
return
/obj/item/hypospray/mkii/afterattack(atom/target, mob/user, proximity)
if(!vial)
return
if(!proximity)
return
if(!ismob(target))
return
var/mob/living/L
if(isliving(target))
L = target
if(!penetrates && !L.can_inject(user, 1)) //This check appears another four times, since otherwise the penetrating sprays will break in do_mob.
return
if(!L && !target.is_injectable()) //only checks on non-living mobs, due to how can_inject() handles
to_chat(user, "<span class='warning'>You cannot directly fill [target]!</span>")
return
if(target.reagents.total_volume >= target.reagents.maximum_volume)
to_chat(user, "<span class='notice'>[target] is full.</span>")
return
if(ishuman(L))
var/obj/item/bodypart/affecting = L.get_bodypart(check_zone(user.zone_selected))
if(!affecting)
to_chat(user, "<span class='warning'>The limb is missing!</span>")
return
if(affecting.status != BODYPART_ORGANIC)
to_chat(user, "<span class='notice'>Medicine won't work on a robotic limb!</span>")
return
var/contained = vial.reagents.log_list()
log_combat(user, L, "attemped to inject", src, addition="which had [contained]")
//Always log attemped injections for admins
if(vial != null)
switch(mode)
if(HYPO_INJECT)
if(L) //living mob
if(L != user)
L.visible_message("<span class='danger'>[user] is trying to inject [L] with [src]!</span>", \
"<span class='userdanger'>[user] is trying to inject [L] with [src]!</span>")
if(!do_mob(user, L, inject_wait))
return
if(!penetrates && !L.can_inject(user, 1))
return
if(!vial.reagents.total_volume)
return
if(L.reagents.total_volume >= L.reagents.maximum_volume)
return
L.visible_message("<span class='danger'>[user] uses the [src] on [L]!</span>", \
"<span class='userdanger'>[user] uses the [src] on [L]!</span>")
else
if(!do_mob(user, L, inject_self))
return
if(!penetrates && !L.can_inject(user, 1))
return
if(!vial.reagents.total_volume)
return
if(L.reagents.total_volume >= L.reagents.maximum_volume)
return
log_attack("<font color='red'>[user.name] ([user.ckey]) applied [src] to [L.name] ([L.ckey]), which had [contained] (INTENT: [uppertext(user.a_intent)]) (MODE: [src.mode])</font>")
L.log_message("<font color='orange'>applied [src] to themselves ([contained]).</font>", INDIVIDUAL_ATTACK_LOG)
var/fraction = min(vial.amount_per_transfer_from_this/vial.reagents.total_volume, 1)
vial.reagents.reaction(L, INJECT, fraction)
vial.reagents.trans_to(target, vial.amount_per_transfer_from_this)
if(vial.amount_per_transfer_from_this >= 15)
playsound(loc,'sound/items/hypospray_long.ogg',50, 1, -1)
if(vial.amount_per_transfer_from_this < 15)
playsound(loc, pick('sound/items/hypospray.ogg','sound/items/hypospray2.ogg'), 50, 1, -1)
to_chat(user, "<span class='notice'>You inject [vial.amount_per_transfer_from_this] units of the solution. The hypospray's cartridge now contains [vial.reagents.total_volume] units.</span>")
if(HYPO_SPRAY)
if(L) //living mob
if(L != user)
L.visible_message("<span class='danger'>[user] is trying to spray [L] with [src]!</span>", \
"<span class='userdanger'>[user] is trying to spray [L] with [src]!</span>")
if(!do_mob(user, L, spray_wait))
return
if(!penetrates && !L.can_inject(user, 1))
return
if(!vial.reagents.total_volume)
return
if(L.reagents.total_volume >= L.reagents.maximum_volume)
return
L.visible_message("<span class='danger'>[user] uses the [src] on [L]!</span>", \
"<span class='userdanger'>[user] uses the [src] on [L]!</span>")
else
if(!do_mob(user, L, spray_self))
return
if(!penetrates && !L.can_inject(user, 1))
return
if(!vial.reagents.total_volume)
return
if(L.reagents.total_volume >= L.reagents.maximum_volume)
return
log_attack("<font color='red'>[user.name] ([user.ckey]) applied [src] to [L.name] ([L.ckey]), which had [contained] (INTENT: [uppertext(user.a_intent)]) (MODE: [src.mode])</font>")
L.log_message("<font color='orange'>applied [src] to themselves ([contained]).</font>", INDIVIDUAL_ATTACK_LOG)
var/fraction = min(vial.amount_per_transfer_from_this/vial.reagents.total_volume, 1)
vial.reagents.reaction(L, PATCH, fraction)
vial.reagents.trans_to(target, vial.amount_per_transfer_from_this)
if(vial.amount_per_transfer_from_this >= 15)
playsound(loc,'sound/items/hypospray_long.ogg',50, 1, -1)
if(vial.amount_per_transfer_from_this < 15)
playsound(loc, pick('sound/items/hypospray.ogg','sound/items/hypospray2.ogg'), 50, 1, -1)
to_chat(user, "<span class='notice'>You spray [vial.amount_per_transfer_from_this] units of the solution. The hypospray's cartridge now contains [vial.reagents.total_volume] units.</span>")
else
to_chat(user, "<span class='notice'>[src] doesn't work here!</span>")
return
/obj/item/hypospray/mkii/attack_self(mob/living/user)
if(user)
if(user.incapacitated())
return
else if(!vial)
to_chat(user, "This Hypo needs to be loaded first!")
return
else
unload_hypo(vial,user)
/obj/item/hypospray/mkii/verb/modes()
set name = "Toggle Application Mode"
set category = "Object"
set src in usr
var/mob/M = usr
switch(mode)
if(HYPO_SPRAY)
mode = HYPO_INJECT
to_chat(M, "[src] is now set to inject contents on application.")
if(HYPO_INJECT)
mode = HYPO_SPRAY
to_chat(M, "[src] is now set to spray contents on application.")
#undef HYPO_SPRAY
#undef HYPO_INJECT
#undef WAIT_SPRAY
#undef WAIT_INJECT
#undef SELF_SPRAY
#undef SELF_INJECT
#undef DELUXE_WAIT_SPRAY
#undef DELUXE_WAIT_INJECT
#undef DELUXE_SELF_SPRAY
#undef DELUXE_SELF_INJECT
#undef COMBAT_WAIT_SPRAY
#undef COMBAT_WAIT_INJECT
#undef COMBAT_SELF_SPRAY
#undef COMBAT_SELF_INJECT
@@ -0,0 +1,199 @@
//hypovials used with the MkII hypospray. See hypospray.dm.
/obj/item/reagent_containers/glass/bottle/vial
name = "broken hypovial"
desc = "A hypovial compatible with most hyposprays."
icon_state = "hypovial"
spillable = FALSE
var/comes_with = list() //Easy way of doing this.
volume = 10
possible_transfer_amounts = list(1,2,5,10)
obj_flags = UNIQUE_RENAME
unique_reskin = list("hypovial" = "hypovial",
"red hypovial" = "hypovial-b",
"blue hypovial" = "hypovial-d",
"green hypovial" = "hypovial-a",
"orange hypovial" = "hypovial-k",
"purple hypovial" = "hypovial-p",
"black hypovial" = "hypovial-t",
"pink hypovial" = "hypovial-pink"
)
always_reskinnable = TRUE
/obj/item/reagent_containers/glass/bottle/vial/Initialize()
. = ..()
if(!icon_state)
icon_state = "hypovial"
for(var/R in comes_with)
reagents.add_reagent(R,comes_with[R])
update_icon()
/obj/item/reagent_containers/glass/bottle/vial/on_reagent_change()
update_icon()
/obj/item/reagent_containers/glass/bottle/vial/update_icon()
cut_overlays()
if(reagents.total_volume)
var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "hypovial10")
var/percent = round((reagents.total_volume / volume) * 100)
switch(percent)
if(0 to 9)
filling.icon_state = "hypovial10"
if(10 to 29)
filling.icon_state = "hypovial25"
if(30 to 49)
filling.icon_state = "hypovial50"
if(50 to 85)
filling.icon_state = "hypovial75"
if(86 to INFINITY)
filling.icon_state = "hypovial100"
filling.color = mix_color_from_reagents(reagents.reagent_list)
add_overlay(filling)
/obj/item/reagent_containers/glass/bottle/vial/tiny
name = "small hypovial"
//Shouldn't be possible to get this without adminbuse
/obj/item/reagent_containers/glass/bottle/vial/small
name = "hypovial"
volume = 60
possible_transfer_amounts = list(5,10)
/obj/item/reagent_containers/glass/bottle/vial/small/bluespace
volume = 120
possible_transfer_amounts = list(5,10)
name = "bluespace hypovial"
icon_state = "hypovialbs"
unique_reskin = null
/obj/item/reagent_containers/glass/bottle/vial/large
name = "large hypovial"
desc = "A large hypovial, for deluxe hypospray models."
icon_state = "hypoviallarge"
volume = 120
possible_transfer_amounts = list(5,10,15,20)
unique_reskin = list("large hypovial" = "hypoviallarge",
"large red hypovial" = "hypoviallarge-b",
"large blue hypovial" = "hypoviallarge-d",
"large green hypovial" = "hypoviallarge-a",
"large orange hypovial" = "hypoviallarge-k",
"large purple hypovial" = "hypoviallarge-p",
"large black hypovial" = "hypoviallarge-t"
)
/obj/item/reagent_containers/glass/bottle/vial/large/update_icon()
cut_overlays()
if(reagents.total_volume)
var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "hypoviallarge10")
var/percent = round((reagents.total_volume / volume) * 100)
switch(percent)
if(0 to 9)
filling.icon_state = "hypoviallarge10"
if(10 to 29)
filling.icon_state = "hypoviallarge25"
if(30 to 49)
filling.icon_state = "hypoviallarge50"
if(50 to 85)
filling.icon_state = "hypoviallarge75"
if(86 to INFINITY)
filling.icon_state = "hypoviallarge100"
filling.color = mix_color_from_reagents(reagents.reagent_list)
add_overlay(filling)
/obj/item/reagent_containers/glass/bottle/vial/large/bluespace
possible_transfer_amounts = list(5,10,15,20)
name = "bluespace large hypovial"
volume = 240
icon_state = "hypoviallargebs"
unique_reskin = null
/obj/item/reagent_containers/glass/bottle/vial/small/preloaded/bicaridine
name = "red hypovial (bicaridine)"
icon_state = "hypovial-b"
comes_with = list("bicaridine" = 30)
/obj/item/reagent_containers/glass/bottle/vial/small/preloaded/antitoxin
name = "green hypovial (Anti-Tox)"
icon_state = "hypovial-a"
comes_with = list("antitoxin" = 30)
/obj/item/reagent_containers/glass/bottle/vial/small/preloaded/kelotane
name = "orange hypovial (kelotane)"
icon_state = "hypovial-k"
comes_with = list("kelotane" = 30)
/obj/item/reagent_containers/glass/bottle/vial/small/preloaded/dexalin
name = "blue hypovial (dexalin)"
icon_state = "hypovial-d"
comes_with = list("dexalin" = 30)
/obj/item/reagent_containers/glass/bottle/vial/small/preloaded/tricord
name = "hypovial (tricordrazine)"
icon_state = "hypovial"
comes_with = list("tricordrazine" = 30)
/obj/item/reagent_containers/glass/bottle/vial/small/preloaded/breastreduction
name = "pink hypovial (breast treatment)"
icon_state = "hypovial-pink"
comes_with = list("BEsmaller_hypo" = 30)
/obj/item/reagent_containers/glass/bottle/vial/small/preloaded/penisreduction
name = "pink hypovial (penis treatment)"
icon_state = "hypovial-pink"
comes_with = list("PEsmaller_hypo" = 30)
/obj/item/reagent_containers/glass/bottle/vial/large/preloaded/CMO
name = "deluxe hypovial"
icon_state = "hypoviallarge-cmos"
comes_with = list("omnizine" = 20, "leporazine" = 20, "atropine" = 20)
/obj/item/reagent_containers/glass/bottle/vial/large/preloaded/bicaridine
name = "large red hypovial (bicaridine)"
icon_state = "hypoviallarge-b"
comes_with = list("bicaridine" = 60)
/obj/item/reagent_containers/glass/bottle/vial/large/preloaded/antitoxin
name = "large green hypovial (anti-tox)"
icon_state = "hypoviallarge-a"
comes_with = list("antitoxin" = 60)
/obj/item/reagent_containers/glass/bottle/vial/large/preloaded/kelotane
name = "large orange hypovial (kelotane)"
icon_state = "hypoviallarge-k"
comes_with = list("kelotane" = 60)
/obj/item/reagent_containers/glass/bottle/vial/large/preloaded/dexalin
name = "large blue hypovial (dexalin)"
icon_state = "hypoviallarge-d"
comes_with = list("dexalin" = 60)
/obj/item/reagent_containers/glass/bottle/vial/large/preloaded/charcoal
name = "large black hypovial (charcoal)"
icon_state = "hypoviallarge-t"
comes_with = list("charcoal" = 60)
/obj/item/reagent_containers/glass/bottle/vial/large/preloaded/tricord
name = "large hypovial (tricord)"
icon_state = "hypoviallarge"
comes_with = list("tricordrazine" = 60)
/obj/item/reagent_containers/glass/bottle/vial/large/preloaded/salglu
name = "large green hypovial (salglu)"
icon_state = "hypoviallarge-a"
comes_with = list("salglu_solution" = 60)
/obj/item/reagent_containers/glass/bottle/vial/large/preloaded/synthflesh
name = "large orange hypovial (synthflesh)"
icon_state = "hypoviallarge-k"
comes_with = list("synthflesh" = 60)
/obj/item/reagent_containers/glass/bottle/vial/large/preloaded/combat
name = "combat hypovial"
icon_state = "hypoviallarge-t"
comes_with = list("epinephrine" = 3, "omnizine" = 19, "leporazine" = 19, "atropine" = 19) //Epinephrine's main effect here is to kill suff damage, so we don't need much given atropine
@@ -186,7 +186,6 @@
/obj/item/reagent_containers/pill/antirad_plus
name = "prussian blue pill"
desc = "Used to treat heavy radition poisoning."
icon = 'modular_citadel/icons/obj/modularpills.dmi'
icon_state = "prussian_blue"
list_reagents = list("prussian_blue" = 25, "water" = 10)
roundstart = 1
@@ -194,7 +193,6 @@
/obj/item/reagent_containers/pill/mutarad
name = "radiation treatment deluxe pill"
desc = "Used to treat heavy radition poisoning and genetic defects."
icon = 'modular_citadel/icons/obj/modularpills.dmi'
icon_state = "anit_rad_fixgene"
list_reagents = list("prussian_blue" = 15, "potass_iodide" = 15, "mutadone" = 15, "water" = 5)
roundstart = 1