From 4967bd21c3c379d3583659ae58a233c66aedd069 Mon Sep 17 00:00:00 2001 From: Nemanja <98561806+EmoGarbage404@users.noreply.github.com> Date: Sat, 16 Dec 2023 03:26:11 -0500 Subject: [PATCH] Add electrolysis/centrifuge breakdown recipes (#22571) * first pass * chemical breakdowns !!!! * mintemp salt because why not * we don't really need this, no? * if at first we don't succeed... * ...then run debug tests again --- .../SharedSolutionContainerMixerSystem.cs | 3 +- .../Locale/en-US/reagents/meta/chemicals.ftl | 6 +-- Resources/Locale/en-US/reagents/meta/fun.ftl | 10 ++-- .../Recipes/Reactions/biological.yml | 50 +++++++++++++++++++ .../Recipes/Reactions/chemicals.yml | 25 ++++++++++ .../Prototypes/Recipes/Reactions/drinks.yml | 23 +++++++++ .../Prototypes/Recipes/Reactions/food.yml | 22 ++++++++ .../Prototypes/Recipes/Reactions/fun.yml | 14 ++++++ .../Prototypes/Recipes/Reactions/gas.yml | 21 ++++++++ .../Prototypes/Recipes/Reactions/medicine.yml | 2 +- .../Recipes/Reactions/pyrotechnic.yml | 12 +++++ 11 files changed, 177 insertions(+), 11 deletions(-) create mode 100644 Resources/Prototypes/Recipes/Reactions/biological.yml create mode 100644 Resources/Prototypes/Recipes/Reactions/gas.yml diff --git a/Content.Shared/Chemistry/EntitySystems/SharedSolutionContainerMixerSystem.cs b/Content.Shared/Chemistry/EntitySystems/SharedSolutionContainerMixerSystem.cs index ab92425608..14c4560dd8 100644 --- a/Content.Shared/Chemistry/EntitySystems/SharedSolutionContainerMixerSystem.cs +++ b/Content.Shared/Chemistry/EntitySystems/SharedSolutionContainerMixerSystem.cs @@ -18,7 +18,6 @@ public abstract class SharedSolutionContainerMixerSystem : EntitySystem [Dependency] private readonly INetManager _net = default!; [Dependency] private readonly SharedAppearanceSystem _appearance = default!; [Dependency] private readonly SharedAudioSystem _audio = default!; - [Dependency] private readonly ChemicalReactionSystem _chemicalReaction = default!; [Dependency] private readonly SharedContainerSystem _container = default!; [Dependency] private readonly SharedPopupSystem _popup = default!; [Dependency] private readonly SolutionContainerSystem _solution = default!; @@ -102,7 +101,7 @@ public abstract class SharedSolutionContainerMixerSystem : EntitySystem if (!_solution.TryGetFitsInDispenser(ent, out var solution)) continue; - _chemicalReaction.FullyReactSolution(solution, ent, solution.MaxVolume, reactionMixer); + _solution.UpdateChemicals(ent, solution, true, reactionMixer); } } diff --git a/Resources/Locale/en-US/reagents/meta/chemicals.ftl b/Resources/Locale/en-US/reagents/meta/chemicals.ftl index 827d0fd6d5..17866c7641 100644 --- a/Resources/Locale/en-US/reagents/meta/chemicals.ftl +++ b/Resources/Locale/en-US/reagents/meta/chemicals.ftl @@ -4,14 +4,14 @@ reagent-desc-acetone = A slick, slightly carcinogenic liquid. Has a multitude of reagent-name-phenol = phenol reagent-desc-phenol = An aromatic ring of carbon with a hydroxyl group. A useful precursor to some medicines, but has no healing properties on its own. -reagent-name-sodium-carbonate = Sodium Carbonate +reagent-name-sodium-carbonate = sodium carbonate reagent-desc-sodium-carbonate = A white, odorless, water-soluble salt that yields an alkaline solution in water. Also known as soda ash. reagent-name-artifexium = artifexium reagent-desc-artifexium = A lavender mixture of microscopic artifact fragments and a strong acid. It has the ability to activate artifacts. -reagent-name-sodium-polyacrylate = Sodium Polyacrylate +reagent-name-sodium-polyacrylate = sodium polyacrylate reagent-desc-sodium-polyacrylate = A super-absorbent polymer with assorted industrial uses. reagent-name-cellulose = cellulose fibers -reagent-desc-cellulose = A crystaline polydextrose polymer, plants swear by this stuff. \ No newline at end of file +reagent-desc-cellulose = A crystaline polydextrose polymer, plants swear by this stuff. diff --git a/Resources/Locale/en-US/reagents/meta/fun.ftl b/Resources/Locale/en-US/reagents/meta/fun.ftl index 83f99deceb..c52960ee4a 100644 --- a/Resources/Locale/en-US/reagents/meta/fun.ftl +++ b/Resources/Locale/en-US/reagents/meta/fun.ftl @@ -4,17 +4,17 @@ reagent-desc-carpetium = A mystical chemical, usually outsourced from the Clown reagent-name-fiber = fiber reagent-desc-fiber = A raw material, usually extracted from wool or other fabric products. -reagent-name-buzzochloric-bees = Buzzochloric Bees +reagent-name-buzzochloric-bees = buzzochloric bees reagent-desc-buzzochloric-bees = Liquid bees. Oh god it's LIQUID BEES NO- -reagent-name-ground-bee = Ground Bee +reagent-name-ground-bee = ground Bee reagent-desc-ground-bee = Bee grounds. Gross. -reagent-name-saxoite = Saxoite +reagent-name-saxoite = saxoite reagent-desc-saxoite = Smells like jazz. -reagent-name-licoxide = Licoxide +reagent-name-licoxide = licoxide reagent-desc-licoxide = A synthetic battery acid. It looks... electrifying. -reagent-name-razorium = Razorium +reagent-name-razorium = razorium reagent-desc-razorium = A strange, non-newtonian chemical. It is produced when two conflicting brute medications are combined. When force is applied to it, it temporarily hardens creating millions of tiny, sharp edges. Very painful. diff --git a/Resources/Prototypes/Recipes/Reactions/biological.yml b/Resources/Prototypes/Recipes/Reactions/biological.yml new file mode 100644 index 0000000000..b126a23abe --- /dev/null +++ b/Resources/Prototypes/Recipes/Reactions/biological.yml @@ -0,0 +1,50 @@ +- type: reaction + id: BloodBreakdown + requiredMixerCategories: + - Centrifuge + reactants: + Blood: + amount: 20 + products: + Water: 11 + Iron: 0.5 + Sugar: 2 + CarbonDioxide: 3 + Protein: 4 + +- type: reaction + id: SlimeBloodBreakdown + requiredMixerCategories: + - Centrifuge + reactants: + Slime: + amount: 5 + products: + Water: 4 + Nitrogen: 1 + +- type: reaction + id: CopperBloodBreakdown + requiredMixerCategories: + - Centrifuge + reactants: + CopperBlood: + amount: 20 + products: + Water: 11 + Copper: 0.5 + Sugar: 2 + CarbonDioxide: 3 + Protein: 4 + +- type: reaction + id: ZombieBloodBreakdown + requiredMixerCategories: + - Centrifuge + reactants: + ZombieBlood: + amount: 4 + products: + Mold: 2 + Protein: 1 + Toxin: 1 diff --git a/Resources/Prototypes/Recipes/Reactions/chemicals.yml b/Resources/Prototypes/Recipes/Reactions/chemicals.yml index ffd445a99c..38dc4ff056 100644 --- a/Resources/Prototypes/Recipes/Reactions/chemicals.yml +++ b/Resources/Prototypes/Recipes/Reactions/chemicals.yml @@ -8,6 +8,17 @@ products: Ammonia: 4 +- type: reaction + id: CelluloseBreakdown + requiredMixerCategories: + - Electrolysis + reactants: + Cellulose: + amount: 3 + products: + Sugar: 2 + Carbon: 1 + - type: reaction id: Diethylamine reactants: @@ -20,6 +31,8 @@ - type: reaction id: Phenol + minTemp: 325 + maxTemp: 480 reactants: Oxygen: amount: 1 @@ -197,6 +210,7 @@ - type: reaction id: TableSalt + minTemp: 370 reactants: Chlorine: amount: 1 @@ -205,6 +219,17 @@ products: TableSalt: 2 +- type: reaction + id: TableSaltBreakdown + requiredMixerCategories: + - Electrolysis + reactants: + TableSalt: + amount: 2 + products: + Chlorine: 1 + Sodium: 1 + - type: reaction id: Thermite impact: Medium diff --git a/Resources/Prototypes/Recipes/Reactions/drinks.yml b/Resources/Prototypes/Recipes/Reactions/drinks.yml index 6226fb1816..0ad0661623 100644 --- a/Resources/Prototypes/Recipes/Reactions/drinks.yml +++ b/Resources/Prototypes/Recipes/Reactions/drinks.yml @@ -260,6 +260,18 @@ products: ErikaSurprise: 6 +- type: reaction + id: EthanolBreakdown + requiredMixerCategories: + - Electrolysis + reactants: + Ethanol: + amount: 9 + products: + Hydrogen: 6 + Carbon: 2 + Oxygen: 1 + - type: reaction id: FourteenLoko reactants: @@ -881,6 +893,17 @@ products: TheMartinez: 6 +- type: reaction + id: WaterBreakdown + requiredMixerCategories: + - Electrolysis + reactants: + Water: + amount: 3 + products: + Hydrogen: 2 + Oxygen: 1 + - type: reaction id: WhiteGilgamesh reactants: diff --git a/Resources/Prototypes/Recipes/Reactions/food.yml b/Resources/Prototypes/Recipes/Reactions/food.yml index 7151480628..97b5549c20 100644 --- a/Resources/Prototypes/Recipes/Reactions/food.yml +++ b/Resources/Prototypes/Recipes/Reactions/food.yml @@ -298,3 +298,25 @@ products: Vinaigrette: 3 +- type: reaction + id: BananaBreakdown + requiredMixerCategories: + - Centrifuge + reactants: + JuiceBanana: + amount: 10 + products: + Sugar: 9 + Potassium: 1 + +- type: reaction + id: SugarBreakdown + minTemp: 520 + reactants: + Sugar: + amount: 4 + products: + Carbon: 1 + Oxygen: 1 + Hydrogen: 2 + diff --git a/Resources/Prototypes/Recipes/Reactions/fun.yml b/Resources/Prototypes/Recipes/Reactions/fun.yml index 0f139c0048..eb895a31f2 100644 --- a/Resources/Prototypes/Recipes/Reactions/fun.yml +++ b/Resources/Prototypes/Recipes/Reactions/fun.yml @@ -107,3 +107,17 @@ effects: - !type:CreateEntityReactionEffect entity: SheetPlastic1 + +- type: reaction + id: FiberBreakdown + requiredMixerCategories: + - Centrifuge + reactants: + Fiber: + amount: 5 + Water: + amount: 10 + catalyst: true + products: + Carbon: 3 + Sugar: 2 diff --git a/Resources/Prototypes/Recipes/Reactions/gas.yml b/Resources/Prototypes/Recipes/Reactions/gas.yml new file mode 100644 index 0000000000..9cc6db1b64 --- /dev/null +++ b/Resources/Prototypes/Recipes/Reactions/gas.yml @@ -0,0 +1,21 @@ +- type: reaction + id: CarbonDioxideBreakdown + requiredMixerCategories: + - Electrolysis + reactants: + CarbonDioxide: + amount: 3 + products: + Carbon: 1 + Oxygen: 2 + +- type: reaction + id: NitrousOxideBreakdown + requiredMixerCategories: + - Electrolysis + reactants: + NitrousOxide: + amount: 3 + products: + Nitrogen: 2 + Oxygen: 1 diff --git a/Resources/Prototypes/Recipes/Reactions/medicine.yml b/Resources/Prototypes/Recipes/Reactions/medicine.yml index 11a641cbef..ff53c05115 100644 --- a/Resources/Prototypes/Recipes/Reactions/medicine.yml +++ b/Resources/Prototypes/Recipes/Reactions/medicine.yml @@ -498,4 +498,4 @@ Puncturase: amount: 1 products: - Razorium: 1 \ No newline at end of file + Razorium: 1 diff --git a/Resources/Prototypes/Recipes/Reactions/pyrotechnic.yml b/Resources/Prototypes/Recipes/Reactions/pyrotechnic.yml index 615e38bf09..b0f71b4c68 100644 --- a/Resources/Prototypes/Recipes/Reactions/pyrotechnic.yml +++ b/Resources/Prototypes/Recipes/Reactions/pyrotechnic.yml @@ -60,3 +60,15 @@ amount: 1 products: Ash: 1 + +- type: reaction + id: WeldingFuelBreakdown + requiredMixerCategories: + - Centrifuge + reactants: + WeldingFuel: + amount: 10 + products: + Ethanol: 5 + Hydrogen: 3 + Sulfur: 2