Holder changes; removed ferminew.

This commit is contained in:
Fermi
2019-06-13 02:47:05 +01:00
parent 3368d3d98b
commit 981c1644c9
2 changed files with 11 additions and 21 deletions
+7 -13
View File
@@ -127,7 +127,6 @@
update_total()
handle_reactions()
//pH = REAGENT_NORMAL_PH //Maybe unnessicary? NO incredibly nessicary, blows the beaker up otherwise. YES 100% NOT REQUIRED, THIS IS FOR REAMOVING AN AMMOUNT, NOT ALL.
return amount
/datum/reagents/proc/get_master_reagent_name()
@@ -848,7 +847,7 @@
//add the reagent to the existing if it exists
for(var/A in cached_reagents)
var/datum/reagent/R = A
if (R.id == reagent)
if (R.id == reagent) //IF MERGING
//WIP_TAG //check my maths for purity calculations
//Add amount and equalize purity
R.volume += amount
@@ -860,9 +859,9 @@
my_atom.on_reagent_change(ADD_REAGENT)
R.on_merge(data, amount, my_atom, other_purity)
if(istype(D, /datum/reagent/fermi))//Is this a fermichem?
var/datum/reagent/fermi/Ferm = D //It's Fermi time!
if(Ferm.OnMobMergeCheck == TRUE) //// Ooooooh fermifermifermi
R.on_mob_add(my_atom, amount)
var/datum/reagent/fermi/Ferm = D //It is a fermichem!
if(Ferm.OnMobMergeCheck == TRUE) //Does this fermichem split?
R.on_mob_add(my_atom, amount) //On mob add processes fermichems, splitting them into their impure and pure products. This allows them to split when merging fermichems in a mob.
if(!no_react)
handle_reactions()
@@ -879,22 +878,17 @@
if(data)
R.data = data
R.on_new(data)
if(R.addProc == TRUE)
if(R.addProc == TRUE)//Allows on new without data overhead.
R.on_new(pH) //Add more as desired.
if(istype(D, /datum/reagent/fermi))//Is this a fermichem?
var/datum/reagent/fermi/Ferm = D //It's Fermi time!
Ferm.FermiNew(my_atom) //Seriously what is "data" ????
//This is how I keep myself sane.
if(isliving(my_atom))
R.on_mob_add(my_atom, amount)
update_total()
if(my_atom)
my_atom.on_reagent_change(ADD_REAGENT)
if(!no_react)
handle_reactions()
if(isliving(my_atom))
R.on_mob_add(my_atom, amount)
return TRUE
@@ -12,21 +12,17 @@
var/OnMobMergeCheck = FALSE
//var/addProc = FALSE //When this reagent is added to a new beaker, it does something. Implemented but unused.
//Called when added to a beaker without any of the reagent present. #add_reagent
/datum/reagent/fermi/proc/FermiNew(holder)
return
//This should process fermichems to find out how pure they are and what effect to do.
//TODO: add this to the main on_mob_add proc, and check if Fermichem = TRUE
/datum/reagent/fermi/on_mob_add(mob/living/carbon/M, amount)
. = ..()
if(!M)
return
if(src.purity < 0)
CRASH("Purity below 0 for chem: [src.id], Please let Fermis Know!")
if (src.purity == 1 || src.DoNotSplit == TRUE)
if(purity < 0)
CRASH("Purity below 0 for chem: [id], Please let Fermis Know!")
if (purity == 1 || DoNotSplit == TRUE)
return
else if (src.InverseChemVal > src.purity)//Turns all of a added reagent into the inverse chem
else if (InverseChemVal > purity)//Turns all of a added reagent into the inverse chem
M.reagents.remove_reagent(src.id, amount, FALSE)
M.reagents.add_reagent(src.InverseChem, amount, FALSE, other_purity = 1)
return