Compile safe. Today's fixes.

This commit is contained in:
Fermi
2019-05-27 05:39:52 +01:00
parent 4cb697d2ec
commit 4607a2b6c3
17 changed files with 255 additions and 352 deletions
@@ -53,8 +53,8 @@
desc = "You see a pair of breasts."
else
desc = "You see some breasts, they seem to be quite exotic."
if(isnum(size))
desc = "You see [pick("some serious honkers", "a real set of badonkers", "some dobonhonkeros", "massive dohoonkabhankoloos", "two big old tonhongerekoogers", "a couple of giant bonkhonagahoogs", "a pair of humongous hungolomghnonoloughongous")]. Their volume is way beyond cupsize now, measuring in about [round(size)]cm in diameter."
if(cached_size > 16)
desc = "You see [pick("some serious honkers", "a real set of badonkers", "some dobonhonkeros", "massive dohoonkabhankoloos", "two big old tonhongerekoogers", "a couple of giant bonkhonagahoogs", "a pair of humongous hungolomghnonoloughongous")]. Their volume is way beyond cupsize now, measuring in about [round(cached_size)]cm in diameter."
else if (!isnum(size))
if (size == "flat")
desc += " They're very small and flatchested, however."
@@ -121,20 +121,14 @@
size = "flat"
if(isnum(prev_size))
prev_size = breast_sizes[prev_size]
//message_admins("2. [breast_values[size]] vs [breast_values[prev_size]] || [size] vs [prev_size]")
if (breast_values[size] > breast_values[prev_size])
to_chat(owner, "<span class='warning'>Your breasts [pick("swell up to", "flourish into", "expand into", "burst forth into", "grow eagerly into", "amplify into")] a [uppertext(size)]-cup.</b></span>")
var/mob/living/carbon/human/H = owner
message_admins("Cached: [cached_size], prev: [prev_size], size: [size]")
H.Force_update_genitals()
else if (breast_values[size] < breast_values[prev_size])
to_chat(owner, "<span class='warning'>Your breasts [pick("shrink down to", "decrease into", "diminish into", "deflate into", "shrivel regretfully into", "contracts into")] a [uppertext(size)]-cup.</b></span>")
var/mob/living/carbon/human/H = owner
H.Force_update_genitals()
prev_size = size
/* for future use, DO NOT DELETE:
else if (cached_size >= 16)
if(size != "huge")
to_chat(owner, "<span class='warning'>Your breasts [pick("swell up to", "flourish into", "expand into", "burst forth into", "grow eagerly into", "amplify into")] a hefty [uppertext(size)]cm diameter bosom.</b></span>")// taking both of your hands to hold!.</b></span>")
size = "huge"
*/
@@ -288,7 +288,7 @@
if(istype(O, /obj/item/organ/genital))
organCheck = TRUE
if (organCheck == FALSE)
if(ishuman(src))
if(ishuman(src) && dna.species.id == "human")
dna.features["genitals_use_skintone"] = TRUE
dna.species.use_skintones = TRUE
return
@@ -297,8 +297,7 @@
dna.features["breasts_color"] = "#[dna.features["mcolor"]]"
return
/datum/species/proc/handle_genitals(mob/living/carbon/human/H)
//message_admins("attempting to update sprite")
/datum/species/proc/handle_genitals(mob/living/carbon/human/H)//more like handle sadness
if(!H)//no args
CRASH("H = null")
if(!LAZYLEN(H.internal_organs))//if they have no organs, we're done
@@ -316,7 +315,6 @@
for(var/L in relevant_layers) //Less hardcode
H.remove_overlay(L)
//start scanning for genitals
//var/list/worn_stuff = H.get_equipped_items()//cache this list so it's not built again
for(var/obj/item/organ/O in H.internal_organs)
if(isgenital(O))
var/obj/item/organ/genital/G = O
@@ -362,23 +360,7 @@
genital_overlay.color = "#[H.dna.features["breasts_color"]]"
if("vag_color")
genital_overlay.color = "#[H.dna.features["vag_color"]]"
/* This was removed for some reason?
if(MUTCOLORS)
if(fixed_mut_color)
genital_overlay.color = "#[fixed_mut_color]"
else
genital_overlay.color = "#[H.dna.features["mcolor"]]"
if(MUTCOLORS2)
if(fixed_mut_color2)
genital_overlay.color = "#[fixed_mut_color2]"
else
genital_overlay.color = "#[H.dna.features["mcolor2"]]"
if(MUTCOLORS3)
if(fixed_mut_color3)
genital_overlay.color = "#[fixed_mut_color3]"
else
genital_overlay.color = "#[H.dna.features["mcolor3"]]"
*/
standing += genital_overlay
if(LAZYLEN(standing))
H.overlays_standing[layer] = standing.Copy()
@@ -387,7 +369,7 @@
for(var/L in relevant_layers)
H.apply_overlay(L)
/* Behold the maddness I went through.
/* Behold the maddness I went through. This is here until the genetial problem is confirmed fixed.
/datum/species/proc/handle_breasts(mob/living/carbon/human/H)
//check for breasts first!
@@ -37,30 +37,26 @@
. = ..()
if(!M)
return
message_admins("adding to human [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)
else if (src.InverseChemVal > src.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)
message_admins("all convered to [src.InverseChem]")
return
else
//var/pureVol = amount * puritys
var/impureVol = amount * (1 - purity)
message_admins("splitting [src.id] [amount] into [src.ImpureChem] [impureVol]")
var/impureVol = amount * (1 - purity) //turns impure ratio into impure chem
M.reagents.remove_reagent(src.id, (impureVol), FALSE)
M.reagents.add_reagent(src.ImpureChem, impureVol, FALSE, other_purity = 1)
return
//When merging two fermichems
//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
. = ..()
if(!ishuman(M))
return
message_admins("merging to human [purity]")
if (purity < 0)
CRASH("Purity below 0 for chem: [src.id], Please let Fermis Know!")
if (purity == 1 || src.DoNotSplit == TRUE)
@@ -71,12 +67,9 @@
for(var/datum/reagent/fermi/R in M.reagents.reagent_list)
if(R.name == "")
R.name = src.name//Negative effects are hidden
message_admins("all convered to [src.InverseChem]")
return
else
//var/pureVol =
var/impureVol = amount * (1 - purity)
message_admins("splitting [src] [amount] into [src.ImpureChem] [impureVol]")
M.reagents.remove_reagent(src.id, impureVol, FALSE)
M.reagents.add_reagent(src.ImpureChem, impureVol, FALSE, other_purity = 1)
for(var/datum/reagent/fermi/R in M.reagents.reagent_list)
@@ -85,12 +78,6 @@
return
///datum/reagent/fermi/overdose_start(mob/living/carbon/M)
//current_cycle++
////////////////////////////////////////////////////////////////////////////////////////////////////
// EIGENSTASIUM
///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -152,7 +139,6 @@
do_sparks(5,FALSE,M)
if(prob(20))
do_sparks(5,FALSE,M)
//message_admins("eigenstate state: [current_cycle]")
..()
/datum/reagent/fermi/eigenstate/on_mob_delete(mob/living/M) //returns back to original location
@@ -217,24 +203,20 @@
fermi_Tclone.appearance = M.appearance
C.real_name = M.real_name
M.visible_message("[M] collapses in from an alternative reality!")
message_admins("Fermi T Clone: [fermi_Tclone]")
do_teleport(C, get_turf(C), 2, no_effects=TRUE) //teleports clone so it's hard to find the real one!
do_sparks(5,FALSE,C)
C.emote("spin")
M.emote("spin")
M.emote("me",1,"flashes into reality suddenly, gasping as they gaze around in a bewildered and highly confused fashion!",TRUE)
C.emote("me",1,"[pick("says", "cries", "mewls", "giggles", "shouts", "screams", "gasps", "moans", "whispers", "announces")], \"[pick("Bugger me, whats all this then?", "Hot damn, where is this?", "sacre bleu! O suis-je?!", "Yee haw!", "WHAT IS HAPPENING?!", "Picnic!", "Das ist nicht deutschland. Das ist nicht akzeptabel!!!", "Ciekawe co na obiad?", "You fool! You took too much eigenstasium! You've doomed us all!", "What...what's with these teleports? It's like one of my Japanese animes...!", "Ik stond op het punt om mehki op tafel te zetten, en nu, waar ben ik?", "This must be the will of Stein's gate.", "Fermichem was a mistake", "This is one hell of a strong beepsky smash.", "Now neither of us will be virgins!")]\"")
message_admins("Fermi T Clone: [fermi_Tclone] teleport attempt")
if(2)
var/mob/living/carbon/C = fermi_Tclone
do_sparks(5,FALSE,C)
qdel(C) //Deletes CLONE, or at least I hope it is.
message_admins("Fermi T Clone: [fermi_Tclone] deletion attempt")
M.visible_message("[M] is snapped across to a different alternative reality!")
src.addictCyc3 = 0 //counter
fermi_Tclone = null
src.addictCyc3++
message_admins("[src.addictCyc3]")
do_teleport(M, get_turf(M), 2, no_effects=TRUE) //Teleports player randomly
do_sparks(5,FALSE,M)
..() //loop function
@@ -344,9 +326,8 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
pollStarted = TRUE
candies = pollGhostCandidates("Do you want to play as a clone and do you agree to respect their character and act in a similar manner to them? I swear to god if you diddle them I will be very disapointed in you.")
if(20 to INFINITY)
//message_admins("Number of candidates [LAZYLEN(candies)]")
if(LAZYLEN(candies) && src.playerClone == FALSE) //If there's candidates, clone the person and put them in there!
message_admins("Candidate found! [candies] is becomeing a clone of [M]! Hee~!! Exciting!!")
message_admins("Ghost candidate found! [candies] is becoming a clone of [M]! Hee~!! Exciting!!")
to_chat(M, "<span class='warning'>The cells reach a critical micelle concentration, nucleating rapidly within your body!</span>")
//var/typepath = owner.type
//clone = new typepath(owner.loc)
@@ -405,12 +386,10 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
return
//BALANCE: should I make them a pacifist, or give them some cellular damage or weaknesses?
//after_success(user, SM)
//qdel(src)
else if(src.playerClone == FALSE) //No candidates leads to two outcomes; if there's already a braincless clone, it heals the user, as well as being a rare souce of clone healing (thematic!).
//message_admins("Failed to find clone Candidate")
src.unitCheck = TRUE
if(M.has_status_effect(/datum/status_effect/chem/SGDF)) // Heal the user if they went to all this trouble to make it and can't get a clone, the poor fellow.
switch(current_cycle)
@@ -450,8 +429,6 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
M.apply_status_effect(/datum/status_effect/chem/SGDF)
if(87 to INFINITY)
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")
..()
@@ -528,7 +505,6 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
var/startHunger
/datum/reagent/fermi/SDZF/on_mob_life(mob/living/carbon/M) //If you're bad at fermichem, turns your clone into a zombie instead.
//message_admins("SGZF ingested")
switch(current_cycle)//Pretends to be normal
if(20)
to_chat(M, "<span class='notice'>You feel the synethic cells rest uncomfortably within your body as they start to pulse and grow rapidly.</span>")
@@ -552,7 +528,7 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
M.adjustToxLoss(1, 0)// the warning!
if(86)
if (!M.reagents.has_reagent("pen_acid"))//Counterplay is pent.)
message_admins("Zombie spawned at [M.loc]")
message_admins("(non-infectious) Zombie spawned at [M.loc], produced by impure chem, wah!")
M.nutrition = startHunger - 500//YOU BEST BE RUNNING AWAY AFTER THIS YOU BADDIE
M.next_move_modifier = 1
to_chat(M, "<span class='warning'>Your body splits away from the cell clone of yourself, your attempted clone birthing itself violently from you as it begins to shamble around, a terrifying abomination of science.</span>")
@@ -579,7 +555,6 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
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)
//message_admins("Growth nucleation occuring (SDGF), step [current_cycle] of 20")
..()
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -630,8 +605,9 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
to_chat(S, "<span class='warning'>A pair of breasts suddenly fly out of the [M]!</b></span>")
//var/turf/T2 = pick(turf in view(5, M))
var/T2 = get_random_station_turf()
M.adjustBruteLoss(5)
M.adjustBruteLoss(25)
M.Knockdown(50)
M.Stun(50)
B.throw_at(T2, 8, 1)
M.reagents.remove_reagent(src.id, 1000)
return
@@ -640,7 +616,6 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
var/obj/item/organ/genital/breasts/B = H.getorganslot("breasts")
if(!B)
H.emergent_genital_call()
//message_admins("No breasts found on init!")
return
var/sizeConv = list("a" = 1, "b" = 2, "c" = 3, "d" = 4, "e" = 5)
B.prev_size = B.size
@@ -653,7 +628,6 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
var/mob/living/carbon/human/H = M
var/obj/item/organ/genital/breasts/B = M.getorganslot("breasts")
if(!B) //If they don't have breasts, give them breasts.
//message_admins("No breasts found!")
var/obj/item/organ/genital/breasts/nB = new
nB.Insert(M)
if(nB)
@@ -670,7 +644,6 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
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]")
B.cached_size = B.cached_size + 0.1
if (B.cached_size >= 8.5 && B.cached_size < 9)
if(H.w_uniform || H.wear_suit)
@@ -694,7 +667,6 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
if(P)
P.cached_length = P.cached_length - 0.1
//message_admins("lewdsnek size: [P.size], [P.cached_length], [holder]")
P.update()
if(T)
T.Remove(M)
@@ -756,8 +728,9 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
for(var/mob/S in seen)
to_chat(S, "<span class='warning'>A penis suddenly flies out of the [M]!</b></span>")
var/T2 = get_random_station_turf()
M.adjustBruteLoss(5)
M.adjustBruteLoss(25)
M.Knockdown(50)
M.Stun(50)
P.throw_at(T2, 8, 1)
M.reagents.remove_reagent(src.id, 1000)
return
@@ -765,20 +738,17 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
H.genital_override = TRUE
var/obj/item/organ/genital/penis/P = M.getorganslot("penis")
if(!P)
message_admins("No penis found on init!")
H.emergent_genital_call()
return
P.prev_size = P.length
P.cached_length = P.length
message_admins("init P len chem: [P.length], prev: [P.prev_size], cache = [P.cached_length]")
/datum/reagent/fermi/PElarger/on_mob_life(mob/living/carbon/M) //Increases penis size, 5u = +1 inch.
if(!ishuman(M))
return
var/mob/living/carbon/human/H = M
var/obj/item/organ/genital/penis/P = M.getorganslot("penis")
if(!P)
message_admins("No penis found!")//They do have a preponderance for escapism, or so I've heard.
if(!P)//They do have a preponderance for escapism, or so I've heard.
var/obj/item/organ/genital/penis/nP = new
nP.Insert(M)
if(nP)
@@ -811,7 +781,6 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
if(B)
B.cached_size = B.cached_size - 0.1
//message_admins("Breast size: [B.size], [B.cached_size], [holder]")
B.update()
if(V)
V.Remove(M)
@@ -1078,15 +1047,10 @@ Feel free to add more.
triggers work when said by ANYONE, not just the enchanter.
This is only state 3 pets, state 4 pets cannot get custom triggers, you broke them you bully.
6. One other thing that I can't get to work - replacing the mention of your enthraller with Master/Mistress. Maybe it's too much trouble.
7. If you're an antage you get a bonus to resistance AND to enthralling. Thus it can be worth using this on both sides. It shouldn't be hard to resist as an antag. There are futher bonuses to command, Chaplains and chemist.
If you give your pet a collar then their resistance reduced too.
(I think thats everything?)
How buggy is it?
Probably very, it's hard to test this by myself.
BALANCE ISSUES:
There are none, but I'm glad you asked.
@@ -1108,6 +1072,7 @@ And as stated earlier, this chem is hard to make, and is punishing on failure. Y
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.
DoNotSplit = TRUE
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
var/creatorGender
@@ -1137,34 +1102,22 @@ And as stated earlier, this chem is hard to make, and is punishing on failure. Y
creator = get_mob_by_key(creatorID)
/datum/reagent/fermi/enthrall/on_new(list/data)
message_admins("FermiNew for enthral proc'd")
creatorID = data.["creatorID"]
creatorGender = data.["creatorGender"]
creatorName = data.["creatorName"]
creator = get_mob_by_key(creatorID)
message_admins("name: [creatorName], ID: [creatorID], gender: [creatorGender]")
/*
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in my_atom.reagents.reagent_list
//var/datum/reagent/fermi/enthrall/E = locate(/datum/reagent/fermi/enthrall) in holder.reagent_list
if (B.data.["gender"] == "female")
creatorGender = "Mistress"
else
creatorGender = "Master"
creatorName = B.data.["real_name"]
creatorID = B.data.["ckey"]
*/
//FERMICHEM2 split into different chems
/datum/reagent/fermi/enthrall/on_mob_add(mob/living/carbon/M)
. = ..()
if(!creatorID)
message_admins("Something went wrong in enthral creation THIS SHOULD NOT APPEAR")
CRASH("Something went wrong in enthral creation THIS SHOULD NOT APPEAR")
return
if(!ishuman(M))//Just to make sure screwy stuff doesn't happen.
return
var/datum/status_effect/chem/enthrall/E = M.has_status_effect(/datum/status_effect/chem/enthrall) //Somehow a beaker got here? (what)
if(E)
return
message_admins("key: [M.ckey] vs [creatorID], ")
if(purity < 0.5)//Impure chems don't function as you expect
return
if((M.ckey == creatorID) && (creatorName == M.real_name)) //same name AND same player - same instance of the player. (should work for clones?)
@@ -1179,14 +1132,6 @@ And as stated earlier, this chem is hard to make, and is punishing on failure. Y
to_chat(M, "<span class='notice'><i>You feel your vocal chords tingle as your voice comes out in a more sultry tone.</span>")
else
M.apply_status_effect(/datum/status_effect/chem/enthrall)
//var/datum/status_effect/chem/enthrall/E = M.has_status_effect(/datum/status_effect/chem/enthrall)
/*
if(creator)
E.enthrallID = creatorID
E.enthrallGender = creatorGender
E.master = creator
*/
/datum/reagent/fermi/enthrall/on_mob_life(mob/living/carbon/M)
. = ..()
@@ -1222,9 +1167,7 @@ And as stated earlier, this chem is hard to make, and is punishing on failure. Y
metabolization_rate = 0.5
var/datum/status_effect/chem/enthrall/E = M.has_status_effect(/datum/status_effect/chem/enthrall)//If purity is over 5, works as intended
if(!E)
M.reagents.remove_reagent(src.id, 1)
//M.apply_status_effect(/datum/status_effect/chem/enthrall)
message_admins("No enthrall status found in [M]!")
return
else
E.enthrallTally += 1
if(prob(25))
@@ -1446,7 +1389,7 @@ And as stated earlier, this chem is hard to make, and is punishing on failure. Y
nT = M.getorganslot(ORGAN_SLOT_TONGUE)
nT.Remove(M)
T.Insert(M)
to_chat(M, "<span class='notice'>You feel your tongue.... unfluffify...?</span>"
to_chat(M, "<span class='notice'>You feel your tongue.... unfluffify...?</span>")
M.say("Pleh!")
///////////////////////////////////////////////////////////////////////////////////////////////
@@ -1519,7 +1462,7 @@ 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."
taste_description = "acid burns, ow"
color = "#000000"
color = "#FFFFFF"
pH = 0
/datum/reagent/fermi/fermiAcid/on_mob_life(mob/living/carbon/C, method)
@@ -1592,7 +1535,7 @@ And as stated earlier, this chem is hard to make, and is punishing on failure. Y
id = "fermiTox"
description = "You should be really careful with this...! Also, how did you get this?"
data = "merge"
color = "#000000"
color = "FFFFFF"
/datum/reagent/fermi/fermiTox/on_mob_life(mob/living/carbon/C, method)
if(C.dna && istype(C.dna.species, /datum/species/jelly))
@@ -1610,11 +1553,17 @@ And as stated earlier, this chem is hard to make, and is punishing on failure. Y
addProc = FALSE
pH = 6
/datum/reagent/fermi/fermiABuffer/on_new(oldpH)
if(LAZYLEN(holder.reagent_list) == 1)
/datum/reagent/fermi/fermiABuffer/on_new()
message_admins("Adding acid")
if(LAZYLEN(holder.reagent_list) == 1)
return
pH = ((holder.pH * holder.total_volume)+(pH * src.volume))/(holder.total_volume + src.volume)
src.pH = data
if (pH <= 3)
pH = 3
else if (pH >= 7)
pH = 7
holder.pH = ((holder.pH * holder.total_volume)+(pH * src.volume))/(holder.total_volume + src.volume) //Shouldn't be required
holder.remove_reagent(src.id, 1000)
..()
@@ -1628,35 +1577,14 @@ And as stated earlier, this chem is hard to make, and is punishing on failure. Y
pH = 8
/datum/reagent/fermi/fermiBBuffer/on_new()
message_admins("Adding base")
if(LAZYLEN(holder.reagent_list) == 1)
return
pH = ((holder.pH * holder.total_volume)+(pH * src.volume))/(holder.total_volume + src.volume)
src.pH = data
if (pH >= 11)
pH = 11
else if (pH <= 7)
pH = 7
holder.pH = ((holder.pH * holder.total_volume)+(pH * src.volume))/(holder.total_volume + src.volume) //Shouldn't be required Might be..?
holder.remove_reagent(src.id, 1000)
..()
/*
/datum/reagent/fermi/fermiTest/on_merge()
..()
message_admins("FermiTest addition!")
var/location = get_turf(holder.my_atom)
if(purity < 0.34 || purity == 1)
var/datum/effect_system/foam_spread/s = new()
s.set_up(volume*2, location, holder)
s.start()
if((purity < 0.67 && purity >= 0.34)|| purity == 1)
var/datum/effect_system/smoke_spread/chem/s = new()
s.set_up(holder, volume*2, location)
s.start()
if(purity >= 0.67)
for (var/datum/reagent/reagent in holder.reagent_list)
if (istype(reagent, /datum/reagent/fermi))
var/datum/chemical_reaction/fermi/Ferm = GLOB.chemical_reagents_list[reagent.id]
Ferm.FermiExplode(src, holder.my_atom, holder, holder.total_volume, holder.chem_temp, holder.pH)
else
var/datum/chemical_reaction/Ferm = GLOB.chemical_reagents_list[reagent.id]
Ferm.on_reaction(holder, reagent.volume)
for(var/mob/M in viewers(8, location))
to_chat(M, "<span class='danger'>The solution reacts dramatically, with a meow!</span>")
playsound(get_turf(M), 'modular_citadel/sound/voice/merowr.ogg', 50, 1, -1)
holder.clear_reagents()
*/
@@ -16,30 +16,12 @@
/datum/chemical_reaction/fermi/proc/FermiExplode(datum/reagents, var/atom/my_atom, volume, temp, pH, Exploding = FALSE) //You can get holder by reagents.holder WHY DID I LEARN THIS NOW???
if (Exploding == TRUE)
return
if(!pH)//Dunno how things got here without a pH.
pH = 7
var/ImpureTot = 0
var/pHmod = 1
//var/pHmod = 1
var/turf/T = get_turf(my_atom)
message_admins("Fermi explosion at [T], with a temperature of [temp], pH of [pH], Impurity tot of [ImpureTot], containing [my_atom.reagents.reagent_list]")
var/datum/reagents/R = new/datum/reagents(3000)//Hey, just in case.
var/datum/effect_system/smoke_spread/chem/s = new()
if(pH < 4) //if acidic, make acid spray
//s.set_up(/datum/reagent/fermi/fermiAcid, (volume/3), pH*10, T)
my_atom.reagents.add_reagent("fermiAcid", ((volume/3)/pH))
//pHmod = 2
for (var/datum/reagent/reagent in my_atom.reagents.reagent_list) //make gas for reagents
/*if (istype(reagent, /datum/reagent/fermi))
continue //Don't allow fermichems into the mix (fermi explosions are handled elsewhere and it's a huge pain)
*/
//R.add_reagent(reagent, reagent.volume)
if (reagent.purity < 0.6)
ImpureTot = (ImpureTot + (1-reagent.purity)) / 2
if(R.reagent_list)
s.set_up(my_atom.reagents, (volume/10), 10, T)
s.start()
if(temp>500)//if hot, start a fire
switch(temp)
if (500 to 750)
@@ -55,6 +37,26 @@
new /obj/effect/hotspot(turf)
//volume /= 5
message_admins("Fermi explosion at [T], with a temperature of [temp], pH of [pH], Impurity tot of [ImpureTot].")
var/datum/reagents/R = new/datum/reagents(3000)//Hey, just in case.
var/datum/effect_system/smoke_spread/chem/s = new()
/*Endless loop hell
for (var/datum/reagent/reagent in my_atom.reagents.reagent_list) //make gas for reagents
if (istype(reagent, /datum/reagent/fermi))
my_atom.reagents.remove_reagent(reagent.id, 1000)//Prevent endless loops
continue //Don't allow fermichems into the mix (fermi explosions are handled elsewhere and it's a huge pain)
//R.add_reagent(reagent, reagent.volume)
if (reagent.purity < 0.6)
ImpureTot = (ImpureTot + (1-reagent.purity)) / 2
*/
if(pH < 4) //if acidic, make acid spray
//s.set_up(/datum/reagent/fermi/fermiAcid, (volume/3), pH*10, T)
R.add_reagent("fermiAcid", ((volume/3)/pH))
//pHmod = 2
if(R.reagent_list)
s.set_up(R, (volume/10), 10, T)
s.start()
if (pH > 10) //if alkaline, small explosion.
var/datum/effect_system/reagents_explosion/e = new()
e.set_up(round((volume/30)*(pH-9)), T, 0, 0)
@@ -86,7 +88,7 @@
CurveSharppH = 2 // How sharp the pH exponential curve is (to the power of value)
ThermicConstant = 5 //Temperature change per 1u produced
HIonRelease = -0.1 //pH change per 1u reaction
RateUpLim = 55 //Optimal/max rate possible if all conditions are perfect (NEEDS TO BE A MULTIPLE OF 10 IF RESULTS IS DOWN BY A FACTOR OF 10)
RateUpLim = 5 //Optimal/max rate possible if all conditions are perfect (NEEDS TO BE A MULTIPLE OF 10 IF RESULTS IS DOWN BY A FACTOR OF 10)
FermiChem = TRUE//If the chemical uses the Fermichem reaction mechanics
FermiExplode = FALSE //If the chemical explodes in a special way
@@ -225,10 +227,10 @@
/datum/chemical_reaction/fermi/enthrall//done
name = "MKUltra"
id = "enthrall"
results = list("enthrall" = 0.3)
required_reagents = list("iron" = 1, "iodine" = 1)
//required_reagents = list("cocoa" = 0.1, "astral" = 0.1, "mindbreaker" = 0.1, "psicodine" = 0.1, "happiness" = 0.1)
required_catalysts = list("blood" = 0.1)
results = list("enthrall" = 0.5)
//required_reagents = list("iron" = 1, "iodine" = 1) Test vars
required_reagents = list("cocoa" = 0.1, "astral" = 0.1, "mindbreaker" = 0.1, "psicodine" = 0.1, "happiness" = 0.1)
required_catalysts = list("blood" = 1)
mix_message = "the reaction gives off a burgundy plume of smoke!"
//FermiChem vars:
OptimalTempMin = 780
@@ -340,7 +342,7 @@
/datum/chemical_reaction/fermi/naninte_b_gone//done test
name = "Naninte bain"
id = "naninte_b_gone"
results = list("naninte_b_gone" = 20)
results = list("naninte_b_gone" = 2)
required_reagents = list("synthflesh" = 5, "uranium" = 5, "iron" = 5, "salglu_solution" = 5)
mix_message = "the reaction gurgles, encapsulating the reagents in flesh before the emp can be set off."
required_temp = 499//To force fermireactions before EMP.
@@ -356,7 +358,7 @@
CurveSharppH = 1
ThermicConstant = 5
HIonRelease = 0.01
RateUpLim = 20
RateUpLim = 2
FermiChem = TRUE
PurityMin = 0.15
@@ -387,6 +389,10 @@
Fa.pH = 3
Fa.data = 3
return
else if (Fa.pH >= 7)
Fa.pH = 7
Fa.data = 7
return
Fa.pH = my_atom.reagents.pH
Fa.data = Fa.pH
@@ -395,7 +401,7 @@
id = "fermiBBuffer"
results = list("fermiBBuffer" = 15)
required_reagents = list("fermiABuffer" = 5, "ethanol" = 5, "salglu_solution" = 1, "water" = 5)
required_catalysts = list("sacid" = 5) //vagely acetic
required_catalysts = list("sacid" = 1) //vagely acetic
//FermiChem vars:
OptimalTempMin = 250
OptimalTempMax = 500
@@ -418,5 +424,8 @@
Fb.pH = 11
Fb.data = 11
return
else if (Fb.pH <= 7)
Fb.pH = 7
Fb.data = 7
Fb.pH = my_atom.reagents.pH
Fb.data = Fb.pH