Adds changeling blood tests (heat up blood samples to test if someone's a ling or not) (#8023)

* changeling blood tests + changeling readapt sound

* drops shield loudness down to 1 because apparently it's weaker than i thought it was

* chameleon skin no longer contributes to loudness
This commit is contained in:
deathride58
2019-02-22 09:05:23 -05:00
committed by kevinz000
parent f50868f6a3
commit 38ae805c49
17 changed files with 96 additions and 23 deletions
+8 -2
View File
@@ -361,6 +361,8 @@
var/required_temp = C.required_temp
var/is_cold_recipe = C.is_cold_recipe
var/meets_temp_requirement = 0
var/has_special_react = C.special_react
var/can_special_react = 0
for(var/B in cached_required_reagents)
if(!has_reagent(B, cached_required_reagents[B]))
@@ -396,7 +398,10 @@
if(required_temp == 0 || (is_cold_recipe && chem_temp <= required_temp) || (!is_cold_recipe && chem_temp >= required_temp))
meets_temp_requirement = 1
if(total_matching_reagents == total_required_reagents && total_matching_catalysts == total_required_catalysts && matching_container && matching_other && meets_temp_requirement)
if(!has_special_react || C.check_special_react(src))
can_special_react = 1
if(total_matching_reagents == total_required_reagents && total_matching_catalysts == total_required_catalysts && matching_container && matching_other && meets_temp_requirement && can_special_react)
possible_reactions += C
if(possible_reactions.len)
@@ -412,6 +417,7 @@
selected_reaction = competitor
var/list/cached_required_reagents = selected_reaction.required_reagents
var/list/cached_results = selected_reaction.results
var/special_react_result = selected_reaction.check_special_react(src)
var/list/multiplier = INFINITY
for(var/B in cached_required_reagents)
multiplier = min(multiplier, round(get_reagent_amount(B) / cached_required_reagents[B]))
@@ -443,7 +449,7 @@
ME2.name = "used slime extract"
ME2.desc = "This extract has been used up."
selected_reaction.on_reaction(src, multiplier)
selected_reaction.on_reaction(src, multiplier, special_react_result)
reaction_occurred = 1
while(reaction_occurred)
+5 -1
View File
@@ -13,13 +13,17 @@
var/required_temp = 0
var/is_cold_recipe = 0 // Set to 1 if you want the recipe to only react when it's BELOW the required temp.
var/special_react = FALSE //Determines if the recipe has special conditions for it to react. Mainly used for ling blood tests
var/mix_message = "The solution begins to bubble." //The message shown to nearby people upon mixing, if applicable
var/mix_sound = 'sound/effects/bubbles.ogg' //The sound played upon mixing, if applicable
/datum/chemical_reaction/proc/on_reaction(datum/reagents/holder, created_volume)
/datum/chemical_reaction/proc/on_reaction(datum/reagents/holder, created_volume, specialreact)
return
//I recommend you set the result amount to the total volume of all components.
/datum/chemical_reaction/proc/check_special_react(datum/reagents/holder)
return
/datum/chemical_reaction/proc/chemical_mob_spawn(datum/reagents/holder, amount_to_spawn, reaction_name, mob_class = HOSTILE_SPAWN, mob_faction = "chemicalsummon")
if(holder && holder.my_atom)
var/atom/A = holder.my_atom
@@ -464,4 +464,30 @@
results = list("firefighting_foam" = 3)
required_reagents = list("stabilizing_agent" = 1,"fluorosurfactant" = 1,"carbon" = 1)
required_temp = 200
is_cold_recipe = 1
is_cold_recipe = 1
/datum/chemical_reaction/reagent_explosion/lingblood
name = "Changeling Blood Reaction"
id = "ling_blood_reaction"
results = list("ash" = 1)
required_reagents = list("blood" = 1)
strengthdiv = 4 //The explosion should be somewhat strong if a full 15u is heated within a syringe. !!fun!!
required_temp = 666
special_react = TRUE
mix_sound = 'sound/effects/lingbloodhiss.ogg'
mix_message = "The blood bubbles and sizzles violently!"
/datum/chemical_reaction/reagent_explosion/lingblood/check_special_react(datum/reagents/holder)
if(!holder)
return FALSE
var/list/D = holder.get_data("blood")
if(D && D["changeling_loudness"])
return (D["changeling_loudness"] >= 4 ? D["changeling_loudness"] : FALSE)
else
return FALSE
/datum/chemical_reaction/reagent_explosion/lingblood/on_reaction(datum/reagents/holder, created_volume, specialreact)
if(specialreact >= 10)
return ..()
else
return FALSE