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
+14 -1
View File
@@ -157,7 +157,7 @@
gain_text = "<span class='notice'>You feel HONGRY.</span>"
lose_text = "<span class='danger'>You no longer feel HONGRY.</span>"
/datum/quirk/trandening
/datum/quirk/trandening //What does trandening mean?
name = "High Luminosity Eyes"
desc = "When the next big fancy implant came out you had to buy one on impluse!"
value = 1
@@ -169,3 +169,16 @@
var/obj/item/autosurgeon/gloweyes/gloweyes = new(get_turf(H))
H.equip_to_slot(gloweyes, SLOT_IN_BACKPACK)
H.regenerate_icons()
/datum/quirk/BloodPressure
name = "Synthetic blood"
desc = "You've got a new form of synthetic blood that increases the total blood volume inside of you as well as the rate of replenishment!"
value = 1 //I honeslty dunno if this is a good trait? I just means you use more of medbays blood and make janitors madder, but you also regen blood a lil faster.
mob_trait = TRAIT_HIGH_BLOOD
gain_text = "<span class='notice'>You feel full of blood!</span>"
lose_text = "<span class='notice'>You feel like your blood pressure went down.</span>"
/datum/quirk/BloodPressure/add()
var/mob/living/M = quirk_holder
M.blood_ratio = 1.2
M.blood_volume += 150
+26
View File
@@ -324,3 +324,29 @@
gain_text = "<span class='danger'>There's a lot on your mind right now.</span>"
lose_text = "<span class='notice'>Your mind finally feels calm.</span>"
medical_record_text = "Patient's mind is in a vulnerable state, and cannot recover from traumatic events."
//For reviewers: If you think it's a bad idea, feel free to remove it. I won't be upset :blobcat:
/datum/quirk/Hypno
name = "Hypnotherapy user"
desc = "You had hypnotherapy right before your shift, you're not sure it had any effects, though."
mob_trait = "hypnotherapy"
value = -1 //I mean, it can be a really bad trait to have, but on the other hand, some people want it?
gain_text = "<span class='notice'>You really think the hypnotherapy helped you out.</span>"
//lose_text = "<span class='notice'>You forget about the hypnotherapy you had, or did you even have it?</span>"
/datum/quirk/Hypno/add()
//You caught me, it's not actually based off a trigger, stop spoiling the effect! Code diving ruins the magic!
addtimer(CALLBACK(src, /datum/quirk/Hypno.proc/triggered, quirk_holder), rand(12000, 36000))//increase by 100, it's lower so I can test it.
//DOES NOT give any indication when someone is triggered - this is intentional so people don't abuse it, you're supposed to get a random thing said to you as a mini objective.
/datum/quirk/Hypno/proc/triggered(quirk_holder)//I figured I might as well make a trait of code I added.
var/mob/living/carbon/human/H = quirk_holder
var/list/seen = viewers(8, get_turf(H))
seen -= quirk_holder
if(LAZYLEN(seen) == 0)
to_chat(H, "<span class='notice'><i>That object accidentally sets off your implanted trigger, sending you into a hypnotic daze!</i></span>")
else
to_chat(H, "<span class='notice'><i>[pick(seen)] accidentally sets off your implanted trigger, sending you into a hypnotic daze!</i></span>")
H.apply_status_effect(/datum/status_effect/trance, 200, TRUE)
message_admins("Trance applied")
qdel(src)
@@ -49,11 +49,6 @@
/datum/antagonist/valentine/chem/greet()
to_chat(owner, "<span class='warning'><B>You're in love with [date.name]! Protect [date.p_them()] at all costs. This takes priority over all other loyalties.</B></span>")
/datum/antagonist/valentine/chem/check_completion()
if(date.M.stat != DEAD)
return TRUE
return FALSE
/datum/antagonist/valentine/chem/roundend_report()
var/objectives_complete = TRUE
if(owner.objectives.len)
@@ -63,6 +58,6 @@
break
if(objectives_complete)
return "<span class='love big'>[owner.name] protected [owner.p_their()] love: [date.name]! <i>What a cutie!</i></span>"
return "<span class='greentext big'>[owner.name] protected [owner.p_their()] love: [date.name]! <i>What a cutie!</i></span>"
else
return "<span class='redtext big'>[owner.name] date failed!</span>"
+4 -2
View File
@@ -45,10 +45,12 @@
lover.mind.special_role = "valentine"
if (chemLove == TRUE)
var/datum/antagonist/valentine/chem/V = new //Changes text and EOG check basically.
V.date = date.mind
lover.mind.add_antag_datum(V)
else
var/datum/antagonist/valentine/V = new
V.date = date.mind
lover.mind.add_antag_datum(V) //These really should be teams but i can't be assed to incorporate third wheels right now
V.date = date.mind
lover.mind.add_antag_datum(V) //These really should be teams but i can't be assed to incorporate third wheels right now
/datum/round_event/valentines/announce(fake)
priority_announce("It's Valentine's Day! Give a valentine to that special someone!")
@@ -308,53 +308,63 @@
gold_core_spawnable = NO_SPAWN
health = 50 //So people can't instakill it
maxHealth = 50
speak = list("Meowrowr!", "Mew!", "Miauen!")
speak_emote = list("wigglepurrs", "mewls")
emote_hear = list("meows.", "mews.")
emote_see = list("looks at you eagerly for pets!", "wiggles enthusiastically.")
gold_core_spawnable = NO_SPAWN
//secretcatchemcode, shh!! Of couse I hide it amongst cats. Also, yes, I expect you, Mr.Maintaner to read and review this, dispite it being hidden and not mentioned in the changelogs.
//I'm not trying to be sneaky, I'm trying to keep it a secret!
//I don't know how to do hidden chems like Aurora
//ChemReactionVars:
/datum/chemical_reaction/fermi/secretcatchem //DONE
name = "secretcatchem"
id = "secretcatchem"
results = list("secretcatchem" = 2)
required_reagents = list("stable_plasma" = 0.5, "sugar" = 0.5, "cream" = 0.5, "blood" = 0.5)
results = list("secretcatchem" = 0.5)
required_reagents = list("stable_plasma" = 0.1, "sugar" = 0.1, "cream" = 0.1, "blood" = 0.1, "slimejelly" = 0.1)
required_catalysts = list("felinidmutationtoxin" = 5)
required_temp = 600
mix_message = "the reaction gives off a meow!"
mix_sound = "modular_citadel/sound/voice/merowr.ogg"
//FermiChem vars:
OptimalTempMin = 700 // Lower area of bell curve for determining heat based rate reactions
OptimalTempMax = 800 // Upper end for above
ExplodeTemp = 900 // Temperature at which reaction explodes
OptimalpHMin = 6 // Lowest value of pH determining pH a 1 value for pH based rate reactions (Plateu phase)
OptimalpHMax = 8 // Higest value for above
ReactpHLim = 2 // How far out pH wil react, giving impurity place (Exponential phase)
CatalystFact = 0 // How much the catalyst affects the reaction (0 = no catalyst)
CurveSharpT = 0 // How sharp the temperature exponential curve is (to the power of value)
CurveSharppH = 0 // How sharp the pH exponential curve is (to the power of value)
ThermicConstant = 0 // Temperature change per 1u produced
HIonRelease = 0 // pH change per 1u reaction (inverse for some reason)
RateUpLim = 0.1 // Optimal/max rate possible if all conditions are perfect
FermiChem = TRUE // If the chemical uses the Fermichem reaction mechanics
FermiExplode = FALSE // If the chemical explodes in a special way
OptimalTempMin = 650
//OptimalTempMax = 800
//ExplodeTemp = 900
OptimalpHMin = 0
//OptimalpHMax = 8
ReactpHLim = 2
//CatalystFact = 0
CurveSharpT = 0
CurveSharppH = 0
ThermicConstant = 0
HIonRelease = 0
RateUpLim = 0.1
FermiChem = TRUE
FermiExplode = FALSE
PurityMin = 0.2
/datum/chemical_reaction/fermi/secretcatchem/Initialize()
message_admins("randomizing reaction")
/datum/chemical_reaction/fermi/secretcatchem/New()
//rand doesn't seem to work with n^-e
//message_admins("randomizing reaction")
OptimalTempMin += rand(-100, 100)
OptimalTempMax += rand(-100, 100)
ExplodeTemp += rand(-100, 100)
OptimalpHMin += rand(-1, 1)
OptimalpHMax += rand(-1, 1)
OptimalTempMax += (OptimalpHMin+rand(0, 200))
ExplodeTemp += (OptimalpHMax+rand(0, 200))
OptimalpHMin += rand(1, 10)
OptimalpHMax += (OptimalpHMin + rand(0, 5))
ReactpHLim += rand(-2, 2)
CurveSharpT += rand(0.01, 5)
CurveSharppH += rand(0.01, 5)
CurveSharpT += (rand(1, 500)/100)
CurveSharppH += (rand(1, 500)/100)
ThermicConstant += rand(-50, 50)
HIonRelease += rand(-0.25, 0.25)
RateUpLim += rand(0, 100)
PurityMin += rand(-0.1, 0.1)
HIonRelease += (rand(-25, 25)/100)
RateUpLim += (rand(1, 1000)/10)
PurityMin += (rand(-1, 1)/10)
var/additions = list("aluminum", "silver", "gold", "plasma", "silicon", "bluespace")
var/chosenA = pick(additions)
required_reagents[chosenA] = rand(0.1, 1)
//var/chosenA = pick(additions)
required_reagents += list("[pick(additions)]", rand(0.1, 1))
/datum/chemical_reaction/fermi/secretcatchem/FermiFinish(datum/reagents/holder, var/atom/my_atom)//Strange how this doesn't work but the other does.
message_admins("Someone found the hidden reaction. Amazing!! Please tell Fermi!!")
message_admins("Someone found the hidden reaction. Amazing!! Please tell Fermis!!")
//ReagentVars
//Turns you into a cute catto while it's in your system.
@@ -366,8 +376,7 @@
taste_description = "hairballs and cream"
color = "#ffc224"
var/catshift = FALSE
var/mob/living/simple_animal/pet/cat/custom_cat/catto
//var/mob/living/carbon/human/origin maybe unneeded
var/mob/living/simple_animal/pet/cat/custom_cat/catto = null
/datum/reagent/fermi/secretcatchem/New()
name = "Catgirli[pick("a","u","e","y")]m [pick("apex", "prime", "meow")]"
@@ -377,28 +386,53 @@
//origin = H
var/current_species = H.dna.species.type
var/datum/species/mutation = /datum/species/human/felinid
if((mutation && mutation != current_species) && (purity > 0.9))//ONLY if purity is 1, and given the stuff is random. It's basically impossible to get this to 1.
if((mutation != current_species) && (purity >= 0.8))//ONLY if purity is high, and given the stuff is random. It's basically impossible to get this to 1.
H.set_species(mutation)
H.gender = FEMALE
//exception(al) handler, I said cat tail damnit!
H.dna.features["mam_tail"] = "Cat"
H.dna.features["tail_human"] = "Cat"
H.dna.features["ears"] = "Cat"
H.dna.features["mam_ears"] = "Cat"
H.dna.features["tail_lizard"] = "Cat"
H.dna.features["mam_tail"] = "Cat"
H.dna.features["mam_tail_animated"] = "Cat"
H.facial_hair_style = "Shaved"
H.verb_say = "mewls"
catshift = TRUE
playsound(get_turf(H), 'modular_citadel/sound/voice/merowr.ogg', 50, 1, -1)
to_chat(H, "<span class='notice'>You suddenly turn into a cat!</span>")
catto = new(get_turf(H.loc))
H.mind.transfer_to(catto)
H.moveToNullspace()
catto.name = M.name
catto.desc = "A cute catto! They remind you of [M] somehow."
catto.color = "#[dna.features["mcolor"]]"
catto.name = H.name
catto.desc = "A cute catto! They remind you of [H] somehow."
catto.color = "#[H.dna.features["mcolor"]]"
//H.moveToNullspace() classic breaking Japes
H.forceMove(locate(10,6,1))//To the zelda room.
/datum/reagent/fermi/secretcatchem/on_mob_life(mob/living/carbon/human/H)
/datum/reagent/fermi/secretcatchem/on_mob_life(mob/living/carbon/H)
if(prob(5))
playsound(get_turf(catto), 'modular_citadel/sound/voice/merowr.ogg', 50, 1, -1)
catto.emote("me","lets out a meowrowr!")
catto.say("lets out a meowrowr!*")
..()
/datum/reagent/fermi/secretcatchem/on_mob_add(mob/living/carbon/human/H)
var/words = "<span class='notice'>Your body shifts back to normal."
/datum/reagent/fermi/secretcatchem/on_mob_delete(mob/living/carbon/H)
var/words = "Your body shifts back to normal."
do_teleport(H, catto.loc)
catto.mind.transfer_to(H)
if(catshift == TRUE)
words += " ...But wait, are those ears and a tail?")
to_chat(H, "[words]</span>")
H.doMove(catto)
catto.mind.transfer_to(M)
words += " ...But wait, are those ears and a tail?"
H.say("*wag")//force update sprites.
to_chat(H, "<span class='notice'>[words]</span>")
qdel(catto)
/datum/chemical_reaction/fermi/secretcatchem/FermiExplode(datum/reagents, var/atom/my_atom, volume, temp, pH)
var/mob/living/simple_animal/pet/cat/custom_cat/catto = new(get_turf(my_atom))
var/list/seen = viewers(8, get_turf(my_atom))
for(var/mob/M in seen)
to_chat(M, "<span class='warning'>The reaction suddenly gives out a meow, condensing into a chemcat!</b></span>")//meow!
playsound(get_turf(my_atom), 'modular_citadel/sound/voice/merowr.ogg', 50, 1, -1)
catto.name = "FermiCat"
catto.desc = "A cute Fermichem cat, created by a lot of compicated and confusing chemistry!"
catto.color = "#770000"
my_atom.reagents.remove_reagent("secretcatchem", 10)
+33 -75
View File
@@ -345,7 +345,7 @@ im
//beaker check proc,
/datum/reagents/proc/beaker_check(atom/A)
if(istype(A, /obj/item/reagent_containers/glass/beaker/meta))
if(istype(A, /obj/item/reagent_containers/glass/beaker/meta) || istype(A, /obj/item/reagent_containers/glass/bottle)) //prevent bottles from being dispenced and melting.
return
if(istype(A, /obj/item/reagent_containers/glass/beaker/plastic))//reaclly weird how this runtimes but the previous doesn't
if(chem_temp > 444)//assuming polypropylene
@@ -361,7 +361,6 @@ im
var/list/seen = viewers(5, get_turf(A))
var/iconhtml = icon2html(A, seen)
for(var/mob/M in seen)
message_admins("pH at melting: [pH]")
to_chat(M, "<span class='notice'>[iconhtml] \The [my_atom]'s melts from the extreme pH!</span>")
playsound(get_turf(A), 'sound/FermiChem/acidmelt.ogg', 80, 1)
qdel(A)
@@ -442,15 +441,6 @@ im
if(!C.required_other)
matching_other = 1
//FermiChem
/*
if (chem_temp > C.ExplodeTemp)//Check to see if reaction is too hot!
if (C.FermiExplode == TRUE)
//To be added!
TODO: make plastic beakers melt at 447 kalvin, all others at ~850 and meta-material never break.
*/
if(required_temp == 0 || (is_cold_recipe && chem_temp <= required_temp) || (!is_cold_recipe && chem_temp >= required_temp))//Temperature check!!
meets_temp_requirement = 1//binary pass
@@ -484,30 +474,25 @@ im
var/datum/chemical_reaction/C = selected_reaction
if (C.FermiChem == TRUE && !continue_reacting)
message_admins("FermiChem Proc'd")
for(var/B in cached_required_reagents)
multiplier = min(multiplier, round((get_reagent_amount(B) / cached_required_reagents[B]), 0.01))
for(var/P in selected_reaction.results)
targetVol = cached_results[P]*multiplier
//message_admins("FermiChem target volume: [targetVol]")
if( (chem_temp <= C.ExplodeTemp) && (chem_temp >= C.OptimalTempMin))
if( (pH >= (C.OptimalpHMin - C.ReactpHLim)) && (pH <= (C.OptimalpHMax + C.ReactpHLim)) )//To prevent pointless reactions
//if (reactedVol < targetVol)
if (fermiIsReacting == TRUE)
return 0
else
//reactedVol = FermiReact(selected_reaction, chem_temp, pH, multiplier, reactedVol, targetVol, cached_required_reagents, cached_results)
//selected_reaction.on_reaction(src, my_atom, multiplier)
START_PROCESSING(SSprocessing, src)
//message_admins("FermiChem processing started")
selected_reaction.on_reaction(src, my_atom, multiplier)
fermiIsReacting = TRUE
fermiReactID = selected_reaction
reaction_occurred = 1
if (chem_temp > C.ExplodeTemp)
var/datum/chemical_reaction/fermi/Ferm = selected_reaction
fermiIsReacting = FALSE
Ferm.FermiExplode(src, my_atom, volume = total_volume, temp = chem_temp, pH = pH)
return 0
else
@@ -564,24 +549,17 @@ im
var/list/cached_required_reagents = C.required_reagents//update reagents list
var/list/cached_results = C.results//resultant chemical list
var/multiplier = INFINITY
//var/special_react_result = C.check_special_react(src) Only add if I add in the fermi-izer chem
//message_admins("updating targetVol from [targetVol]")
for(var/B in cached_required_reagents) //
multiplier = min(multiplier, round((get_reagent_amount(B) / cached_required_reagents[B]), 0.01))
message_admins("Multi:[multiplier],( reag ammount:[get_reagent_amount(B)] / req reag:[cached_required_reagents[B]]")
//multiplier*=10
if (multiplier == 0)
STOP_PROCESSING(SSprocessing, src)
fermiIsReacting = FALSE
//message_admins("FermiChem STOPPED due to reactant removal! Reacted vol: [reactedVol] of [targetVol]")
reactedVol = 0
targetVol = 0
C.FermiFinish(src, my_atom, multiplier)
handle_reactions()
update_total()
//var/datum/reagent/fermi/Ferm = GLOB.chemical_reagents_list[C.id]
C.FermiFinish(src, my_atom, multiplier)
//C.on_reaction(src, multiplier, special_react_result)
//Reaction sounds and words
playsound(get_turf(my_atom), C.mix_sound, 80, 1)
var/list/seen = viewers(5, get_turf(my_atom))//Sound and sight checkers
@@ -592,27 +570,21 @@ im
for(var/P in cached_results)
targetVol = cached_results[P]*multiplier
//message_admins("to [targetVol]")
if (fermiIsReacting == FALSE)
//message_admins("THIS SHOULD NEVER APPEAR!")
CRASH("Fermi has refused to stop reacting even though we asked her nicely.")
if (chem_temp > C.OptimalTempMin && fermiIsReacting == TRUE)//To prevent pointless reactions
if (reactedVol < targetVol)
reactedVol = FermiReact(fermiReactID, chem_temp, pH, reactedVol, targetVol, cached_required_reagents, cached_results, multiplier)
//message_admins("FermiChem tick activated started, Reacted vol: [reactedVol] of [targetVol]")
else
STOP_PROCESSING(SSprocessing, src)
fermiIsReacting = FALSE
//message_admins("FermiChem STOPPED due to volume reached! Reacted vol: [reactedVol] of [targetVol]")
reactedVol = 0
targetVol = 0
C.FermiFinish(src, my_atom, multiplier)
handle_reactions()
update_total()
//var/datum/reagent/fermi/Ferm = GLOB.chemical_reagents_list[C.id]
C.FermiFinish(src, my_atom, multiplier)
//C.on_reaction(src, multiplier, special_react_result)
//Reaction sounds and words
playsound(get_turf(my_atom), C.mix_sound, 80, 1)
var/list/seen = viewers(5, get_turf(my_atom))//Sound and sight checkers
@@ -622,15 +594,12 @@ im
return
else
STOP_PROCESSING(SSprocessing, src)
//message_admins("FermiChem STOPPED due to temperature! Reacted vol: [reactedVol] of [targetVol]")
fermiIsReacting = FALSE
reactedVol = 0
targetVol = 0
C.FermiFinish(src, my_atom, multiplier)
handle_reactions()
update_total()
//var/datum/reagent/fermi/Ferm = GLOB.chemical_reagents_list[C.id]
C.FermiFinish(src, my_atom, multiplier)
//C.on_reaction(src, multiplier, special_react_result)
//Reaction sounds and words
playsound(get_turf(my_atom), C.mix_sound, 80, 1)
var/list/seen = viewers(5, get_turf(my_atom))//Sound and sight checkers
@@ -646,36 +615,29 @@ im
var/deltaT = 0
var/deltapH = 0
var/stepChemAmmount = 0
//var/ammoReacted = 0
//get purity from combined beaker reactant purities HERE.
var/purity = 1
//var/tempVol = totalVol
message_admins("multiplier [multiplier], target vol:[targetVol], rate lim: [C.RateUpLim], reactedVol: [reactedVol]")
//Begin Parse
//WARNING("Purity precalc: [overallPurity]")
//update_holder_purity(C)//updates holder's purity
//WARNING("Purity postcalc: [overallPurity]")
//Check extremes first
if (cached_temp > C.ExplodeTemp)
//go to explode proc
//message_admins("temperature is over limit: [C.ExplodeTemp] Current temperature: [cached_temp]")
fermiIsReacting = FALSE
C.FermiExplode(src, my_atom, (reactedVol+targetVol), cached_temp, pH)
STOP_PROCESSING(SSprocessing, src)
return
//Make sure things are limited.
if (pH > 14)
pH = 14
//message_admins("pH is lover limit, cur pH: [pH]")
else if (pH < 0)
pH = 0
//Create chemical sludge eventually(for now just destroy the beaker I guess?)
//TODO Strong acids eat glass, make it so you NEED plastic beakers for superacids(for some reactions)
//message_admins("pH is lover limit, cur pH: [pH]")
//For now, purity is handled elsewhere
//Calculate DeltapH (Deviation of pH from optimal)
//Lower range
if (pH < C.OptimalpHMin)
@@ -692,14 +654,12 @@ im
else
deltapH = (((- pH + (C.OptimalpHMax + C.ReactpHLim))**C.CurveSharppH)/(C.ReactpHLim**C.CurveSharppH))//Reverse - to + to prevent math operation failures.
//Within mid range
if (pH >= C.OptimalpHMin && pH <= C.OptimalpHMax)
else if (pH >= C.OptimalpHMin && pH <= C.OptimalpHMax)
deltapH = 1
//This should never proc:
else
message_admins("Fermichem's pH broke!! Please let Fermis know!!")
WARNING("[my_atom] attempted to determine FermiChem pH for '[C.id]' which broke for some reason! ([usr])")
//TODO Add CatalystFact
//message_admins("calculating pH factor(purity), pH: [pH], min: [C.OptimalpHMin]-[C.ReactpHLim], max: [C.OptimalpHMax]+[C.ReactpHLim], deltapH: [deltapH]")
//TODO Add CatalystFact - though, might be pointless.
//Calculate DeltaT (Deviation of T from optimal)
if (cached_temp < C.OptimalTempMax && cached_temp >= C.OptimalTempMin)
@@ -708,54 +668,51 @@ im
deltaT = 1
else
deltaT = 0
//message_admins("calculating temperature factor, min: [C.OptimalTempMin], max: [C.OptimalTempMax], Exponential: [C.CurveSharpT], deltaT: [deltaT]")
stepChemAmmount = CLAMP((deltaT * C.RateUpLim), 0, (targetVol - reactedVol)) //used to have multipler, now it doesn't
if (stepChemAmmount > C.RateUpLim)
/*
stepChemAmmount = CLAMP(((deltaT * cached_results[P]) * multipler), 0, (targetVol - reactedVol)) //used to have multipler, now it does
if (stepChemAmmount * cached_results[P] > C.RateUpLim)
stepChemAmmount = C.RateUpLim
else if (stepChemAmmount <= 0.01)
//message_admins("stepChem underflow [stepChemAmmount]")
stepChemAmmount = 0.01
*/
if ((reactedVol + stepChemAmmount) > targetVol)
stepChemAmmount = targetVol - reactedVol
//message_admins("target volume reached. Reaction should stop after this loop. stepChemAmmount: [stepChemAmmount] + reactedVol: [reactedVol] = targetVol [targetVol]")
//if (reactedVol > 0)
// purity = ((purity * reactedVol) + (deltapH * stepChemAmmount)) /((reactedVol+ stepChemAmmount)) //This should add the purity to the product
//else
purity = (deltapH)//set purity equal to pH offset
//TODO: Check overall beaker purity with proc
//Then adjust purity of result AND yeild ammount with said purity.
//Then adjust purity of result with reagent purity.
purity *= reactant_purity(C)
// End.
/*
*/
//message_admins("cached_results: [cached_results], reactedVol: [reactedVol], stepChemAmmount [stepChemAmmount]")
for(var/B in cached_required_reagents)
//message_admins("cached_required_reagents(B): [cached_required_reagents[B]], reactedVol: [reactedVol], base stepChemAmmount [stepChemAmmount]")
remove_reagent(B, (stepChemAmmount * cached_required_reagents[B]), safety = 1)//safety? removes reagents from beaker using remove function.
var/TotalStep = 0
for(var/P in cached_results)//Not sure how this works, what is selected_reaction.results?
//reactedVol = max(reactedVol, 1) //this shouldnt happen ...
stepChemAmmount = CLAMP(((deltaT * cached_results[P]) * multiplier), 0, (targetVol - reactedVol)) //used to have multipler, now it does
if (stepChemAmmount * cached_results[P] > C.RateUpLim)
stepChemAmmount = C.RateUpLim
else if (stepChemAmmount <= 0.01)
stepChemAmmount = 0.01
SSblackbox.record_feedback("tally", "chemical_reaction", cached_results[P]*stepChemAmmount, P)//log
add_reagent(P, cached_results[P]*(stepChemAmmount), null, cached_temp, purity)//add reagent function!! I THINK I can do this:
add_reagent(P, (stepChemAmmount), null, cached_temp, purity)//add reagent function!! I THINK I can do this:
TotalStep += stepChemAmmount//for multiple products
//Above should reduce yeild based on holder purity.
//Purity Check
//NOT MULTIPROD SAFE. TODO: Add multiproduct support
for(var/datum/reagent/R in my_atom.reagents.reagent_list)
if(P == R.id)
if (R.purity < C.PurityMin)//If purity is below the min, blow it up.
fermiIsReacting = FALSE
C.FermiExplode(src, my_atom, (reactedVol+targetVol), cached_temp, pH)
return
return 0
C.FermiCreate(src)//proc that calls when step is done
//Apply pH changes and thermal output of reaction to beaker
chem_temp = round(cached_temp + (C.ThermicConstant * stepChemAmmount)) //Why won't you update!!!
pH += (C.HIonRelease * stepChemAmmount)
chem_temp = round(cached_temp + (C.ThermicConstant * stepChemAmmount)) //Why won't you update!!! Because I'm silly.
pH += (C.HIonRelease * stepChemAmmount)//honestly pH shifting is so confusing
//keep track of the current reacted amount
reactedVol = reactedVol + stepChemAmmount
//return said amount to compare for next step.
@@ -814,6 +771,7 @@ im
for(var/reagent in cached_reagents)
var/datum/reagent/R = reagent
del_reagent(R.id)
pH = REAGENT_NORMAL_PH
return 0
/datum/reagents/proc/reaction(atom/A, method = TOUCH, volume_modifier = 1, show_message = 1)
@@ -15,10 +15,10 @@
var/die_with_shapeshifted_form = TRUE
var/convert_damage = FALSE //If you want to convert the caster's health to the shift, and vice versa.
var/convert_damage_type = BRUTE //Since simplemobs don't have advanced damagetypes, what to convert damage back into.
//TODO: Remember to remove this before making final commit and make a new request for this. But until then, I'm gonna be a catto wizard!
var/shapeshift_type //Incase I ever get lucky enough to be a wizard. Also why can you be a dog but not a cat!! I know this isn't fermichem related, but this is really important!!!
var/list/possible_shapes = list(/mob/living/simple_animal/mouse,\
/mob/living/simple_animal/pet/cat,\ //TODO: Remember to remove this before making final commit and make a new request for this. But until then, I'm gonna be a catto wizard!
/mob/living/simple_animal/pet/cat,\
/mob/living/simple_animal/pet/dog/corgi,\
/mob/living/simple_animal/hostile/carp/ranged/chaos,\
/mob/living/simple_animal/bot/ed209,\
+7 -4
View File
@@ -809,7 +809,7 @@
var/static/regex/statecustom_words = regex("state triggers|state your triggers")
var/static/regex/custom_words = regex("new trigger|listen to me")
var/static/regex/custom_words_words = regex("speak|echo|shock|cum|kneel|strip|trance")//What a descriptive name!
var/static/regex/recognise_words = regex("recognise me|i'm back|did you miss me?")
var/static/regex/recognise_words = regex("recognise me|did you miss me?")
var/static/regex/objective_words = regex("new objective|obey this command|unable to resist|compulsed")
var/static/regex/heal_words = regex("live|heal|survive|mend|life|pets never die")
var/static/regex/stun_words = regex("stop|wait|stand still|hold on|halt")
@@ -951,6 +951,8 @@
var/mob/living/L = V
var/datum/status_effect/chem/enthrall/E = L.has_status_effect(/datum/status_effect/chem/enthrall)
E.status = "Antiresist"
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "<span class='warning'>I've let [E.enthrallGender] down...</b></span>"), 5)
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "<span class='big warning'>Your mind clouds over, as you find yourself unable to resist!</b></span>"), 5)
E.statusStrength = (1 * power_multiplier * E.phase)
E.cooldown += 15//Too short? yes, made 15
@@ -1105,6 +1107,7 @@
//tier3
//STATE TRIGGERS
//Doesn't work, Maintaners, help.
else if((findtext(message, statecustom_words)))//doesn't work
for(var/V in listeners)
var/speaktrigger = ""
@@ -1113,9 +1116,9 @@
if (E.phase > 2)
for (var/trigger in E.customTriggers)
speaktrigger += "[trigger], "
C.add_trait(TRAIT_DEAF, "Triggers") //So you don't trigger yourself!
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, C, /atom/movable/proc/say, "[speaktrigger]"), 5)
C.remove_trait(TRAIT_DEAF, "Triggers")
C.add_trait(TRAIT_DEAF, "Triggers") //So you don't trigger yourself!
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, C, /atom/movable/proc/say, "[speaktrigger]"), 5)
C.remove_trait(TRAIT_DEAF, "Triggers")
//CUSTOM TRIGGERS