From 28ffc996f72c4b9a68a07fbdc068df7cd6146233 Mon Sep 17 00:00:00 2001 From: Fermi Date: Fri, 12 Apr 2019 05:10:00 +0100 Subject: [PATCH] Added synthetic-derived growth factor amonst some bugfixes. --- .../chemistry/Fermi_Chemistry_notes.txt | 4 + .../reagents/reagent_containers/glass.dm | 2 +- .../code/datums/mood_events/chem_events.dm | 2 +- .../code/datums/status_effects/chems.dm | 25 ++++++ .../chemistry/reagents/fermi_reagents.dm | 84 +++++++++++++++++-- .../reagents/chemistry/recipes/fermi.dm | 46 ++++++++++ tgstation.dme | 1 + 7 files changed, 153 insertions(+), 11 deletions(-) create mode 100644 modular_citadel/code/datums/status_effects/chems.dm diff --git a/code/modules/reagents/chemistry/Fermi_Chemistry_notes.txt b/code/modules/reagents/chemistry/Fermi_Chemistry_notes.txt index 36b4d169aa..ac40b9ddd9 100644 --- a/code/modules/reagents/chemistry/Fermi_Chemistry_notes.txt +++ b/code/modules/reagents/chemistry/Fermi_Chemistry_notes.txt @@ -3,6 +3,7 @@ Cit/main/Chemistry notes SEE README.MD FOR FUNCTIONS ~Main folder: \ss13\Citadel-Station-13\code\modules\reagents\chemistry~ +~ADD NEW FILES TO tgstation.dme~ ~Recipies: \ss13\Citadel-Station-13\code\modules\reagents\chemistry\recipes~ This contains the reaction recipies and thats it. @@ -49,6 +50,9 @@ How the end state should look:{ Where the actual reaction takes place, main edit location. About half way where I've commented (WHY IS THERE NO LINE NUMBERS?!) +~\ss13\Citadel-Station-13\code/modules/reagents/chemistry/reagents~ +Where what the reactions do, the code that sets what they do. + ~\ss13\Citadel-Station-13\tgui\src\interfaces~ This contains the 4 scripts for generation of the UI for operation of the various chemical equipments. diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index 2dc5059eb2..58085f3497 100644 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -172,7 +172,7 @@ materials = list(MAT_GLASS=2500, MAT_PLASTIC=3000) volume = 150 amount_per_transfer_from_this = 10 - possible_transfer_amounts = list(5,10,15,20,25,30,60,120, 150) + possible_transfer_amounts = list(5,10,15,20,25,30,60,120,150) /obj/item/reagent_containers/glass/beaker/plastic/update_icon() icon_state = "beakerlarge" // hack to lets us reuse the large beaker reagent fill states diff --git a/modular_citadel/code/datums/mood_events/chem_events.dm b/modular_citadel/code/datums/mood_events/chem_events.dm index 6748838f2f..b1280c3559 100644 --- a/modular_citadel/code/datums/mood_events/chem_events.dm +++ b/modular_citadel/code/datums/mood_events/chem_events.dm @@ -1,3 +1,3 @@ /datum/mood_event/eigenstate mood_change = -1 - description = "Where the hell am I? Is this an alternative reality?\n" + description = "Where the hell am I? Is this an alternative dimension ?\n" diff --git a/modular_citadel/code/datums/status_effects/chems.dm b/modular_citadel/code/datums/status_effects/chems.dm new file mode 100644 index 0000000000..8a7222d352 --- /dev/null +++ b/modular_citadel/code/datums/status_effects/chems.dm @@ -0,0 +1,25 @@ +/datum/status_effect/chem/SGDF + id = "SGDF" + var/mob/living/clone + +/datum/status_effect/chem/SGDF/on_apply() + var/typepath = owner.type + clone = new typepath(owner.loc) + var/mob/living/carbon/O = owner + var/mob/living/carbon/C = clone + if(istype(C) && istype(O)) + C.real_name = O.real_name + O.dna.transfer_identity(C) + C.updateappearance(mutcolor_update=1) + return ..() + +/datum/status_effect/chem/SGDF/tick() + if(owner.stat == DEAD) + if(clone && clone.stat != DEAD) + if(owner.mind) + owner.mind.transfer_to(clone) + owner.visible_message("Lucidity shoots to your previously blank mind as your mind suddenly finishes the cloning process. You marvel for a moment at yourself, as your mind subconciously recollects all your memories up until the point when you cloned yourself. curiously, you find that you memories are blank after you ingested the sythetic serum, leaving you to wonder where the other you is.") + clone = null + if(!clone || clone.stat == DEAD) + to_chat(owner, "[linked_extract] desperately tries to move your soul to a living body, but can't find one!") + ..() 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 dcf933c183..269bd86009 100644 --- a/modular_citadel/code/modules/reagents/chemistry/reagents/fermi_reagents.dm +++ b/modular_citadel/code/modules/reagents/chemistry/reagents/fermi_reagents.dm @@ -24,6 +24,7 @@ /obj/item/reagent/fermi/eigenstate/Initialize() //. = ..() Unneeded? var/turf/open/T = get_turf(src)//Sets up coordinate of where it was created + ..() /datum/reagent/fermi/eigenstate/on_mob_life(mob/living/carbon/M) //Teleports to chemistry! if(holder.!has_reagent("eigenstate")) @@ -32,12 +33,14 @@ do_sparks(5,FALSE,src) src.forceMove(T) //Teleports to creation location do_sparks(5,FALSE,src) + ..() /datum/reagent/fermi/eigenstate/on_mob_delete(mob/living/M) //returns back to original location do_sparks(5,FALSE,src) to_chat(M, "You feel your wavefunction collapse!") src.forceMove(T2) //Teleports home do_sparks(5,FALSE,src) + ..() /datum/reagent/fermi/eigenstate/overdose_start(mob/living/M) //Overdose, makes you teleport randomly if(10) @@ -49,6 +52,7 @@ do_teleport(src, get_turf(src), 50, asoundin = 'sound/effects/phasein.ogg') do_sparks(5,FALSE,src) M.reagents.remove_reagent("eigenstate",1)//So you're not stuck for 10 minutes teleporting + ..() //..() //loop function @@ -58,12 +62,14 @@ to_chat(M, "Your wavefunction feels like it's been ripped in half. You feel empty inside.") M.Jitter(10) M.nutrition = M.nutrition - (M.nutrition/10) + ..() /datum/reagent/fermi/eigenstate/addiction_act_stage2(mob/living/M) to_chat(M, "You start to convlse violently as you feel your consciousness split and merge across realities as your possessions fly wildy off your body.") M.Jitter(50) M.AdjustKnockdown(-40, 0) for(var/obj/item/I in mob.get_contents()); do_teleport(I, get_turf(I), 5, no_effects=TRUE); + ..() /datum/reagent/fermi/eigenstate/addiction_act_stage3(mob/living/M)//Pulls multiple copies of the character from alternative realities while teleporting them around! M.Jitter(100) @@ -72,15 +78,19 @@ //Clone function - spawns a clone then deletes it - simulates multiple copies of the player teleporting in if(1) - var/typepath = owner.type - clone = new typepath(owner.loc) - var/mob/living/carbon/O = owner + var/typepath = M.type + clone = new typepath(M.loc) + //var/mob/living/carbon/O = M var/mob/living/carbon/C = clone - if(istype(C) && istype(O)) - C.real_name = O.real_name - O.dna.transfer_identity(C) - C.updateappearance(mutcolor_update=1) - visible_message("[M] collapses in from an alternative reality!") + C.appearance = M.appearance + + //Incase Kevin breaks my code: + //if(istype(C) && istype(O)) + // C.real_name = O.real_name + // O.dna.transfer_identity(C) + // C.updateappearance(mutcolor_update=1) + + visible_message("[M] collapses in from an alternative reality!") if(2) do_teleport(C, get_turf(C), 3, no_effects=TRUE) //teleports clone so it's hard to find the real one! if(3) @@ -89,7 +99,7 @@ .=1 //counter do_teleport(src, get_turf(src), 3, no_effects=TRUE) //Teleports player randomly - //..() //loop function + ..() //loop function /datum/reagent/fermi/eigenstate/addiction_act_stage4(mob/living/M) //Thanks for riding Fermis' wild ride. Mild jitter and player buggery. M.Jitter(50) @@ -97,5 +107,61 @@ to_chat(M, "You feel your eigenstate settle, snapping an alternative version of yourself into reality. All your previous memories are lost and replaced with the alternative version of yourself. This version of you feels more [pick("affectionate", "happy", "lusty", "radical", "shy", "ambitious", "frank", "voracious", "sensible", "witty")] than your pervious self, sent to god knows what universe.") mob.emote("me",1,"gasps and gazes around in a bewildered and highly confused fashion!",TRUE) SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "Alternative dimension", /datum/mood_event/eigenstate) + ..() //eigenstate END + +//Clone serum #chemClone +/datum/reagent/fermi/SGDF/on_mob_life(mob/living/carbon/M) //Clones user, then puts a ghost in them! If that fails, makes a braindead clone. + //Setup clone + + + var/list/candidates = pollCandidatesForMob("Do you want to play as a clone of [M.name] and do you agree to respect their character and act in a similar manner to them? ", ROLE_SENTIENCE, null, ROLE_SENTIENCE, 50, SM, POLL_IGNORE_SENTIENCE_POTION) // see poll_ignore.dm, should allow admins to ban greifers or bullies + if(LAZYLEN(candidates)) + + //var/typepath = owner.type + //clone = new typepath(owner.loc) + var/typepath = M.type + clone = new typepath(M.loc) + //var/mob/living/carbon/O = owner + var/mob/living/carbon/O = M + var/mob/living/carbon/SM = clone + if(istype(SM) && istype(O)) + SM.real_name = O.real_name + O.dna.transfer_identity(SM) + SM.updateappearance(mutcolor_update=1) + + var/mob/dead/observer/C = pick(candidates) + SM.key = C.key + SM.mind.enslave_mind_to_creator(user) + SM.sentience_act() + to_chat(SM, "You feel a strange sensation building in your mind as you realise there's two of you, before you get a chance to think about it, you suddenly split from your old body, and find yourself face to face with yourself, or rather, your original self.") + to_chat(SM, "While you find your newfound existence strange, you share the same memories as [M.real_name]. [pick("However, You find yourself indifferent to the goals you previously had, and take more interest in your newfound independance, but still have an indescribable care for the safety of your original", "Your mind has not deviated from the tasks you set out to do, and now that there's two of you the tasks should be much easier.")]") + to_chat(O, "You feel a strange sensation building in your mind as you realise there's two of you, before you get a chance to think about it, you suddenly split from your old body, and find yourself face to face with yourself.") + visible_message("[O] suddenly shudders, and splits into two identical twins!") + SM.copy_known_languages_from(user, FALSE) + //after_success(user, SM) + //qdel(src) + else + if(20) + O.apply_status_effect(var/datum/status_effect/chem/SGDF) + + ..() + + +//Breast englargement +/datum/reagent/fermi/BElarger + name = "Eigenstasium" + id = "eigenstate" + description = "A volatile collodial mixture derived from milk that encourages mammary production via a potent estrogen mix." + color = "#60A584" // rgb: 96, 0, 255 + overdose_threshold = 12 + +/datum/reagent/fermi/BElarger/overdose_start(mob/living/M) //Turns you into a female if male and ODing + if(M.gender == MALE) + M.gender = FEMALE + M.visible_message("[user] suddenly looks more feminine!", "You suddenly feel more feminine!") + + if(M.gender == FEMALE) + M.gender = FEMALE + M.visible_message("[user] suddenly looks more masculine!", "You suddenly feel more masculine!") diff --git a/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm b/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm index e69de29bb2..fbfb09b355 100644 --- a/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm +++ b/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm @@ -0,0 +1,46 @@ +//TO TWEAK: + +/datum/chemical_reaction/eigenstate + name = "Eigenstasium" + id = "eigenstate" + results = list("eigenstate" = `1`) + required_reagents = list("bluespace" = 1, "stable_plasma" = 1, "sugar" = 1) + //FermiChem vars: + OptimalTempMin = 350 // Lower area of bell curve for determining heat based rate reactions + OptimalTempMax = 500 // Upper end for above + ExplodeTemp = 550 //Temperature at which reaction explodes + OptimalpHMin = 4 // Lowest value of pH determining pH a 1 value for pH based rate reactions (Plateu phase) + OptimalpHMax = 9.5 // 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) + CurveSharp = 4 // How sharp the exponential curve is (to the power of value) + ThermicConstant = -2.5 //Temperature change per 1u produced + HIonRelease = 0.01 //pH change per 1u reaction + RateUpLim = 50 //Optimal/max rate possible if all conditions are perfect + FermiChem = 1 + +//serum +/datum/chemical_reaction/SDGF + name = "synthetic-derived growth factor" + id = "SDGF" + results = list("SDGF" = `3`) + required_reagents = list("stable_plasma" = 5, "slimejelly" = 5, "synthflesh" = 10, "blood" = 10) + +/datum/chemical_reaction/BElarger + name = "" + id = "e" + results = list("Eigenstasium" = `6`) + required_reagents = list("salglu_solution" = 1, "milk" = 5, "synthflesh" = 2, "silicon" = 2, "crocin" = 2) + //FermiChem vars: + OptimalTempMin = 350 // Lower area of bell curve for determining heat based rate reactions + OptimalTempMax = 500 // Upper end for above + ExplodeTemp = 550 //Temperature at which reaction explodes + OptimalpHMin = 4 // Lowest value of pH determining pH a 1 value for pH based rate reactions (Plateu phase) + OptimalpHMax = 9.5 // 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) + CurveSharp = 4 // How sharp the exponential curve is (to the power of value) + ThermicConstant = -2.5 //Temperature change per 1u produced + HIonRelease = 0.01 //pH change per 1u reaction + RateUpLim = 50 //Optimal/max rate possible if all conditions are perfect + FermiChem = 1 diff --git a/tgstation.dme b/tgstation.dme index b14ffbc44c..107d86627a 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -2777,6 +2777,7 @@ #include "modular_citadel\code\datums\mood_events\generic_positive_events.dm" #include "modular_citadel\code\datums\mood_events\moodular.dm" #include "modular_citadel\code\datums\mutations\hulk.dm" +#include "modular_citadel\code\datums\status_effects\chems.dm" #include "modular_citadel\code\datums\status_effects\debuffs.dm" #include "modular_citadel\code\datums\traits\neutral.dm" #include "modular_citadel\code\datums\wires\airlock.dm"