Ghommies' requests.

This commit is contained in:
Fermi
2019-09-19 23:31:36 +01:00
parent b8190552f1
commit 3f2933adbf
17 changed files with 114 additions and 84 deletions
+17 -3
View File
@@ -171,10 +171,24 @@ GLOBAL_LIST_INIT(bitfields, list(
"rad_flags" = list(
"RAD_PROTECT_CONTENTS" = RAD_PROTECT_CONTENTS,
"RAD_NO_CONTAMINATE" = RAD_NO_CONTAMINATE,
),
),
"disease_flags" = list(
"CURABLE" = CURABLE,
"CAN_CARRY" = CAN_CARRY,
"CAN_RESIST" = CAN_RESIST
),
))
),
"reagent_flags" = list(
"REAGENT_DEAD_PROCESS" = REAGENT_DEAD_PROCESS,
"REAGENT_DONOTSPLIT" = REAGENT_DONOTSPLIT,
"REAGENT_ONLYINVERSE" = REAGENT_ONLYINVERSE,
"REAGENT_ONMOBMERGE" = REAGENT_ONMOBMERGE,
"REAGENT_INVISIBLE" = REAGENT_INVISIBLE,
"REAGENT_FORCEONNEW" = REAGENT_FORCEONNEW,
"REAGENT_SNEAKYNAME" = REAGENT_SNEAKYNAME,
"REAGENT_SPLITRETAINVOL" = REAGENT_SPLITRETAINVOL
),
"clear_conversion" = list(
"REACTION_CLEAR_IMPURE" = REACTION_CLEAR_IMPURE,
"REACTION_CLEAR_INVERSE" = REACTION_CLEAR_INVERSE
),
))
+1 -1
View File
@@ -385,7 +385,7 @@ SLIME SCANNER
if(M.reagents.reagent_list.len)
var/list/datum/reagent/reagents = list()
for(var/datum/reagent/R in M.reagents.reagent_list)
if(R.reagentFlags & REAGENT_INVISIBLE)
if(R.reagent_flags & REAGENT_INVISIBLE)
continue
reagents += R
+1 -1
View File
@@ -45,7 +45,7 @@
//Procs called while dead
/mob/living/carbon/proc/handle_death()
for(var/datum/reagent/R in reagents.reagent_list)
if(R.reagentFlags & REAGENT_DEAD_PROCESS)
if(R.reagent_flags & REAGENT_DEAD_PROCESS)
R.on_mob_dead(src)
///////////////
@@ -0,0 +1,23 @@
How to code fermichem reactions:
First off, probably read though the readme for standard reagent mechanisms, this builds on top of that.
#bitflags
for `datum/reagent/` you have the following options with `var/reagent_flags`:
```
REAGENT_DEAD_PROCESS calls on_mob_dead() if present in a dead body
REAGENT_DONOTSPLIT Do not split the chem at all during processing
REAGENT_ONLYINVERSE Only invert chem, no splitting
REAGENT_ONMOBMERGE Call on_mob_life proc when reagents are merging.
REAGENT_INVISIBLE Doesn't appear on handheld health analyzers.
REAGENT_FORCEONNEW Forces a on_new() call without a data overhead
REAGENT_SNEAKYNAME When inverted, the inverted chem uses the name of the original chem
REAGENT_SPLITRETAINVOL Retains initial volume of chem when splitting
```
for `datum/chemical_reaction/` under `var/clear_conversion`
```
REACTION_CLEAR_IMPURE Convert into impure/pure on reaction completion
REACTION_CLEAR_INVERSE Convert into inverse on reaction completion when purity is low enough
```
+2 -2
View File
@@ -880,7 +880,7 @@
if(my_atom)
my_atom.on_reagent_change(ADD_REAGENT)
if(isliving(my_atom))
if(R.reagentFlags & REAGENT_ONMOBMERGE)//Forces on_mob_add proc when a chem is merged
if(R.reagent_flags & REAGENT_ONMOBMERGE)//Forces on_mob_add proc when a chem is merged
R.on_mob_add(my_atom, amount)
R.on_merge(data, amount, my_atom, other_purity)
if(!no_react)
@@ -899,7 +899,7 @@
if(data)
R.data = data
R.on_new(data)
if(R.reagentFlags & REAGENT_FORCEONNEW)//Allows on new without data overhead.
if(R.reagent_flags & REAGENT_FORCEONNEW)//Allows on new without data overhead.
R.on_new(pH) //Add more as desired.
@@ -405,7 +405,7 @@
if(!targetReagent)
CRASH("Tried to find a reagent that doesn't exist in the chem_master!")
analyzeVars = list("name" = initial(R.name), "state" = state, "color" = initial(R.color), "description" = initial(R.description), "metaRate" = T, "overD" = initial(R.overdose_threshold), "addicD" = initial(R.addiction_threshold), "purityF" = targetReagent.purity, "inverseRatioF" = initial(R.InverseChemVal), "purityE" = initial(Rcr.PurityMin), "minTemp" = initial(Rcr.OptimalTempMin), "maxTemp" = initial(Rcr.OptimalTempMax), "eTemp" = initial(Rcr.ExplodeTemp), "pHpeak" = pHpeakCache)
analyzeVars = list("name" = initial(R.name), "state" = state, "color" = initial(R.color), "description" = initial(R.description), "metaRate" = T, "overD" = initial(R.overdose_threshold), "addicD" = initial(R.addiction_threshold), "purityF" = targetReagent.purity, "inverseRatioF" = initial(R.inverse_chem_val), "purityE" = initial(Rcr.PurityMin), "minTemp" = initial(Rcr.OptimalTempMin), "maxTemp" = initial(Rcr.OptimalTempMax), "eTemp" = initial(Rcr.ExplodeTemp), "pHpeak" = pHpeakCache)
else
fermianalyze = FALSE
analyzeVars = list("name" = initial(R.name), "state" = state, "color" = initial(R.color), "description" = initial(R.description), "metaRate" = T, "overD" = initial(R.overdose_threshold), "addicD" = initial(R.addiction_threshold))
@@ -432,7 +432,7 @@
if(!targetReagent)
CRASH("Tried to find a reagent that doesn't exist in the chem_master!")
analyzeVars = list("name" = initial(R.name), "state" = state, "color" = initial(R.color), "description" = initial(R.description), "metaRate" = T, "overD" = initial(R.overdose_threshold), "addicD" = initial(R.addiction_threshold), "purityF" = targetReagent.purity, "inverseRatioF" = initial(R.InverseChemVal), "purityE" = initial(Rcr.PurityMin), "minTemp" = initial(Rcr.OptimalTempMin), "maxTemp" = initial(Rcr.OptimalTempMax), "eTemp" = initial(Rcr.ExplodeTemp), "pHpeak" = pHpeakCache)
analyzeVars = list("name" = initial(R.name), "state" = state, "color" = initial(R.color), "description" = initial(R.description), "metaRate" = T, "overD" = initial(R.overdose_threshold), "addicD" = initial(R.addiction_threshold), "purityF" = targetReagent.purity, "inverseRatioF" = initial(R.inverse_chem_val), "purityE" = initial(Rcr.PurityMin), "minTemp" = initial(Rcr.OptimalTempMin), "maxTemp" = initial(Rcr.OptimalTempMax), "eTemp" = initial(Rcr.ExplodeTemp), "pHpeak" = pHpeakCache)
else
fermianalyze = FALSE
analyzeVars = list("name" = initial(R.name), "state" = state, "color" = initial(R.color), "description" = initial(R.description), "metaRate" = T, "overD" = initial(R.overdose_threshold), "addicD" = initial(R.addiction_threshold))
+26 -33
View File
@@ -39,19 +39,12 @@
var/turf/loc = null //Should be the creation location!
var/pH = 7 //pH of the specific reagent, used for calculating the sum pH of a holder.
//var/SplitChem = FALSE //If the chem splits on metabolism
var/ImpureChem // What chemical is metabolised with an inpure reaction
var/InverseChemVal = 0 // If the impurity is below 0.5, replace ALL of the chem with InverseChem upon metabolising
var/InverseChem // What chem is metabolised when purity is below InverseChemVal, this shouldn't be made, but if it does, well, I guess I'll know about it.
var/impure_chem // What chemical is metabolised with an inpure reaction
var/inverse_chem_val = 0 // If the impurity is below 0.5, replace ALL of the chem with inverse_chemupon metabolising
var/inverse_chem // What chem is metabolised when purity is below inverse_chem_val, this shouldn't be made, but if it does, well, I guess I'll know about it.
var/metabolizing = FALSE
var/reagentFlags //REAGENT_DEAD_PROCESS, REAGENT_DONOTSPLIT, REAGENT_ONLYINVERSE, REAGENT_ONMOBMERGE, REAGENT_INVISIBLE, REAGENT_FORCEONNEW, REAGENT_SNEAKYNAME
//REAGENT_DEAD_PROCESS Calls on_mob_dead() if present in a dead body
//REAGENT_DONOTSPLIT Do not split the chem at all during processing
//REAGENT_ONLYINVERSE Only invert chem, no splitting
//REAGENT_ONMOBMERGE Call on_mob_life proc when reagents are merging.
//REAGENT_INVISIBLE Doesn't appear on handheld health analyzers.
//REAGENT_FORCEONNEW Forces a on_new() call without a data overhead
//REAGENT_SNEAKYNAME When inverted, the inverted chem uses the name of the original chem
//REAGENT_SPLITRETAINVOL Retains initial volume of chem when splitting
var/reagent_flags // See fermi/readme.dm REAGENT_DEAD_PROCESS, REAGENT_DONOTSPLIT, REAGENT_ONLYINVERSE, REAGENT_ONMOBMERGE, REAGENT_INVISIBLE, REAGENT_FORCEONNEW, REAGENT_SNEAKYNAME
/datum/reagent/Destroy() // This should only be called by the holder, so it's already handled clearing its references
. = ..()
@@ -82,7 +75,7 @@
//called when a mob processes chems when dead.
/datum/reagent/proc/on_mob_dead(mob/living/carbon/M)
if(!(reagentFlags & REAGENT_DEAD_PROCESS)) //justincase
if(!(reagent_flags & REAGENT_DEAD_PROCESS)) //justincase
return
current_cycle++
if(holder)
@@ -91,7 +84,7 @@
// Called when this reagent is first added to a mob
/datum/reagent/proc/on_mob_add(mob/living/L, amount)
if(!(reagentFlags & REAGENT_DONOTSPLIT))
if(!(reagent_flags & REAGENT_DONOTSPLIT))
var/mob/living/carbon/M = L
if(!M)
return
@@ -102,22 +95,22 @@
cached_purity = purity
if(cached_purity < 0)
CRASH("Purity below 0 for chem: [id], Please let Fermis Know!")
else if ((InverseChemVal > purity) && (InverseChem))//Turns all of a added reagent into the inverse chem
else if ((inverse_chem_val > purity) && (inverse_chem))//Turns all of a added reagent into the inverse chem
M.reagents.remove_reagent(id, amount, FALSE)
M.reagents.add_reagent(InverseChem, amount, FALSE, other_purity = 1-cached_purity)
log_game("FERMICHEM: [M] ckey: [M.key] has ingested [volume]u of [InverseChem]")
M.reagents.add_reagent(inverse_chem, amount, FALSE, other_purity = 1-cached_purity)
log_game("FERMICHEM: [M] ckey: [M.key] has ingested [volume]u of [inverse_chem]")
return
else if (ImpureChem)
else if (impure_chem)
var/impureVol = amount * (1 - purity) //turns impure ratio into impure chem
if(!(reagentFlags & REAGENT_SPLITRETAINVOL))
if(!(reagent_flags & REAGENT_SPLITRETAINVOL))
M.reagents.remove_reagent(id, (impureVol), FALSE)
M.reagents.add_reagent(ImpureChem, impureVol, FALSE, other_purity = 1-cached_purity)
if(reagentFlags & REAGENT_SNEAKYNAME)
var/datum/reagent/R = M.reagents.has_reagent("[InverseChem]")
M.reagents.add_reagent(impure_chem, impureVol, FALSE, other_purity = 1-cached_purity)
if(reagent_flags & REAGENT_SNEAKYNAME)
var/datum/reagent/R = M.reagents.has_reagent("[inverse_chem]")
R.name = name//Negative effects are hidden
log_game("FERMICHEM: [M] ckey: [M.key] has ingested [volume - impureVol]u of [id]")
log_game("FERMICHEM: [M] ckey: [M.key] has ingested [volume]u of [ImpureChem]")
log_game("FERMICHEM: [M] ckey: [M.key] has ingested [volume]u of [impure_chem]")
return
// Called when this reagent is removed while inside a mob
@@ -141,7 +134,7 @@
// Called when two reagents of the same are mixing.
/datum/reagent/proc/on_merge(data, amount, mob/living/carbon/M, purity)
if(!(reagentFlags & REAGENT_DONOTSPLIT))
if(!(reagent_flags & REAGENT_DONOTSPLIT))
if(!iscarbon(M))
return
if (purity == 1)
@@ -151,25 +144,25 @@
cached_purity = purity
if (purity < 0)
CRASH("Purity below 0 for chem: [id], Please let Fermis Know!")
else if ((InverseChemVal > purity) && (InverseChem))
else if ((inverse_chem_val > purity) && (inverse_chem))
M.reagents.remove_reagent(id, amount, FALSE)
M.reagents.add_reagent(InverseChem, amount, FALSE, other_purity = 1-cached_purity)
M.reagents.add_reagent(inverse_chem, amount, FALSE, other_purity = 1-cached_purity)
for(var/datum/reagent/fermi/R in M.reagents.reagent_list)
if(R.name == "")
R.name = name//Negative effects are hidden
log_game("FERMICHEM: [M] ckey: [M.key] has merged [volume]u of [InverseChem]")
log_game("FERMICHEM: [M] ckey: [M.key] has merged [volume]u of [inverse_chem]")
return
else if (ImpureChem)
else if (impure_chem)
var/impureVol = amount * (1 - purity)
if(!(reagentFlags & REAGENT_SPLITRETAINVOL))
if(!(reagent_flags & REAGENT_SPLITRETAINVOL))
M.reagents.remove_reagent(id, impureVol, FALSE)
M.reagents.add_reagent(ImpureChem, impureVol, FALSE, other_purity = 1-cached_purity)
if(reagentFlags & REAGENT_SNEAKYNAME)
var/datum/reagent/R = M.reagents.has_reagent("[InverseChem]")
M.reagents.add_reagent(impure_chem, impureVol, FALSE, other_purity = 1-cached_purity)
if(reagent_flags & REAGENT_SNEAKYNAME)
var/datum/reagent/R = M.reagents.has_reagent("[inverse_chem]")
R.name = name//Negative effects are hidden
log_game("FERMICHEM: [M] ckey: [M.key] has merged [volume - impureVol]u of [id]")
log_game("FERMICHEM: [M] ckey: [M.key] has merged [volume]u of [ImpureChem]")
log_game("FERMICHEM: [M] ckey: [M.key] has merged [volume]u of [impure_chem]")
return
/datum/reagent/proc/on_update(atom/A)
@@ -1384,9 +1384,9 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_name = "Neurotoxin"
glass_desc = "A drink that is guaranteed to knock you silly."
//SplitChem = TRUE
ImpureChem = "neuroweak"
InverseChemVal = 0 //Clear conversion
InverseChem = "neuroweak"
impure_chem = "neuroweak"
inverse_chem_val = 0 //Clear conversion
inverse_chem = "neuroweak"
/datum/reagent/consumable/ethanol/neurotoxin/proc/pickt()
return (pick(TRAIT_PARALYSIS_L_ARM,TRAIT_PARALYSIS_R_ARM,TRAIT_PARALYSIS_R_LEG,TRAIT_PARALYSIS_L_LEG))
@@ -2003,7 +2003,7 @@
can_synth = FALSE
var/datum/dna/original_dna
var/reagent_ticks = 0
reagentFlags = REAGENT_INVISIBLE
reagent_flags = REAGENT_INVISIBLE
/datum/reagent/changeling_string/on_mob_metabolize(mob/living/carbon/C)
if(C && C.dna && data["desired_dna"])
+1 -1
View File
@@ -32,7 +32,7 @@
var/RateUpLim = 10 // Optimal/max rate possible if all conditions are perfect
var/FermiChem = FALSE // If the chemical uses the Fermichem reaction mechanics//If the chemical uses the Fermichem reaction mechanics
var/FermiExplode = FALSE // If the chemical explodes in a special way
var/ClearConversion //bitflags for clear conversions; REACTION_CLEAR_IMPURE or REACTION_CLEAR_INVERSE
var/clear_conversion //bitflags for clear conversions; REACTION_CLEAR_IMPURE or REACTION_CLEAR_INVERSE
var/PurityMin = 0.15 //If purity is below 0.15, it explodes too. Set to 0 to disable this.
@@ -143,7 +143,7 @@ Creating a chem with a low purity will make you permanently fall in love with so
var/creatorName
var/mob/living/creator
pH = 10
reagentFlags = REAGENT_ONMOBMERGE | REAGENT_DONOTSPLIT //Procs on_mob_add when merging into a human
reagent_flags = REAGENT_ONMOBMERGE | REAGENT_DONOTSPLIT //Procs on_mob_add when merging into a human
can_synth = FALSE
@@ -156,7 +156,7 @@ Creating a chem with a low purity will make you permanently fall in love with so
creatorGender = "Mistress"
creatorName = "Fermis Yakumo"
purity = 1
reagentFlags = REAGENT_DONOTSPLIT
reagent_flags = REAGENT_DONOTSPLIT
/datum/reagent/fermi/enthrall/test/on_new()
id = "enthrall"
@@ -305,7 +305,7 @@ Creating a chem with a low purity will make you permanently fall in love with so
color = "#2C051A" // rgb: , 0, 255
metabolization_rate = 0.1
taste_description = "synthetic chocolate, a base tone of alcohol, and high notes of roses."
reagentFlags = REAGENT_DONOTSPLIT
reagent_flags = REAGENT_DONOTSPLIT
can_synth = FALSE
var/mob/living/carbon/love
@@ -54,9 +54,9 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
var/pollStarted = FALSE
var/location_created
var/startHunger
ImpureChem = "SDGFtox"
InverseChemVal = 0.5
InverseChem = "SDZF"
impure_chem = "SDGFtox"
inverse_chem_val = 0.5
inverse_chem = "SDZF"
can_synth = TRUE
@@ -300,7 +300,7 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
description = "A chem that makes a certain chemcat angry at you if you're reading this, how did you get this???"//i.e. tell me please, figure it's a good way to get pinged for bugfixes.
metabolization_rate = 1
can_synth = FALSE
reagentFlags = REAGENT_INVISIBLE
reagent_flags = REAGENT_INVISIBLE
/datum/reagent/fermi/SDGFtox/on_mob_life(mob/living/carbon/M)//Damages the taker if their purity is low. Extended use of impure chemicals will make the original die. (thus can't be spammed unless you've very good)
M.blood_volume -= 10
@@ -316,7 +316,7 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
metabolization_rate = 0.5 * REAGENTS_METABOLISM
var/startHunger
can_synth = TRUE
reagentFlags = REAGENT_SNEAKYNAME
reagent_flags = REAGENT_SNEAKYNAME
/datum/reagent/fermi/SDZF/on_mob_life(mob/living/carbon/M) //If you're bad at fermichem, turns your clone into a zombie instead.
switch(current_cycle)//Pretends to be normal
@@ -28,7 +28,7 @@ I'd like to point out from my calculations it'll take about 60-80 minutes to die
var/datum/mind/originalmind
var/antiGenetics = 255
var/sleepytime = 0
InverseChemVal = 0.25
inverse_chem_val = 0.25
can_synth = FALSE
/datum/action/chem/astral
@@ -26,9 +26,9 @@
taste_description = "a milky ice cream like flavour."
overdose_threshold = 17
metabolization_rate = 0.25
ImpureChem = "BEsmaller" //If you make an inpure chem, it stalls growth
InverseChemVal = 0.35
InverseChem = "BEsmaller" //At really impure vols, it just becomes 100% inverse
impure_chem = "BEsmaller" //If you make an inpure chem, it stalls growth
inverse_chem_val = 0.35
inverse_chem = "BEsmaller" //At really impure vols, it just becomes 100% inverse
can_synth = FALSE
/datum/reagent/fermi/breast_enlarger/on_mob_add(mob/living/carbon/M)
@@ -211,9 +211,9 @@
taste_description = "chinese dragon powder"
overdose_threshold = 17 //ODing makes you male and removes female genitals
metabolization_rate = 0.5
ImpureChem = "PEsmaller" //If you make an inpure chem, it stalls growth
InverseChemVal = 0.35
InverseChem = "PEsmaller" //At really impure vols, it just becomes 100% inverse and shrinks instead.
impure_chem = "PEsmaller" //If you make an inpure chem, it stalls growth
inverse_chem_val = 0.35
inverse_chem = "PEsmaller" //At really impure vols, it just becomes 100% inverse and shrinks instead.
can_synth = FALSE
/datum/reagent/fermi/penis_enlarger/on_mob_add(mob/living/carbon/M)
@@ -7,9 +7,9 @@
taste_description = "affection and love!"
can_synth = FALSE
//SplitChem = TRUE
ImpureChem = "fermiTox"// What chemical is metabolised with an inpure reaction
InverseChemVal = 0.25 // If the impurity is below 0.5, replace ALL of the chem with InverseChem upon metabolising
InverseChem = "fermiTox"
impure_chem = "fermiTox"// What chemical is metabolised with an inpure reaction
inverse_chem_val = 0.25 // If the impurity is below 0.5, replace ALL of the chem with inverse_chemupon metabolising
inverse_chem = "fermiTox"
//This should process fermichems to find out how pure they are and what effect to do.
/datum/reagent/fermi/on_mob_add(mob/living/carbon/M, amount)
@@ -39,7 +39,7 @@
taste_description = "like jerky, whiskey and an off aftertaste of a crypt."
metabolization_rate = 0.2
overdose_threshold = 25
reagentFlags = REAGENT_DONOTSPLIT
reagent_flags = REAGENT_DONOTSPLIT
pH = 4
can_synth = TRUE
@@ -84,9 +84,9 @@
color = "#f9b9bc" // rgb: , 0, 255
taste_description = "dewicious degenyewacy"
metabolization_rate = 0.5 * REAGENTS_METABOLISM
InverseChemVal = 0
inverse_chem_val = 0
var/obj/item/organ/tongue/nT
reagentFlags = REAGENT_DONOTSPLIT
reagent_flags = REAGENT_DONOTSPLIT
pH = 5
var/obj/item/organ/tongue/T
can_synth = TRUE
@@ -173,9 +173,9 @@
description = "A stablised EMP that is highly volatile, shocking small nano machines that will kill them off at a rapid rate in a patient's system."
color = "#708f8f"
overdose_threshold = 15
ImpureChem = "nanite_b_goneTox" //If you make an inpure chem, it stalls growth
InverseChemVal = 0.25
InverseChem = "nanite_b_goneTox" //At really impure vols, it just becomes 100% inverse
impure_chem = "nanite_b_goneTox" //If you make an inpure chem, it stalls growth
inverse_chem_val = 0.25
inverse_chem = "nanite_b_goneTox" //At really impure vols, it just becomes 100% inverse
taste_description = "what can only be described as licking a battery."
pH = 9
can_synth = FALSE
@@ -212,7 +212,7 @@
id = "nanite_b_goneTox"
description = "Poorly made, and shocks you!"
metabolization_rate = 1
reagentFlags = REAGENT_INVISIBLE
reagent_flags = REAGENT_INVISIBLE
//Increases shock events.
/datum/reagent/fermi/nanite_b_goneTox/on_mob_life(mob/living/carbon/C)//Damages the taker if their purity is low. Extended use of impure chemicals will make the original die. (thus can't be spammed unless you've very good)
@@ -278,7 +278,7 @@
name = "Fermis Test Reagent"
id = "fermiTest"
description = "You should be really careful with this...! Also, how did you get this?"
reagentFlags = REAGENT_FORCEONNEW
reagent_flags = REAGENT_FORCEONNEW
can_synth = FALSE
/datum/reagent/fermi/fermiTest/on_new(datum/reagents/holder)
@@ -316,7 +316,7 @@
data = "merge"
color = "FFFFFF"
can_synth = FALSE
reagentFlags = REAGENT_INVISIBLE
reagent_flags = REAGENT_INVISIBLE
//I'm concerned this is too weak, but I also don't want deathmixes.
/datum/reagent/fermi/fermiTox/on_mob_life(mob/living/carbon/C, method)
@@ -6,9 +6,9 @@
color = "#68e83a"
pH = 8.6
overdose_threshold = 35
ImpureChem = "yamerol_tox"
InverseChemVal = 0.4
InverseChem = "yamerol_tox"
impure_chem = "yamerol_tox"
inverse_chem_val = 0.4
inverse_chem = "yamerol_tox"
can_synth = TRUE
/datum/reagent/fermi/yamerol/on_mob_life(mob/living/carbon/C)
@@ -80,7 +80,7 @@
taste_description = "a weird, syrupy flavour, yamero"
color = "#68e83a"
pH = 8.6
reagentFlags = REAGENT_INVISIBLE
reagent_flags = REAGENT_INVISIBLE
/datum/reagent/fermi/yamerol_tox/on_mob_life(mob/living/carbon/C)
var/obj/item/organ/tongue/T = C.getorganslot(ORGAN_SLOT_TONGUE)
@@ -7,22 +7,22 @@
//Called when reaction STOP_PROCESSING
/datum/chemical_reaction/proc/FermiFinish(datum/reagents/holder, var/atom/my_atom)
if(ClearConversion == REACTION_CLEAR_IMPURE | REACTION_CLEAR_INVERSE)
if(clear_conversion == REACTION_CLEAR_IMPURE | REACTION_CLEAR_INVERSE)
for(var/id in results)
var/datum/reagent/R = my_atom.reagents.has_reagent("[id]")
if(R.purity == 1)
continue
var/cached_volume = R.volume
if(ClearConversion == REACTION_CLEAR_INVERSE && R.InverseChem)
if(R.InverseChemVal > R.purity)
if(clear_conversion == REACTION_CLEAR_INVERSE && R.inverse_chem)
if(R.inverse_chem_val > R.purity)
my_atom.reagents.remove_reagent(R.id, cached_volume, FALSE)
my_atom.reagents.add_reagent(R.InverseChem, cached_volume, FALSE, other_purity = 1)
my_atom.reagents.add_reagent(R.inverse_chem, cached_volume, FALSE, other_purity = 1)
else if (ClearConversion == REACTION_CLEAR_IMPURE && R.ImpureChem)
else if (clear_conversion == REACTION_CLEAR_IMPURE && R.impure_chem)
var/impureVol = cached_volume * (1 - R.purity)
my_atom.reagents.remove_reagent(R.id, (impureVol), FALSE)
my_atom.reagents.add_reagent(R.ImpureChem, impureVol, FALSE, other_purity = 1)
my_atom.reagents.add_reagent(R.impure_chem, impureVol, FALSE, other_purity = 1)
return
//Called when temperature is above a certain threshold, or if purity is too low.