mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
[MIRROR] Changeling Blood Test (#11353)
Co-authored-by: Will <7099514+Willburd@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
4de760e15e
commit
6eacc51e1c
@@ -38,6 +38,10 @@
|
||||
src.pixel_x = rand(-6.0, 6) //Randomizes postion
|
||||
src.pixel_y = rand(-6.0, 6)
|
||||
|
||||
/obj/item/reagent_containers/food/attackby(obj/item/W, mob/user)
|
||||
. = ..()
|
||||
attempt_changeling_test(W,user)
|
||||
|
||||
/obj/item/reagent_containers/food/afterattack(atom/A, mob/user, proximity, params)
|
||||
if((center_of_mass_x || center_of_mass_y) && proximity && params && istype(A, /obj/structure/table))
|
||||
//Places the item on a grid
|
||||
|
||||
@@ -249,6 +249,7 @@
|
||||
var/rad_levels = NORMAL_RADIATION_RESISTANCE //For handle_mutations_and_radiation
|
||||
var/rad_removal_mod = 1
|
||||
|
||||
var/ambulant_blood = FALSE // Force changeling blood effects
|
||||
|
||||
var/rarity_value = 1 // Relative rarity/collector value for this species.
|
||||
var/economic_modifier = 2 // How much money this species makes
|
||||
|
||||
@@ -197,3 +197,15 @@
|
||||
|
||||
sdisability=SPINE
|
||||
activation_message="Your legs shake..."
|
||||
|
||||
/datum/trait/negative/ambulant_blood
|
||||
name = "Ambulant Blood"
|
||||
desc = "Your blood reacts to hostile stimulation such as burning when seperated from your body, as if it was its own creature. You WILL be mistaken for a changeling, you may want to document this in your medical records."
|
||||
var_changes = list("ambulant_blood" = TRUE)
|
||||
cost = -1
|
||||
|
||||
is_genetrait = TRUE
|
||||
hidden = FALSE
|
||||
activity_bounds = DNA_HARDER_BOUNDS // Shouldn't be easy for genetics to find this
|
||||
|
||||
activation_message="You feel like there are spiders in your veins..."
|
||||
|
||||
@@ -50,6 +50,7 @@ var/const/CE_STABLE_THRESHOLD = 0.5
|
||||
if(isSynthetic())
|
||||
B.data["species"] = "synthetic"
|
||||
|
||||
B.data["changeling"] = (!isnull(mind) && is_changeling(mind)) || species?.ambulant_blood
|
||||
B.color = B.data["blood_colour"]
|
||||
B.name = B.data["blood_name"]
|
||||
|
||||
@@ -295,6 +296,7 @@ var/const/CE_STABLE_THRESHOLD = 0.5
|
||||
B.data["resistances"] |= GetResistances()
|
||||
B.data["blood_DNA"] = copytext(src.dna.unique_enzymes,1,0)
|
||||
B.data["blood_type"] = copytext(src.dna.b_type,1,0)
|
||||
B.data["changeling"] = (!isnull(mind) && is_changeling(mind)) || species?.ambulant_blood
|
||||
|
||||
// Putting this here due to return shenanigans.
|
||||
if(ishuman(src))
|
||||
|
||||
@@ -159,6 +159,7 @@
|
||||
var/datum/reagent/blood/B = R
|
||||
result["blood_type"] = B.data["blood_type"]
|
||||
result["blood_dna"] = B.data["blood_DNA"]
|
||||
result["changeling"] = B.data["changeling"]
|
||||
|
||||
arguments["analysis"] = result
|
||||
tgui_modal_message(src, id, "", null, arguments)
|
||||
|
||||
@@ -543,5 +543,5 @@
|
||||
|
||||
/obj/structure/reagent_dispensers/bloodbarrel/Initialize(mapload)
|
||||
. = ..()
|
||||
reagents.add_reagent(REAGENT_ID_BLOOD, 1000, list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"="O-","resistances"=null,"trace_chem"=null))
|
||||
reagents.add_reagent(REAGENT_ID_BLOOD, 1000, list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"="O-","resistances"=null,"trace_chem"=null,"changeling"=FALSE))
|
||||
AddElement(/datum/element/climbable)
|
||||
|
||||
@@ -164,3 +164,10 @@
|
||||
EXTRAPOLATOR_ACT_SET(., EXTRAPOLATOR_ACT_PRIORITY_ISOLATE)
|
||||
var/datum/reagent/blood/blood = reagents.get_reagent(REAGENT_ID_BLOOD)
|
||||
EXTRAPOLATOR_ACT_ADD_DISEASES(., blood?.get_diseases())
|
||||
|
||||
/obj/item/reagent_containers/proc/attempt_changeling_test(var/obj/item/W,var/mob/user)
|
||||
if(is_open_container() && W.is_hot())
|
||||
var/datum/reagent/blood/B = reagents.get_reagent("blood")
|
||||
if(B)
|
||||
balloon_alert(user, "\The [W] burns the blood in \the [src].")
|
||||
B.changling_blood_test(reagents)
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
if(blood_type != null)
|
||||
label_text = "[blood_type]"
|
||||
update_iv_label()
|
||||
reagents.add_reagent(reag_id, 200, list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=blood_type,"resistances"=null,"trace_chem"=null))
|
||||
reagents.add_reagent(reag_id, 200, list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=blood_type,"resistances"=null,"trace_chem"=null,"changeling"=FALSE))
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/blood/on_reagent_change()
|
||||
|
||||
@@ -168,6 +168,7 @@
|
||||
if(W && W.w_class <= w_class && (flags & OPENCONTAINER) && user.a_intent != I_HELP)
|
||||
balloon_alert(user, "[W] dipped into \the [src].")
|
||||
reagents.touch_obj(W, reagents.total_volume)
|
||||
attempt_changeling_test(W,user)
|
||||
|
||||
/obj/item/reagent_containers/glass/proc/update_name_label()
|
||||
if(label_text == "")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/obj/item/reagent_containers/glass/beaker/vial/culture
|
||||
name = "virus culture"
|
||||
desc = "A bottle with a virus culture"
|
||||
var/list/data = list("donor" = null, "viruses" = null, "blood_DNA" = null, "blood_type" = null, "resistances" = null, "trace_chems" = null)
|
||||
var/list/data = list("donor" = null, "viruses" = null, "blood_DNA" = null, "blood_type" = null, "resistances" = null, "trace_chems" = null, "changeling"=FALSE)
|
||||
var/list/diseases = list()
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/vial/culture/cold
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/datum/reagent/blood
|
||||
data = new/list("donor" = null, "viruses" = null, "species" = SPECIES_HUMAN, "blood_DNA" = null, "blood_type" = null, "blood_colour" = "#A10808", "resistances" = null, "trace_chem" = null, REAGENT_ID_ANTIBODIES = list())
|
||||
data = new/list("donor" = null, "viruses" = null, "species" = SPECIES_HUMAN, "blood_DNA" = null, "blood_type" = null, "blood_colour" = "#A10808", "resistances" = null, "trace_chem" = null, REAGENT_ID_ANTIBODIES = list(), "changeling" = FALSE)
|
||||
name = REAGENT_BLOOD
|
||||
id = REAGENT_ID_BLOOD
|
||||
description = "Blood."
|
||||
@@ -113,6 +113,9 @@
|
||||
if(!data || !newdata)
|
||||
return
|
||||
|
||||
if(newdata["species"] != "synthetic" && (data["changeling"] || newdata["changeling"]))
|
||||
data["changeling"] = TRUE // Spread to other samples as an antag tactic
|
||||
|
||||
if(data["viruses"] || newdata["viruses"])
|
||||
var/list/mix1 = data["viruses"]
|
||||
var/list/mix2 = newdata["viruses"]
|
||||
@@ -170,12 +173,23 @@
|
||||
|
||||
if(!H.isSynthetic() && data["species"] == "synthetic") // Remember not to inject oil into your veins, it's bad for you.
|
||||
H.reagents.add_reagent(REAGENT_ID_TOXIN, removed * 1.5)
|
||||
|
||||
return
|
||||
|
||||
M.inject_blood(src, volume * volume_mod)
|
||||
remove_self(volume)
|
||||
|
||||
/datum/reagent/blood/proc/changling_blood_test(var/datum/reagents/holder)
|
||||
if(data["changeling"])
|
||||
var/location = get_turf(holder.my_atom)
|
||||
holder.my_atom.visible_message(span_danger("The blood in \the [holder.my_atom] screams and leaps out!"))
|
||||
if(istype(holder.my_atom,/obj/item/reagent_containers/glass))
|
||||
holder.splash(location, holder.total_volume)
|
||||
holder.clear_reagents() // lets be sure it's all gone if it was in something weird instead
|
||||
playsound(holder.my_atom, 'sound/effects/splat.ogg', 50, 1)
|
||||
playsound(holder.my_atom, 'sound/voice/hiss6.ogg', 50, 1)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/reagent/blood/proc/get_diseases()
|
||||
. = list()
|
||||
if(data && data["viruses"])
|
||||
|
||||
Reference in New Issue
Block a user