diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm
index 2b3e7e5389..6a946a5f54 100644
--- a/code/modules/reagents/chemistry/holder.dm
+++ b/code/modules/reagents/chemistry/holder.dm
@@ -547,7 +547,7 @@ 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)
+ //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) //
@@ -620,16 +620,19 @@ im
if (chem_temp > C.ExplodeTemp)
//go to explode proc
message_admins("temperature is over limit: [C.ExplodeTemp] Current temperature: [chem_temp]")
- C.FermiExplode(src, (reactedVol+targetVol), chem_temp, pH)
+ C.FermiExplode(src, my_atom, (reactedVol+targetVol), chem_temp, pH)
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]")
+ if ((purity < C.PurityMin) && (!C.PurityMin == 0))//If purity is below the min, blow it up.
+ C.FermiExplode(src, (reactedVol+targetVol), chem_temp, pH, C)
//For now, purity is handled elsewhere
@@ -823,7 +826,7 @@ im
if (D.id == "water") //Do like an otter, add acid to water.
if (pH <= 2)
var/datum/effect_system/smoke_spread/chem/smoke_machine/s = new
- s.set_up(, total_volume, pH*10, src)
+ s.set_up("fermiAcid", total_volume, pH*10, src)
s.start()
remove_any(amount/10)
return
diff --git a/code/modules/reagents/chemistry/recipes.dm b/code/modules/reagents/chemistry/recipes.dm
index 59f4b4576c..c0af043757 100644
--- a/code/modules/reagents/chemistry/recipes.dm
+++ b/code/modules/reagents/chemistry/recipes.dm
@@ -18,7 +18,6 @@
var/mix_sound = 'sound/effects/bubbles.ogg' //The sound played upon mixing, if applicable
//FermiChem!
-
var/OptimalTempMin = 200 // Lower area of bell curve for determining heat based rate reactions
var/OptimalTempMax = 800
var/ExplodeTemp = 900 //If any reaction is this hot, it explodes!
@@ -34,9 +33,7 @@
var/RateUpLim = 10
var/FermiChem = FALSE //If the chemical uses the Fermichem reaction mechanics
var/FermiExplode = FALSE //If the chemical explodes in a special way as a result of
- var/ImpureChem = "toxin" //What chemical is produced with an inpure reaction
- var/InverseChemVal = 0.3
- var/InverseChem = "toxin"
+ var/PurityMin = 0.15 //If purity is below 0.15, it explodes too. Set to 0 to disable this.
/datum/chemical_reaction/proc/on_reaction(datum/reagents/holder, created_volume, specialreact)
diff --git a/code/modules/surgery/organs/lungs.dm b/code/modules/surgery/organs/lungs.dm
index 9ce2d3169d..c402ad5f09 100644
--- a/code/modules/surgery/organs/lungs.dm
+++ b/code/modules/surgery/organs/lungs.dm
@@ -1,3 +1,5 @@
+#define LUNGS_MAX_HEALTH 500
+
/obj/item/organ/lungs
name = "lungs"
icon_state = "lungs"
@@ -55,11 +57,11 @@
var/crit_stabilizing_reagent = "epinephrine"
//health
- var/maxHealth = 500
+ var/maxHealth = LUNGS_MAX_HEALTH
var/damage = 0
//TODO: lung health affects lung function
-/obj/item/organ/lungs/proc/adjustLungLoss(mob/living/carbon/human/M, damage_mod)
+/obj/item/organ/lungs/proc/adjustLungLoss(mob/living/carbon/M, damage_mod)
if (maxHealth == "plasma")
return
if(damage+damage_mod < 0)
@@ -69,7 +71,7 @@
damage += damage_mod
if ((damage / maxHealth) > 1)
to_chat(M, "You feel your lungs collapse within your chest as you gasp for air, unable to inflate them anymore!")
- M.emote("cough")
+ M.emote("gasp")
qdel(src)
else if ((damage / maxHealth) > 0.75)
to_chat(M, "It's getting really hard to breathe!!")
diff --git a/modular_citadel/code/modules/reagents/chemistry/reagents/fermi_reagents.dm b/modular_citadel/code/modules/reagents/chemistry/reagents/fermi_reagents.dm
index 7cd851811b..d03b07b8e1 100644
--- a/modular_citadel/code/modules/reagents/chemistry/reagents/fermi_reagents.dm
+++ b/modular_citadel/code/modules/reagents/chemistry/reagents/fermi_reagents.dm
@@ -16,41 +16,45 @@
var/ImpureChem = "toxin" // What chemical is metabolised with an inpure reaction
var/InverseChemVal = 0 // If the impurity is below 0.5, replace ALL of the chem with InverseChem upon metabolising
var/InverseChem = "Initropidril" // What chem is metabolised when purity is below InverseChemVal, this shouldn't be made, but if it does, well, I guess I'll know about it.
+ var/DoNotSplit = FALSE // If impurity is handled within the main chem itself
///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
//return ..()
-//Called when reaction stops.
+//Called when reaction stops. #STOP_PROCESSING
/datum/reagent/fermi/proc/FermiFinish(holder) //You can get holder by reagents.holder WHY DID I LEARN THIS NOW???
return
-//Called when added to a beaker without the reagent added.
+//Called when added to a beaker without any of the reagent present. #add_reagent
/datum/reagent/fermi/proc/FermiNew(holder) //You can get holder by reagents.holder WHY DID I LEARN THIS NOW???
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)
+ message_admins("purity of chem is [src.purity]")
if(src.purity < 0)
CRASH("Purity below 0 for chem: [src.id], Please let Fermis Know!")
- if (src.purity == 1)
+ if (src.purity == 1 || src.DoNotSplit == TRUE)
return
else if (src.InverseChemVal > src.purity)
- holder.remove_reagent(src.id, volume, FALSE)
- holder.add_reagent(src.InverseChem, volume, FALSE)
+ M.reagents.remove_reagent(src.id, volume, FALSE)
+ M.reagents.add_reagent(src.InverseChem, volume, FALSE)
+ message_admins("all convered to []")
return
else
var/pureVol = volume * purity
var/impureVol = volume * (1 - pureVol)
- holder.remove_reagent(src.id, (volume*impureVol), FALSE)
- holder.add_reagent(src.ImpureChem, impureVol, FALSE)
+ M.reagents.remove_reagent(src.id, (volume*impureVol), FALSE)
+ M.reagents.add_reagent(src.ImpureChem, impureVol, FALSE)
return
+
///datum/reagent/fermi/overdose_start(mob/living/carbon/M)
//current_cycle++
@@ -1023,16 +1027,15 @@ And as stated earlier, this chem is hard to make, and is punishing on failure. Y
description = "A forbidden deep red mixture that overwhelms a foreign body with waves of pleasure, intoxicating them into servitude. When taken by the creator, it will enhance the draw of their voice to those affected by it."
color = "#2C051A" // rgb: , 0, 255
taste_description = "synthetic chocolate, a base tone of alcohol, and high notes of roses"
- //metabolization_rate = 0.5
overdose_threshold = 100 //If this is too easy to get 100u of this, then double it please.
- //addiction_threshold = 30
- //addiction_stage1_end = 9999//Should never end.
+ DoNotSplit = TRUE
var/creatorID //ckey
var/creatorGender
var/creatorName
var/mob/living/creator
-/datum/reagent/fermi/enthrall/FermiFinish()
+
+/datum/reagent/fermi/enthrall/FermiNew()
message_admins("On new 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
@@ -1050,6 +1053,8 @@ And as stated earlier, this chem is hard to make, and is punishing on failure. Y
. = ..()
if(!creatorID)
CRASH("Something went wrong in enthral creation")
+ if(purity < 0.5)//Impure chems don't function as you expect
+ return
else if(M.key == creatorID && creatorName == M.real_name) //same name AND same player - same instance of the player. (should work for clones?)
var/obj/item/organ/vocal_cords/Vc = M.getorganslot(ORGAN_SLOT_VOICE)
var/obj/item/organ/vocal_cords/nVc = new /obj/item/organ/vocal_cords/velvet
@@ -1067,12 +1072,26 @@ And as stated earlier, this chem is hard to make, and is punishing on failure. Y
/datum/reagent/fermi/enthrall/on_mob_life(mob/living/carbon/M)
+ if(purity < 0.5)//Placeholder for now. I'd like to get this done.
+ if (M.key == creatorID && creatorName == M.real_name)//If the creator drinks it, they fall in love randomly. If someone else drinks it, the creator falls in love with them.
+ var/list/seen = viewers(7, get_turf(M))//Sound and sight checkers
+ if(!seen)
+ return
+ M.reagents.remove_reagent(src.id, src.volume)
+ FallInLove(M, seen)
+ return
+ else // If someone else drinks it, the creator falls in love with them!
+ var/mob/living/carbon/C = get_mob_by_key(creatorID)
+ if(C in viewers(7, get_turf(M)))
+ M.reagents.remove_reagent(src.id, src.volume)
+ FallInLove(C, M)
+ return
var/datum/status_effect/chem/enthrall/E = M.has_status_effect(/datum/status_effect/chem/enthrall)
E.enthrallTally += 1
M.adjustBrainLoss(0.1)
..()
-/datum/reagent/fermi/enthrall/overdose_start(mob/living/carbon/M)
+/datum/reagent/fermi/enthrall/overdose_start(mob/living/carbon/M)//I have no idea what happens if you OD yourself honestly.
. = ..()
M.add_trait(TRAIT_PACIFISM, "MKUltra")
var/datum/status_effect/chem/enthrall/E = M.has_status_effect(/datum/status_effect/chem/enthrall)
@@ -1092,6 +1111,18 @@ And as stated earlier, this chem is hard to make, and is punishing on failure. Y
M.adjustBrainLoss(0.2)
..()
+/datum/reagent/fermi/enthrall/proc/FallInLove(mob/living/carbon/Lover, mob/living/carbon/Love)
+ if(Lover.has_status_effect(STATUS_EFFECT_INLOVE))
+ to_chat(Lover, "You are already fully devoted to your love!")
+ return
+ to_chat(Lover, "You develop feelings for [Love], and anyone they like.")
+ if(Lover.mind)
+ Lover.mind.store_memory("You are in love with [Love].")
+ Lover.faction |= "[REF(Love)]"
+ Lover.apply_status_effect(STATUS_EFFECT_INLOVE, Love)
+ forge_valentines_objective(Lover, Love)
+ return
+
//Requires player to be within vicinity of creator
//bonuses to mood
//gives creator a silver(velvet?) tongue
@@ -1116,6 +1147,7 @@ And as stated earlier, this chem is hard to make, and is punishing on failure. Y
taste_description = "like jerky, whiskey and an off aftertaste of a crypt"
overdose_threshold = 100
var/obj/item/clothing/head/hattip/hat
+ DoNotSplit = TRUE
/datum/reagent/fermi/hatmium/on_mob_add(mob/living/carbon/human/M)
@@ -1130,13 +1162,11 @@ And as stated earlier, this chem is hard to make, and is punishing on failure. Y
/datum/reagent/fermi/hatmium/on_mob_life(mob/living/carbon/human/M)
//hat.armor = list("melee" = (1+(current_cycle/20)), "bullet" = (1+(current_cycle/20)), "laser" = (1+(current_cycle/20)), "energy" = (1+(current_cycle/20)), "bomb" = (1+(current_cycle/20)), "bio" = (1+(current_cycle/20)), "rad" = (1+(current_cycle/20)), "fire" = (1+(current_cycle/20)), "acid" = (1+(current_cycle/20)))
- var/hatArmor = (1+(current_cycle/10))
+ var/hatArmor = (1+(current_cycle/10))*purity
if(!overdosed)
- for (var/i in hat.armor)
- hat.armor = list("melee" = hatArmor, "bullet" = hatArmor, "laser" = hatArmor, "energy" = hatArmor, "bomb" = hatArmor, "bio" = hatArmor, "rad" = hatArmor, "fire" = hatArmor)
+ hat.armor = list("melee" = hatArmor, "bullet" = hatArmor, "laser" = hatArmor, "energy" = hatArmor, "bomb" = hatArmor, "bio" = hatArmor, "rad" = hatArmor, "fire" = hatArmor)
else
- for (var/i in hat.armor)
- hat.armor = list("melee" = -hatArmor, "bullet" = -hatArmor, "laser" = -hatArmor, "energy" = -hatArmor, "bomb" = -hatArmor, "bio" = -hatArmor, "rad" = -hatArmor, "fire" = -hatArmor)
+ hat.armor = list("melee" = -hatArmor, "bullet" = -hatArmor, "laser" = -hatArmor, "energy" = -hatArmor, "bomb" = -hatArmor, "bio" = -hatArmor, "rad" = -hatArmor, "fire" = -hatArmor)
..()
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1154,6 +1184,9 @@ And as stated earlier, this chem is hard to make, and is punishing on failure. Y
description = "OwO whats this?"
color = "#H04044" // rgb: , 0, 255
taste_description = "dewicious degenyewacy"
+ InverseChemVal = 0
+ var/obj/item/organ/tongue/nT
+ DoNotSplit = TRUE
/datum/reagent/fermi/furranium/on_mob_life(mob/living/carbon/M)
@@ -1188,38 +1221,78 @@ And as stated earlier, this chem is hard to make, and is punishing on failure. Y
if(prob(20))
var/list/seen = viewers(5, get_turf(M))//Sound and sight checkers
//for(var/victim in seen)
- to_chat(M, "You notice [pick(seen)]'s bulge [pick("OwO!", "uwu!")]")
+ 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..!
..()
///////////////////////////////////////////////////////////////////////////////////////////////
-/* Needs to be fixed, I cannot get it to work and it's giving me compile errors aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+//Needs to be fixed, I cannot get it to work and it's giving me compile errors aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
//Nanite removal
//Writen by Trilby!!
+//Status: Done - needs bug test
/datum/reagent/fermi/naninte_b_gone
name = "Naninte bain"
id = "naninte_b_gone"
description = "A rather simple toxin to small nano machines that will kill them off at a rapid rate well in system."
color = "#5a7267" // rgb: 90, 114, 103
- overdose_threshold = 25
- v/component/nanites/nan
+ overdose_threshold = 15
+ ImpureChem = "naninte_b_goneTox" //If you make an inpure chem, it stalls growth
+ InverseChemVal = 0.25
+ InverseChem = "naninte_b_goneTox" //At really impure vols, it just becomes 100% inverse
/datum/reagent/fermi/naninte_b_gone/on_mob_life(mob/living/carbon/C)
- var/component/nanites/nane = C.GetComponent(/component/nanites)
- if(isnull(nane))
+ //var/component/nanites/N = M.GetComponent(/datum/component/nanites)
+ GET_COMPONENT_FROM(N, /datum/component/nanites, C)
+ if(isnull(N))
return
- nane.regen_rate = -5.0//This seems really high
+ N.regen_rate = -0.25//This seems really high
+ ..()
/datum/reagent/fermi/naninte_b_gone/overdose_start(mob/living/carbon/C)
- var/component/nanites/nane = C.GetComponent(/component/nanites)
- if(isnull(nane))
+ //var/component/nanites/N = M.GetComponent(/datum/component/nanites)
+ GET_COMPONENT_FROM(N, /datum/component/nanites, C)
+ if(isnull(N))
return
- nane.regen_rate = -7.5//12.5 seems crazy high?
-*/
+ N.regen_rate = -1//12.5 seems crazy high?
+ if(prob(20))
+ to_chat(C, "The residual voltage from the nanites causes you to seize up!")
+ C.electrocute_act(10, (get_turf(C)), 1, FALSE, FALSE, FALSE, TRUE)
+ if(prob(10))
+ empulse((get_turf(C)), 3, 2)//So the nanites randomize
+ to_chat(C, "The nanintes short circuit within your system!")
+ ..()
-/*
- _________________________________________
-||Fermichem toxic / impure chems here. ||
-|| ||
-||_______________________________________||
-*/
+//Unobtainable, used if SDGF is impure but not too impure
+/datum/reagent/fermi/naninte_b_goneTox
+ name = "Naninte bain"
+ id = "naninte_b_goneTox"
+ description = "Poorly made, and shocks you!"
+ metabolization_rate = 1
+
+//Increases shock events.
+/datum/reagent/fermi/naninte_b_goneTox/on_mob_life(mob/living/carbon/C)//Damages the taker if their purity is low. Extended use of impure chemicals will make the original die. (thus can't be spammed unless you've very good)
+ if(prob(20))
+ to_chat(C, "The residual voltage in your system causes you to seize up!")
+ C.electrocute_act(10, (get_turf(C)), 1, FALSE, FALSE, FALSE, TRUE)
+ if(prob(10))
+ empulse((get_turf(C)), 2, 1, 1)//So the nanites randomize
+ to_chat(C, "You feel your hair stand on end as you glow brightly for a moment!")
+ ..()
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+
+/datum/reagent/fermi/fermiAcid
+ name = "Acid vapour"
+ 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)
+ var/target = C.get_bodypart(BODY_ZONE_CHEST)
+ if(prob(20))
+ to_chat(C, "You can feel your lungs burning!")
+ C.apply_damage(2, BURN, target)
+ var/obj/item/organ/lungs/L = C.getorganslot(ORGAN_SLOT_LUNGS)
+ L.adjustLungLoss(2)
diff --git a/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm b/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm
index eaac0d6c33..6758c7311a 100644
--- a/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm
+++ b/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm
@@ -4,8 +4,41 @@
/datum/chemical_reaction/fermi/proc/FermiCreate(holder) //You can get holder by reagents.holder WHY DID I LEARN THIS NOW???
return
-//Called for every reaction step
-/datum/chemical_reaction/fermi/proc/FermiExplode(holder) //You can get holder by reagents.holder WHY DID I LEARN THIS NOW???
+//Called when temperature is above a certain threshold
+//....Is this too much?
+/datum/chemical_reaction/fermi/proc/FermiExplode(src, datum/reagents/holder, volume, temp, pH, Reaction) //You can get holder by reagents.holder WHY DID I LEARN THIS NOW???
+ var/Svol = volume
+ var/turf/T = get_turf(holder.my_atom)
+ if(temp>600)//if hot, start a fire
+ switch(temp)
+ if (601 to 800)
+ for(var/turf/turf in range(1,T))
+ new /obj/effect/hotspot(turf)
+ volume /= 3
+ if (801 to 1100)
+ for(var/turf/turf in range(2,T))
+ new /obj/effect/hotspot(turf)
+ volume /= 4
+ if (1101 to INFINITY)
+ for(var/turf/turf in range(3,T))
+ new /obj/effect/hotspot(turf)
+ volume /= 5
+
+ var/datum/effect_system/smoke_spread/chem/smoke_machine/s = new
+ if(pH < 2.5)
+ s.set_up("fermiAcid", (volume/3), pH*10, T)
+ volume /=3
+ for (var/reagent in holder.reagent_list)
+ var/datum/reagent/R = reagent
+ s.set_up(R.id, R.volume/3, pH*10, T)
+ //R.on_reaction(T, volume/10) //Uneeded, I think (hope)
+ s.start()
+
+ if (pH > 12)
+ var/datum/effect_system/reagents_explosion/e = new()
+ e.set_up(round(volume/Svol, 1), T, 0, 0)
+ e.start()
+ message_admins("Fermi explosion at [T], with a temperature of [temp], pH of [pH], containing [holder.reagent_list]")
return
/datum/chemical_reaction/fermi/eigenstate
@@ -30,6 +63,7 @@
FermiChem = TRUE//If the chemical uses the Fermichem reaction mechanics
FermiExplode = FALSE //If the chemical explodes in a special way
+
/datum/chemical_reaction/fermi/eigenstate/FermiCreate(datum/reagents/holder)
var/location = get_turf(holder.my_atom)
var/datum/reagent/fermi/eigenstate/E = locate(/datum/reagent/fermi/eigenstate) in holder.reagent_list
@@ -99,7 +133,6 @@
RateUpLim = 5
FermiChem = TRUE
FermiExplode = FALSE
- ImpureChem = "carpotoxin"
/datum/chemical_reaction/enthral
name = "need a name"