diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm
index 0681351395..a1a51f8b5d 100644
--- a/code/_globalvars/bitfields.dm
+++ b/code/_globalvars/bitfields.dm
@@ -177,7 +177,7 @@ GLOBAL_LIST_INIT(bitfields, list(
"CAN_CARRY" = CAN_CARRY,
"CAN_RESIST" = CAN_RESIST
),
- "reagent_flags" = list(
+ "chemical_flags" = list(
"REAGENT_DEAD_PROCESS" = REAGENT_DEAD_PROCESS,
"REAGENT_DONOTSPLIT" = REAGENT_DONOTSPLIT,
"REAGENT_ONLYINVERSE" = REAGENT_ONLYINVERSE,
diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm
index 5d4cd883f4..590cfd4d10 100644
--- a/code/game/objects/items/devices/scanners.dm
+++ b/code/game/objects/items/devices/scanners.dm
@@ -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.reagent_flags & REAGENT_INVISIBLE)
+ if(R.chemical_flags & REAGENT_INVISIBLE)
continue
reagents += R
diff --git a/code/modules/food_and_drinks/recipes/drinks_recipes.dm b/code/modules/food_and_drinks/recipes/drinks_recipes.dm
index 8d63d68878..c893b5c99d 100644
--- a/code/modules/food_and_drinks/recipes/drinks_recipes.dm
+++ b/code/modules/food_and_drinks/recipes/drinks_recipes.dm
@@ -397,13 +397,16 @@
FermiChem = TRUE//If the chemical uses the Fermichem reaction mechanics
FermiExplode = FALSE //If the chemical explodes in a special way
PurityMin = 0 //The minimum purity something has to be above, otherwise it explodes.
+ clear_conversion = REACTION_CLEAR_INVERSE
+/*
/datum/chemical_reaction/neurotoxin/FermiFinish(datum/reagents/holder, var/atom/my_atom)
var/datum/reagent/consumable/ethanol/neurotoxin/Nt = locate(/datum/reagent/consumable/ethanol/neurotoxin) in my_atom.reagents.reagent_list
var/cached_volume = Nt.volume
if(Nt.purity < 0.5)
holder.remove_reagent(src.id, cached_volume)
holder.add_reagent("neuroweak", cached_volume)
+*/
/datum/chemical_reaction/neurotoxin/FermiExplode(datum/reagents, var/atom/my_atom, volume, temp, pH)//reduced size
volume = volume/10
@@ -828,10 +831,10 @@
id = "catnip_tea"
results = list("catnip_tea" = 3)
required_reagents = list("tea" = 5, "catnip" = 2)
-
+
/datum/chemical_reaction/commander_and_chief
- name = "Commander and Chief"
- id = "commander_and_chief"
- results = list("commander_and_chief" = 50)
+ name = "Commander and Chief"
+ id = "commander_and_chief"
+ results = list("commander_and_chief" = 50)
required_reagents = list("alliescocktail" = 50, "champagne" = 20, "doctorsdelight" = 10, "quintuple_sec" = 10, "screwdrivercocktail" = 10)
- mix_message = "When your powers combine, I am Captain Pl-..."
+ mix_message = "When your powers combine, I am Captain Pl-..."
diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm
index 43a1b30916..36128b9c85 100644
--- a/code/modules/mob/living/carbon/life.dm
+++ b/code/modules/mob/living/carbon/life.dm
@@ -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.reagent_flags & REAGENT_DEAD_PROCESS)
+ if(R.chemical_flags & REAGENT_DEAD_PROCESS)
R.on_mob_dead(src)
///////////////
diff --git a/code/modules/reagents/chemistry/fermi/readme.md b/code/modules/reagents/chemistry/fermi/readme.md
index 59f0faccef..4b897b6c4b 100644
--- a/code/modules/reagents/chemistry/fermi/readme.md
+++ b/code/modules/reagents/chemistry/fermi/readme.md
@@ -2,17 +2,17 @@ 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`:
+for `datum/reagent/` you have the following options with `var/chemical_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
+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`
diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm
index 59311a056c..367c1a1483 100644
--- a/code/modules/reagents/chemistry/holder.dm
+++ b/code/modules/reagents/chemistry/holder.dm
@@ -466,7 +466,7 @@
if (C.FermiChem == TRUE && !continue_reacting)
if (chem_temp > C.ExplodeTemp) //This is first to ensure explosions.
- var/datum/chemical_reaction/fermi/Ferm = selected_reaction
+ var/datum/chemical_reaction/Ferm = selected_reaction
fermiIsReacting = FALSE
SSblackbox.record_feedback("tally", "fermi_chem", 1, ("[Ferm] explosion"))
Ferm.FermiExplode(src, my_atom, volume = total_volume, temp = chem_temp, pH = pH)
@@ -539,7 +539,7 @@
return 0
/datum/reagents/process()
- var/datum/chemical_reaction/fermi/C = fermiReactID
+ var/datum/chemical_reaction/C = fermiReactID
var/list/cached_required_reagents = C.required_reagents//update reagents list
var/list/cached_results = C.results//resultant chemical list
@@ -571,16 +571,16 @@
return
/datum/reagents/proc/fermiEnd()
- var/datum/chemical_reaction/fermi/C = fermiReactID
+ var/datum/chemical_reaction/C = fermiReactID
STOP_PROCESSING(SSprocessing, src)
fermiIsReacting = FALSE
- reactedVol = 0
- targetVol = 0
//pH check, handled at the end to reduce calls.
if(istype(my_atom, /obj/item/reagent_containers))
var/obj/item/reagent_containers/RC = my_atom
RC.pH_check()
- C.FermiFinish(src, my_atom)
+ C.FermiFinish(src, my_atom, reactedVol)
+ reactedVol = 0
+ targetVol = 0
handle_reactions()
update_total()
//Reaction sounds and words
@@ -591,7 +591,7 @@
to_chat(M, "[iconhtml] [C.mix_message]")
/datum/reagents/proc/fermiReact(selected_reaction, cached_temp, cached_pH, reactedVol, targetVol, cached_required_reagents, cached_results, multiplier)
- var/datum/chemical_reaction/fermi/C = selected_reaction
+ var/datum/chemical_reaction/C = selected_reaction
var/deltaT = 0
var/deltapH = 0
var/stepChemAmmount = 0
@@ -700,7 +700,7 @@
return (reactedVol)
//Currently calculates it irrespective of required reagents at the start
-/datum/reagents/proc/reactant_purity(var/datum/chemical_reaction/fermi/C, holder)
+/datum/reagents/proc/reactant_purity(var/datum/chemical_reaction/C, holder)
var/list/cached_reagents = reagent_list
var/i = 0
var/cachedPurity
@@ -710,6 +710,14 @@
i++
return cachedPurity/i
+/datum/reagents/proc/uncache_purity(id)
+ var/datum/reagent/R = has_reagent("[id]")
+ if(!R)
+ return
+ if(R.cached_purity == 1)
+ return
+ R.purity = R.cached_purity
+
/datum/reagents/proc/isolate_reagent(reagent)
var/list/cached_reagents = reagent_list
for(var/_reagent in cached_reagents)
@@ -880,7 +888,7 @@
if(my_atom)
my_atom.on_reagent_change(ADD_REAGENT)
if(isliving(my_atom))
- if(R.reagent_flags & REAGENT_ONMOBMERGE)//Forces on_mob_add proc when a chem is merged
+ if(R.chemical_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 +907,7 @@
if(data)
R.data = data
R.on_new(data)
- if(R.reagent_flags & REAGENT_FORCEONNEW)//Allows on new without data overhead.
+ if(R.chemical_flags & REAGENT_FORCEONNEW)//Allows on new without data overhead.
R.on_new(pH) //Add more as desired.
diff --git a/code/modules/reagents/chemistry/reagents.dm b/code/modules/reagents/chemistry/reagents.dm
index 422bf8e4be..00bb1b7d35 100644
--- a/code/modules/reagents/chemistry/reagents.dm
+++ b/code/modules/reagents/chemistry/reagents.dm
@@ -43,7 +43,7 @@
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/reagent_flags // See fermi/readme.dm REAGENT_DEAD_PROCESS, REAGENT_DONOTSPLIT, REAGENT_ONLYINVERSE, REAGENT_ONMOBMERGE, REAGENT_INVISIBLE, REAGENT_FORCEONNEW, REAGENT_SNEAKYNAME
+ var/chemical_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
@@ -75,7 +75,7 @@
//called when a mob processes chems when dead.
/datum/reagent/proc/on_mob_dead(mob/living/carbon/M)
- if(!(reagent_flags & REAGENT_DEAD_PROCESS)) //justincase
+ if(!(chemical_flags & REAGENT_DEAD_PROCESS)) //justincase
return
current_cycle++
if(holder)
@@ -84,33 +84,37 @@
// Called when this reagent is first added to a mob
/datum/reagent/proc/on_mob_add(mob/living/L, amount)
- if(!(reagent_flags & REAGENT_DONOTSPLIT))
- var/mob/living/carbon/M = L
- if(!M)
- return
- if (purity == 1)
- log_game("FERMICHEM: [M] ckey: [M.key] has ingested [volume]u of [id]")
- return
- if(cached_purity == 1)
- cached_purity = purity
- if(cached_purity < 0)
- CRASH("Purity below 0 for chem: [id], Please let Fermis Know!")
- 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(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 (impure_chem)
- var/impureVol = amount * (1 - purity) //turns impure ratio into impure chem
- if(!(reagent_flags & REAGENT_SPLITRETAINVOL))
- M.reagents.remove_reagent(id, (impureVol), FALSE)
- 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
+ if (purity == 1)
+ log_game("CHEM: [M] ckey: [M.key] has ingested [volume]u of [id]")
+ return
+ var/mob/living/carbon/M = L
+ if(!M)
+ return
+ if(chemical_flags & REAGENT_DONOTSPLIT)
+ return
- 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 [impure_chem]")
+ if(cached_purity == 1)
+ cached_purity = purity
+ else if(cached_purity < 0)
+ CRASH("Purity below 0 for chem: [id], Please let Fermis Know!")
+
+ 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(inverse_chem, amount, FALSE, other_purity = 1-cached_purity)
+ var/datum/reagent/R = M.reagents.has_reagent("[inverse_chem]")
+ if(R.chemical_flags & REAGENT_SNEAKYNAME)
+ R.name = name//Negative effects are hidden
+ if(R.chemical_flags & REAGENT_INVISIBLE)
+ R.chemical_flags |= (REAGENT_INVISIBLE)
+ log_game("FERMICHEM: [M] ckey: [M.key] has ingested [volume]u of [inverse_chem]")
+ return
+ else if (impure_chem)
+ var/impureVol = amount * (1 - purity) //turns impure ratio into impure chem
+ if(!(chemical_flags & REAGENT_SPLITRETAINVOL))
+ M.reagents.remove_reagent(id, (impureVol), FALSE)
+ M.reagents.add_reagent(impure_chem, impureVol, FALSE, other_purity = 1-cached_purity)
+ 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 [impure_chem]")
return
// Called when this reagent is removed while inside a mob
@@ -134,35 +138,36 @@
// Called when two reagents of the same are mixing.
/datum/reagent/proc/on_merge(data, amount, mob/living/carbon/M, purity)
- if(!(reagent_flags & REAGENT_DONOTSPLIT))
- if(!iscarbon(M))
- return
- if (purity == 1)
- log_game("FERMICHEM: [M] ckey: [M.key] has ingested [volume]u of [id]")
- return
- if(cached_purity == 1)
- cached_purity = purity
- if (purity < 0)
- CRASH("Purity below 0 for chem: [id], Please let Fermis Know!")
- else if ((inverse_chem_val > purity) && (inverse_chem))
- M.reagents.remove_reagent(id, amount, FALSE)
- 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 [inverse_chem]")
- return
- else if (impure_chem)
- var/impureVol = amount * (1 - purity)
- if(!(reagent_flags & REAGENT_SPLITRETAINVOL))
- M.reagents.remove_reagent(id, impureVol, FALSE)
- 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
+ if (purity == 1)
+ log_game("FERMICHEM: [M] ckey: [M.key] has ingested [volume]u of [id]")
+ return
+ if(!iscarbon(M))
+ return
+ if(chemical_flags & REAGENT_DONOTSPLIT)
+ return
- 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 [impure_chem]")
+ if(cached_purity == 1)
+ cached_purity = purity
+ else if (purity < 0)
+ CRASH("Purity below 0 for chem: [id], Please let Fermis Know!")
+
+ if ((inverse_chem_val > purity) && (inverse_chem)) //INVERT
+ M.reagents.remove_reagent(id, amount, FALSE)
+ M.reagents.add_reagent(inverse_chem, amount, FALSE, other_purity = 1-cached_purity)
+ var/datum/reagent/R = M.reagents.has_reagent("[inverse_chem]")
+ if(R.chemical_flags & REAGENT_SNEAKYNAME)
+ R.name = name//Negative effects are hidden
+ if(R.chemical_flags & REAGENT_INVISIBLE)
+ R.chemical_flags |= (REAGENT_INVISIBLE)
+ log_game("FERMICHEM: [M] ckey: [M.key] has merged [volume]u of [inverse_chem]")
+ return
+ else if (impure_chem) //SPLIT
+ var/impureVol = amount * (1 - purity)
+ if(!(chemical_flags & REAGENT_SPLITRETAINVOL))
+ M.reagents.remove_reagent(id, impureVol, FALSE)
+ M.reagents.add_reagent(impure_chem, impureVol, FALSE, other_purity = 1-cached_purity)
+ 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 [impure_chem]")
return
/datum/reagent/proc/on_update(atom/A)
diff --git a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm
index 0ca7f48b36..3017b73b01 100644
--- a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm
@@ -1385,8 +1385,8 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "A drink that is guaranteed to knock you silly."
//SplitChem = TRUE
impure_chem = "neuroweak"
- inverse_chem_val = 0 //Clear conversion
- inverse_chem = "neuroweak"
+ inverse_chem_val = 0.5 //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))
diff --git a/code/modules/reagents/chemistry/reagents/impure_reagents.dm b/code/modules/reagents/chemistry/reagents/impure_reagents.dm
new file mode 100644
index 0000000000..1e65599490
--- /dev/null
+++ b/code/modules/reagents/chemistry/reagents/impure_reagents.dm
@@ -0,0 +1,25 @@
+//Reagents produced by metabolising/reacting fermichems inoptimally, i.e. inverse_chems or impure_chems
+//Inverse = Splitting
+//Invert = Whole conversion
+
+/datum/reagent/impure
+ chemical_flags = REAGENT_INVISIBLE | REAGENT_SNEAKYNAME //by default, it will stay hidden on splitting, but take the name of the source on inverting
+
+
+/datum/reagent/impure/fermiTox
+ name = "FermiTox"
+ id = "fermiTox"
+ description = "You should be really careful with this...! Also, how did you get this? You shouldn't have this!"
+ data = "merge"
+ color = "FFFFFF"
+ can_synth = FALSE
+
+
+//I'm concerned this is too weak, but I also don't want deathmixes.
+//TODO: liver damage.
+/datum/reagent/impure/fermiTox/on_mob_life(mob/living/carbon/C, method)
+ if(C.dna && istype(C.dna.species, /datum/species/jelly))
+ C.adjustToxLoss(-2)
+ else
+ C.adjustToxLoss(2)
+ ..()
diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm
index 8ea8ef54a3..60620af71b 100644
--- a/code/modules/reagents/chemistry/reagents/other_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm
@@ -2003,7 +2003,7 @@
can_synth = FALSE
var/datum/dna/original_dna
var/reagent_ticks = 0
- reagent_flags = REAGENT_INVISIBLE
+ chemical_flags = REAGENT_INVISIBLE
/datum/reagent/changeling_string/on_mob_metabolize(mob/living/carbon/C)
if(C && C.dna && data["desired_dna"])
diff --git a/modular_citadel/code/modules/reagents/chemistry/reagents/MKUltra.dm b/modular_citadel/code/modules/reagents/chemistry/reagents/MKUltra.dm
index 2ebb671124..c210c87d4e 100644
--- a/modular_citadel/code/modules/reagents/chemistry/reagents/MKUltra.dm
+++ b/modular_citadel/code/modules/reagents/chemistry/reagents/MKUltra.dm
@@ -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
- reagent_flags = REAGENT_ONMOBMERGE | REAGENT_DONOTSPLIT //Procs on_mob_add when merging into a human
+ chemical_flags = REAGENT_ONMOBMERGE | REAGENT_DONOTSPLIT //Procs on_mob_add when merging into a human
can_synth = FALSE
@@ -156,7 +156,6 @@ Creating a chem with a low purity will make you permanently fall in love with so
creatorGender = "Mistress"
creatorName = "Fermis Yakumo"
purity = 1
- reagent_flags = REAGENT_DONOTSPLIT
/datum/reagent/fermi/enthrall/test/on_new()
id = "enthrall"
@@ -305,7 +304,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."
- reagent_flags = REAGENT_DONOTSPLIT
+ chemical_flags = REAGENT_DONOTSPLIT
can_synth = FALSE
var/mob/living/carbon/love
diff --git a/modular_citadel/code/modules/reagents/chemistry/reagents/SDGF.dm b/modular_citadel/code/modules/reagents/chemistry/reagents/SDGF.dm
index 56bb9b47b0..4319b303d1 100644
--- a/modular_citadel/code/modules/reagents/chemistry/reagents/SDGF.dm
+++ b/modular_citadel/code/modules/reagents/chemistry/reagents/SDGF.dm
@@ -294,21 +294,21 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
..()
//Unobtainable, used if SDGF is impure but not too impure
-/datum/reagent/fermi/SDGFtox
+/datum/reagent/impure/SDGFtox
name = "synthetic-derived growth factor"
id = "SDGFtox"
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
- reagent_flags = REAGENT_INVISIBLE
+ chemical_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)
+/datum/reagent/impure/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
M.adjustCloneLoss(2, 0)
..()
//Fail state of SDGF
-/datum/reagent/fermi/SDZF
+/datum/reagent/impure/SDZF
name = "synthetic-derived growth factor"
id = "SDZF"
description = "A horribly peverse mass of Embryonic stem cells made real by the hands of a failed chemist. This message should never appear, how did you manage to get a hold of this?"
@@ -316,9 +316,9 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
metabolization_rate = 0.5 * REAGENTS_METABOLISM
var/startHunger
can_synth = TRUE
- reagent_flags = REAGENT_SNEAKYNAME
+ chemical_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.
+/datum/reagent/impure/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
if(20)
to_chat(M, "You feel the synethic cells rest uncomfortably within your body as they start to pulse and grow rapidly.")
diff --git a/modular_citadel/code/modules/reagents/chemistry/reagents/fermi_reagents.dm b/modular_citadel/code/modules/reagents/chemistry/reagents/fermi_reagents.dm
index 4b646135e2..a21ccb34ed 100644
--- a/modular_citadel/code/modules/reagents/chemistry/reagents/fermi_reagents.dm
+++ b/modular_citadel/code/modules/reagents/chemistry/reagents/fermi_reagents.dm
@@ -9,7 +9,7 @@
//SplitChem = TRUE
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"
+ 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
- reagent_flags = REAGENT_DONOTSPLIT
+ chemical_flags = REAGENT_DONOTSPLIT
pH = 4
can_synth = TRUE
@@ -86,7 +86,7 @@
metabolization_rate = 0.5 * REAGENTS_METABOLISM
inverse_chem_val = 0
var/obj/item/organ/tongue/nT
- reagent_flags = REAGENT_DONOTSPLIT
+ chemical_flags = REAGENT_DONOTSPLIT
pH = 5
var/obj/item/organ/tongue/T
can_synth = TRUE
@@ -212,7 +212,7 @@
id = "nanite_b_goneTox"
description = "Poorly made, and shocks you!"
metabolization_rate = 1
- reagent_flags = REAGENT_INVISIBLE
+ chemical_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?"
- reagent_flags = REAGENT_FORCEONNEW
+ chemical_flags = REAGENT_FORCEONNEW
can_synth = FALSE
/datum/reagent/fermi/fermiTest/on_new(datum/reagents/holder)
@@ -309,23 +309,6 @@
playsound(get_turf(M), 'modular_citadel/sound/voice/merowr.ogg', 50, 1)
holder.clear_reagents()
-/datum/reagent/fermi/fermiTox
- name = "FermiTox"
- id = "fermiTox"
- description = "You should be really careful with this...! Also, how did you get this? You shouldn't have this!"
- data = "merge"
- color = "FFFFFF"
- can_synth = FALSE
- 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)
- if(C.dna && istype(C.dna.species, /datum/species/jelly))
- C.adjustToxLoss(-2)
- else
- C.adjustToxLoss(2)
- ..()
-
/datum/reagent/fermi/acidic_buffer
name = "Acidic buffer"
id = "acidic_buffer"
diff --git a/modular_citadel/code/modules/reagents/chemistry/reagents/healing.dm b/modular_citadel/code/modules/reagents/chemistry/reagents/healing.dm
index f57c051161..1d1ef1c26d 100644
--- a/modular_citadel/code/modules/reagents/chemistry/reagents/healing.dm
+++ b/modular_citadel/code/modules/reagents/chemistry/reagents/healing.dm
@@ -73,16 +73,15 @@
C.adjustOxyLoss(-3)
..()
-/datum/reagent/fermi/yamerol_tox
+/datum/reagent/impure/yamerol_tox
name = "Yamerol"
id = "yamerol_tox"
description = "For when you've trouble speaking or breathing, just yell YAMEROL! A chem that helps soothe any congestion problems and at high concentrations restores damaged lungs and tongues!"
taste_description = "a weird, syrupy flavour, yamero"
color = "#68e83a"
pH = 8.6
- reagent_flags = REAGENT_INVISIBLE
-/datum/reagent/fermi/yamerol_tox/on_mob_life(mob/living/carbon/C)
+/datum/reagent/impure/yamerol_tox/on_mob_life(mob/living/carbon/C)
var/obj/item/organ/tongue/T = C.getorganslot(ORGAN_SLOT_TONGUE)
var/obj/item/organ/lungs/L = C.getorganslot(ORGAN_SLOT_LUNGS)
diff --git a/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm b/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm
index 8f471332ad..bb81bd8a21 100644
--- a/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm
+++ b/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm
@@ -6,7 +6,7 @@
return
//Called when reaction STOP_PROCESSING
-/datum/chemical_reaction/proc/FermiFinish(datum/reagents/holder, var/atom/my_atom)
+/datum/chemical_reaction/proc/FermiFinish(datum/reagents/holder, var/atom/my_atom, reactVol)
if(clear_conversion == REACTION_CLEAR_IMPURE | REACTION_CLEAR_INVERSE)
for(var/id in results)
var/datum/reagent/R = my_atom.reagents.has_reagent("[id]")
@@ -23,6 +23,8 @@
var/impureVol = cached_volume * (1 - R.purity)
my_atom.reagents.remove_reagent(R.id, (impureVol), FALSE)
my_atom.reagents.add_reagent(R.impure_chem, impureVol, FALSE, other_purity = 1)
+ R.cached_purity = R.purity
+ R.purity = 1
return
//Called when temperature is above a certain threshold, or if purity is too low.