Update defines, and vars, and created new procs

This commit is contained in:
Fermi
2019-09-19 21:24:50 +01:00
parent d2c49d7987
commit b8190552f1
10 changed files with 66 additions and 40 deletions
@@ -136,7 +136,6 @@ Creating a chem with a low purity will make you permanently fall in love with so
color = "#660015" // rgb: , 0, 255
taste_description = "synthetic chocolate, a base tone of alcohol, and high notes of roses"
overdose_threshold = 100 //If this is too easy to get 100u of this, then double it please.
reagentFlags = REAGENT_DONOTSPLIT
metabolization_rate = 0.1//It has to be slow, so there's time for the effect.
data = list("creatorID" = null, "creatorGender" = null, "creatorName" = null)
var/creatorID //ckey
@@ -144,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 //Procs on_mob_add when merging into a human
reagentFlags = REAGENT_ONMOBMERGE | REAGENT_DONOTSPLIT //Procs on_mob_add when merging into a human
can_synth = FALSE
@@ -316,6 +316,7 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
metabolization_rate = 0.5 * REAGENTS_METABOLISM
var/startHunger
can_synth = TRUE
reagentFlags = 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
@@ -6,7 +6,10 @@
id = "fermi"
taste_description = "affection and love!"
can_synth = FALSE
SplitChem = TRUE
//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"
//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)
@@ -16,7 +19,7 @@
//When merging two fermichems, see above
/datum/reagent/fermi/on_merge(data, amount, mob/living/carbon/M, purity)//basically on_mob_add but for merging
. = ..()
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -80,7 +80,7 @@
taste_description = "a weird, syrupy flavour, yamero"
color = "#68e83a"
pH = 8.6
reagentFlags = REAGENT_INVISIBLE
reagentFlags = 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)
@@ -6,7 +6,23 @@
return
//Called when reaction STOP_PROCESSING
/datum/chemical_reaction/proc/FermiFinish(datum/reagents/holder)
/datum/chemical_reaction/proc/FermiFinish(datum/reagents/holder, var/atom/my_atom)
if(ClearConversion == 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)
my_atom.reagents.remove_reagent(R.id, cached_volume, FALSE)
my_atom.reagents.add_reagent(R.InverseChem, cached_volume, FALSE, other_purity = 1)
else if (ClearConversion == REACTION_CLEAR_IMPURE && R.ImpureChem)
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)
return
//Called when temperature is above a certain threshold, or if purity is too low.