More fixes.

This commit is contained in:
Fermi
2019-05-18 22:50:20 +01:00
parent 0b564e7e87
commit a837eda98b
6 changed files with 146 additions and 79 deletions
+8 -4
View File
@@ -650,7 +650,7 @@ im
deltapH = 0
return //If outside pH range, no reaction
else
deltapH = (((pH - (C.OptimalpHMax + C.ReactpHLim))**C.CurveSharppH)/(C.ReactpHLim**C.CurveSharppH))
deltapH = (((- pH + (C.OptimalpHMax + C.ReactpHLim))**C.CurveSharppH)/(C.ReactpHLim**C.CurveSharppH))//Reverse - to + to prevent math operation failures.
//Within mid range
else if (pH >= C.OptimalpHMin && pH <= C.OptimalpHMax)
deltapH = 1
@@ -870,15 +870,19 @@ im
R.volume += amount
//Maybe make a pH for reagents, not sure. it's hard to imagine where the H+ ions would go. I'm okay with this solution for now.
//R.purity = (our_pure_moles + their_pure_moles) / (R.volume)
message_admins("Purity before addition: [R.purity], vol:[R.volume]. Adding [other_purity], vol: [amount]")
R.purity = ((R.purity * R.volume) + (other_purity * amount)) /((R.volume + amount)) //This should add the purity to the product
////
message_admins("Purity after [R.purity]")
update_total()
if(my_atom)
my_atom.on_reagent_change(ADD_REAGENT)
//if(R.FermiChem == TRUE)
// R.on_mob_add(my_atom)
R.on_merge(data, amount)
if(!no_react)
handle_reactions()
return TRUE
@@ -893,8 +897,8 @@ im
R.data = data
R.on_new(data)
if(istype(D, /datum/reagent/fermi))//Is this a fermichem?
var/datum/reagent/fermi/Ferm = D.id //It's Fermi time!
Ferm.FermiNew(R.holder) //Seriously what is "data" ????
var/datum/reagent/fermi/Ferm = D //It's Fermi time!
Ferm.FermiNew(src) //Seriously what is "data" ????
//This is how I keep myself sane.
@@ -319,3 +319,10 @@
beaker.reagents.remove_reagent("sugar", amount)
beaker.reagents.remove_reagent("moonshine", amount)
beaker.reagents.add_reagent("moonsugar", amount*2)
/*Add later
if(beaker.reagents.has_reagent("synthflesh") &&
var/amount = min(beaker.reagents.get_reagent_amount("synthflesh"), beaker.reagents.get_reagent_amount("whiskey"))
beaker.reagents.remove_reagent("sugar", amount)
beaker.reagents.remove_reagent("moonshine", amount)
beaker.reagents.add_reagent("meat", amount*2)
*/
@@ -876,6 +876,19 @@
C.cure_trauma_type(resilience = TRAUMA_RESILIENCE_BASIC)
..()
/datum/reagent/medicine/neurine
name = "Neurine"
id = "neurine"
description = "Reacts with neural tissue, helping reform damaged connections. Can cure minor traumas."
color = "#EEFF8F"
/datum/reagent/medicine/neurine/on_mob_life(mob/living/carbon/C)
if(holder.has_reagent("neurotoxin"))
holder.remove_reagent("neurotoxin", 5)
if(prob(15))
C.cure_trauma_type(resilience = TRAUMA_RESILIENCE_BASIC)
..()
/datum/reagent/medicine/mutadone
name = "Mutadone"
id = "mutadone"
@@ -253,4 +253,4 @@
/obj/item/reagent_containers/pill/breast_enlargement
name = "breast enlargement pill"
list_reagents = list("BEenlager" = 10)
list_reagents = list("BElarger" = 10)
@@ -20,7 +20,7 @@
///datum/reagent/fermi/on_mob_life(mob/living/carbon/M)
//current_cycle++
//holder.remove_reagent(src.id, metabolization_rate / M.metabolism_efficiency, FALSE) //fermi reagents stay longer if you have a better metabolism
//M.reagents.remove_reagent(src.id, metabolization_rate / M.metabolism_efficiency, FALSE) //fermi reagents stay longer if you have a better metabolism
//return ..()
//Called when reaction stops. #STOP_PROCESSING
@@ -34,24 +34,41 @@
//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)
message_admins("purity of chem is [src.purity]")
message_admins("purity of chem is [purity]")
if(src.purity < 0)
CRASH("Purity below 0 for chem: [src.id], Please let Fermis Know!")
if (src.purity == 1 || src.DoNotSplit == TRUE)
return
else if (src.InverseChemVal > src.purity)
M.reagents.remove_reagent(src.id, volume, FALSE)
M.reagents.add_reagent(src.InverseChem, volume, FALSE)
message_admins("all convered to []")
M.reagents.add_reagent(src.InverseChem, volume, FALSE, other_purity = 1)
message_admins("all convered to [src.InverseChem]")
return
else
var/pureVol = volume * purity
var/impureVol = volume * (1 - pureVol)
//var/pureVol = volume * purity
var/impureVol = volume * (1 - (volume * purity))
M.reagents.remove_reagent(src.id, (volume*impureVol), FALSE)
M.reagents.add_reagent(src.ImpureChem, impureVol, FALSE)
M.reagents.add_reagent(src.ImpureChem, impureVol, FALSE, other_purity = 1)
return
..()
/datum/reagent/fermi/on_merge(mob/living/carbon/M, amount, other_purity)
if(other_purity < 0)
CRASH("Purity below 0 for chem: [src.id], Please let Fermis Know!")
if (other_purity == 1 || src.DoNotSplit == TRUE)
return
else if (src.InverseChemVal > other_purity)
M.reagents.remove_reagent(src.id, amount, FALSE)
M.reagents.add_reagent(src.InverseChem, amount, FALSE, other_purity = 1)
message_admins("all convered to [src.InverseChem]")
return
else
//var/pureVol =
var/impureVol = amount * (1 - (amount * other_purity))
M.reagents.remove_reagent(src.id, impureVol, FALSE)
M.reagents.add_reagent(src.ImpureChem, impureVol, FALSE, other_purity = 1)
return
..()
@@ -138,7 +155,7 @@
do_sparks(5,FALSE,src)
do_teleport(M, get_turf(M), 10, asoundin = 'sound/effects/phasein.ogg')
do_sparks(5,FALSE,src)
holder.remove_reagent(src.id, 0.5)//So you're not stuck for 10 minutes teleporting
M.reagents.remove_reagent(src.id, 0.5)//So you're not stuck for 10 minutes teleporting
..() //loop function
//Addiction
@@ -360,7 +377,7 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
//Really hacky way to deal with this stupid problem I have
SM.reagents.add_reagent("SDGFheal", volume)
//holder.add_reagent("SDGFheal", volume)
holder.remove_reagent(src.id, 999)
M.reagents.remove_reagent(src.id, 999)
//SMR = locate(/datum/reagents in SM)
//holder.trans_to(SMR, volume)
@@ -421,7 +438,7 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
to_chat(M, "<span class='notice'>Your body splits away from the cell clone of yourself, leaving you with a drained and hollow feeling inside.</span>")
M.apply_status_effect(/datum/status_effect/chem/SGDF)
if(87 to INFINITY)
holder.remove_reagent(src.id, 1000)//removes SGDF on completion. Has to do it this way because of how i've coded it. If some madlab gets over 1k of SDGF, they can have the clone healing.
M.reagents.remove_reagent(src.id, 1000)//removes SGDF on completion. Has to do it this way because of how i've coded it. If some madlab gets over 1k of SDGF, they can have the clone healing.
message_admins("Purging SGDF [volume]")
message_admins("Growth nucleation occuring (SDGF), step [current_cycle] of 77")
@@ -523,7 +540,7 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
if(75 to 85)
M.adjustToxLoss(1, 0)// the warning!
if(86)
if (!holder.has_reagent("pen_acid"))//Counterplay is pent.)
if (!M.reagents.has_reagent("pen_acid"))//Counterplay is pent.)
message_admins("Zombie spawned at [M.loc]")
M.nutrition = startHunger - 500//YOU BEST BE RUNNING AWAY AFTER THIS YOU BADDIE
M.next_move_modifier = 1
@@ -538,7 +555,7 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
ZI.desc = "[M]'s clone, gone horribly wrong."
ZI.zombiejob = null
//ZI.updateappearance(mutcolor_update=1)
holder.remove_reagent(src.id, 20)
M.reagents.remove_reagent(src.id, 20)
else//easier to deal with
to_chat(M, "<span class='notice'>The pentetic acid seems to have stopped the decay for now, clumping up the cells into a horrifying tumour!</span>")
M.nutrition = startHunger - 500
@@ -548,7 +565,7 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
S.real_name = "Living teratoma"//horrifying!!
S.rabid = 1//Make them an angery boi
//S.updateappearance(mutcolor_update=1)
holder.remove_reagent(src.id, 20)
M.reagents.remove_reagent(src.id, 20)
to_chat(M, "<span class='warning'>A large glob of the tumour suddenly splits itself from your body. You feel grossed out and slimey...</span>")
if(87 to INFINITY)//purges chemical fast, producing a "slime" for each one. Said slime is weak to fire. TODO: turn tumour slime into real variant.
M.adjustToxLoss(1, 0)
@@ -621,7 +638,7 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
nB.cached_size = 0
nB.prev_size = 0
to_chat(M, "<span class='warning'>Your chest feels warm, tingling with newfound sensitivity.</b></span>")
holder.remove_reagent(src.id, 5)
M.reagents.remove_reagent(src.id, 5)
B = nB
//If they have them, increase size. If size is comically big, limit movement and rip clothes.
//message_admins("Breast size: [B.size], [B.cached_size], [holder]")
@@ -712,7 +729,7 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
to_chat(M, "<span class='warning'>Your groin feels warm, as you feel a newly forming bulge down below.</b></span>")//OwO
nP.cached_length = 0.1
nP.prev_size = 0.1
holder.remove_reagent(src.id, 5)
M.reagents.remove_reagent(src.id, 5)
P = nP
P.cached_length = P.cached_length + 0.1
@@ -750,7 +767,7 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
T = nT
..()
/datum/reagent/fermi/PElarger // Due to cozmo's request...!
/datum/reagent/fermi/PEsmaller // Due to cozmo's request...!
name = "Incubus draft"
id = "PEsmaller"
description = "A volatile collodial mixture derived from various masculine solutions that encourages a larger gentleman's package via a potent testosterone mix, formula derived from a collaboration from Fermichem and Doctor Ronald Hyatt, who is well known for his phallus palace." //The toxic masculinity thing is a joke because I thought it would be funny to include it in the reagents, but I don't think many would find it funny? dumb
@@ -824,7 +841,7 @@ Buginess level: works as intended - except teleport makes sparks for some reason
if(prob(50))
to_chat(G, "<span class='warning'>The high conentration of Astrogen in your blood causes you to lapse your concentration for a moment, bringing your projection back to yourself!</b></span>")
do_teleport(G, M.loc)
holder.remove_reagent(src.id, current_cycle, FALSE)
M.reagents.remove_reagent(src.id, current_cycle, FALSE)
..()
/datum/reagent/fermi/astral/on_mob_delete(mob/living/carbon/M)
@@ -1035,8 +1052,8 @@ And as stated earlier, this chem is hard to make, and is punishing on failure. Y
var/mob/living/creator
/datum/reagent/fermi/enthrall/FermiNew()
message_admins("On new for enthral proc'd")
/datum/reagent/fermi/enthrall/FermiNew(holder)
message_admins("FermiNew for enthral proc'd")
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in holder.reagent_list
//var/datum/reagent/fermi/enthrall/E = locate(/datum/reagent/fermi/enthrall) in holder.reagent_list
if (B.["gender"] == "female")
@@ -1087,6 +1104,8 @@ And as stated earlier, this chem is hard to make, and is punishing on failure. Y
FallInLove(C, M)
return
var/datum/status_effect/chem/enthrall/E = M.has_status_effect(/datum/status_effect/chem/enthrall)
if(!E)
CRASH("No enthrall status found in [M]!")
E.enthrallTally += 1
M.adjustBrainLoss(0.1)
..()
@@ -1230,15 +1249,17 @@ And as stated earlier, this chem is hard to make, and is punishing on failure. Y
if(prob(20))
to_chat(M, "<span class='notice'>Your tongue feels... fluffy</span>")
if(10 to 20)
if(prob(20))
if(prob(10))
to_chat(M, "You find yourself unable to supress the desire to meow!")
M.emote("nya")
if(prob(20))
if(prob(10))
to_chat(M, "You find yourself unable to supress the desire to howl!")
M.emote("awoo")
if(prob(20))
if(prob(10))
var/list/seen = viewers(5, get_turf(M))//Sound and sight checkers
//for(var/victim in seen)
for(var/victim in seen)
if((victim != /mob/living/simple_animal/pet/) || (victim == M))
seen = seen - victim
if(seen)
to_chat(M, "You notice [pick(seen)]'s bulge [pick("OwO!", "uwu!")]")
if(21)
@@ -1248,18 +1269,19 @@ And as stated earlier, this chem is hard to make, and is punishing on failure. Y
nT.Insert(M)
qdel(T)
if(22 to INFINITY)
if(prob(20))
if(prob(10))
to_chat(M, "You find yourself unable to supress the desire to meow!")
M.emote("nya")
if(prob(20))
if(prob(10))
to_chat(M, "You find yourself unable to supress the desire to howl!")
M.emote("awoo")
if(prob(20))
if(prob(10))
var/list/seen = viewers(5, get_turf(M))//Sound and sight checkers
//for(var/victim in seen)
for(var/victim in seen)
if((victim != /mob/living/simple_animal/pet/) || (victim == M))
seen = seen - victim
if(seen)
to_chat(M, "You notice [pick(seen)]'s bulge [pick("OwO!", "uwu!")]")
nT.maxHealth += purity //I like to have some reason for purity..!
..()
///////////////////////////////////////////////////////////////////////////////////////////////
@@ -1326,10 +1348,31 @@ And as stated earlier, this chem is hard to make, and is punishing on failure. Y
id = "fermiAcid"
description = "Someone didn't do like an otter, and add acid to water."
/datum/reagent/fermi/fermiAcid/on_mob_life(mob/living/carbon/C)
/datum/reagent/fermi/fermiAcid/on_mob_life(mob/living/carbon/C, method)
var/target = C.get_bodypart(BODY_ZONE_CHEST)
if(prob(20))
to_chat(C, "<span class='warning'>You can feel your lungs burning!</b></span>")
C.apply_damage(2, BURN, target)
var/obj/item/organ/lungs/L = C.getorganslot(ORGAN_SLOT_LUNGS)
L.adjustLungLoss(2)
C.adjustFireLoss(1, 0)
if(method==VAPOR)
if(prob(20))
to_chat(C, "<span class='warning'>You can feel your lungs burning!</b></span>")
var/obj/item/organ/lungs/L = C.getorganslot(ORGAN_SLOT_LUNGS)
L.adjustLungLoss(2)
C.apply_damage(1, BURN, target)
var/acidstr = (5-C.reagents.pH)
C.acid_act(acidstr, volume)
..()
/datum/reagent/fermi/fermiAcid/reaction_obj(obj/O, reac_volume)
if(ismob(O.loc)) //handled in human acid_act()
return
reac_volume = round(volume,0.1)
var/acidstr = (5-holder.pH)
O.acid_act(acidstr, volume)
..()
/datum/reagent/fermi/fermiAcid/reaction_turf(turf/T, reac_volume)
if (!istype(T))
return
reac_volume = round(volume,0.1)
var/acidstr = (5-holder.pH)
T.acid_act(acidstr, volume)
..()
@@ -71,7 +71,7 @@
//serum
/datum/chemical_reaction/fermi/SDGF
name = "synthetic-derived growth factor"
name = "Synthetic-derived growth factor"
id = "SDGF"
results = list("SDGF" = 3)
required_reagents = list("plasma" = 1, "stable_plasma" = 1, "sugar" = 1)
@@ -105,7 +105,7 @@
/datum/chemical_reaction/fermi/BElarger
name = "Sucubus milk"
id = "BElarger"
results = list("Eigenstasium" = 6)
results = list("BElarger" = 6)
required_reagents = list("salglu_solution" = 1, "milk" = 5, "synthflesh" = 2, "silicon" = 2, "aphro" = 2)
//FermiChem vars:
OptimalTempMin = 200
@@ -120,7 +120,7 @@
ThermicConstant = 1
HIonRelease = 0.1
RateUpLim = 10
FermiChem = FALSE
FermiChem = TRUE
FermiExplode = TRUE
PurityMin = 0.1
@@ -152,7 +152,7 @@
ThermicConstant = 1
HIonRelease = 0.1
RateUpLim = 10
FermiChem = FALSE
FermiChem = TRUE
FermiExplode = TRUE
PurityMin = 0.1
@@ -168,8 +168,7 @@
name = "Astrogen"
id = "astral"
results = list("astral" = 3)
required_reagents = list("plasma" = 1, "stable_plasma" = 1, "sugar" = 1)
required_catalysts = list("blood" = 1)
required_reagents = list("eigenstasium" = 1, "plasma" = 1, "synaptizine" = 1, "aluminium" = 5)
//required_reagents = list("stable_plasma" = 5, "slimejelly" = 5, "synthflesh" = 10, "blood" = 10)
//FermiChem vars:
OptimalTempMin = 200
@@ -184,32 +183,33 @@
ThermicConstant = 1
HIonRelease = 0.1
RateUpLim = 10
FermiChem = FALSE
FermiChem = TRUE
FermiExplode = TRUE
PurityMin = 0.25
/datum/chemical_reaction/fermi/enthrall //Vars needed
name = "need a name"
name = "MKUltra"
id = "enthrall"
results = list("enthrall" = 3)
required_reagents = list("plasma" = 1, "stable_plasma" = 1, "sugar" = 1)
required_reagents = list("iron" = 1, "iodine" = 1)
//required_reagents = list("cocoa" = 1, "astral" = 1, "mindbreaker" = 1, "psicodine" = 1, "happiness" = 1)
required_catalysts = list("blood" = 1)
//required_reagents = list("stable_plasma" = 5, "slimejelly" = 5, "synthflesh" = 10, "blood" = 10)
//FermiChem vars:
OptimalTempMin = 200
OptimalTempMin = 780
OptimalTempMax = 800
ExplodeTemp = 900
OptimalpHMin = 5
OptimalpHMax = 10
ReactpHLim = 3
CatalystFact = 0
CurveSharpT = 2
CurveSharppH = 2
ThermicConstant = 1
ExplodeTemp = 820
OptimalpHMin = 1
OptimalpHMax = 2
ReactpHLim = 2
//CatalystFact = 0
CurveSharpT = 0.5
CurveSharppH = 4
ThermicConstant = 20
HIonRelease = 0.1
RateUpLim = 10
FermiChem = FALSE
RateUpLim = 5
FermiChem = TRUE
FermiExplode = TRUE
PurityMin = 0.15
@@ -236,21 +236,21 @@
..()
/datum/chemical_reaction/fermi/hatmium
name = "Hat growth serium"
name = "Hat growth serum"
id = "hatmium"
results = list("hatmium" = 5)
//required_reagents = list("synthflesh" = 5, "blood" = 3, "uranium" = 1, "iron" = 1, "salglu_solution" = 3)
required_reagents = list("whiskey" = 1, "nutriment" = 3, "cooking_oil" = 2, "iron" = 1, "blackpepper" = 3)
//mix_message = ""
//FermiChem vars:
OptimalTempMin = 450
OptimalTempMax = 600
ExplodeTemp = 700
OptimalpHMin = 6
OptimalpHMax = 8
OptimalTempMin = 500
OptimalTempMax = 650
ExplodeTemp = 750
OptimalpHMin = 10
OptimalpHMax = 14
ReactpHLim = 1
//CatalystFact = 0 //To do 1
CurveSharpT = 4
CurveSharppH = 2
CurveSharppH = 0.5
ThermicConstant = -2.5
HIonRelease = 0.01
RateUpLim = 5
@@ -270,21 +270,21 @@
name = "Furranium"
id = "furranium"
results = list("furranium" = 5)
//required_reagents = list("synthflesh" = 5, "blood" = 3, "uranium" = 1, "iron" = 1, "salglu_solution" = 3)
required_reagents = list("aphro" = 1, "moonsugar" = 1, "silver" = 1, "salglu_solution" = 1)
//mix_message = ""
//FermiChem vars:
OptimalTempMin = 450
OptimalTempMin = 350
OptimalTempMax = 600
ExplodeTemp = 700
OptimalpHMin = 6
OptimalpHMax = 8
OptimalpHMin = 8
OptimalpHMax = 10
ReactpHLim = 1
//CatalystFact = 0 //To do 1
CurveSharpT = 4
CurveSharppH = 2
ThermicConstant = -2.5
HIonRelease = 0.01
RateUpLim = 5
CurveSharpT = 2
CurveSharppH = 0.5
ThermicConstant = -2
HIonRelease = -0.1
RateUpLim = 10
FermiChem = TRUE
//FermiExplode = FALSE
//PurityMin = 0.15
@@ -294,8 +294,8 @@
name = "Naninte bain"
id = "naninte_b_gone"
results = list("naninte_b_gone" = 5)
required_reagents = list("synthflesh" = 5, "blood" = 3, "uranium" = 1, "iron" = 1, "salglu_solution" = 3)
mix_message = "the blood and sugar nucleates a hard coating of synth flesh inside the beaker."
required_reagents = list("synthflesh" = 5, "uranium" = 1, "iron" = 1, "salglu_solution" = 3)
mix_message = "the reaction gurgles, encapsulating the reagents in flesh."
//FermiChem vars:
OptimalTempMin = 450
OptimalTempMax = 600