Add basic chemical reactions (#376)
* Add basic chemical reaction system What it adds: - Reactions defined in yaml with an arbitrary amount of reactants (can be catalysts), products, and effects. What it doesn't add: - Temperature dependent reactions - Metabolism or other medical/health effects * Add many common SS13 chemicals and reactions Added many of the common SS13 medicines and other chemicals, and their chemical reactions. Note that many of them are lacking their effects since we don't have medical yet. * Add ExplosiveReactionEffect Shows how IReactionEffect can be implemented to have effects that occur with a reaction by adding ExplosionReactionEffect and the potassium + water explosion reaction. * Move ReactionSystem logic into SolutionComponent No need for this to be a system currently so the behavior for reaction checking has been moved into SolutionComponent. Now it only checks for reactions when a reagent or solution is added to a solution. Also fixed a bug with SolutionValidReaction incorrectly returning true. * Move explosion logic out of ExplosiveComponent Allows you to create explosions without needing to add an ExplosiveComponent to an entity first. * Add SolutionComponent.SolutionChanged event. Trigger dispenser ui updates with it. This removes the need for SolutionComponent having a reference to the dispenser it's in. Instead the dispenser subscribes to the event and updates it's UI whenever the event is triggered. * Add forgotten checks `SolutionComponent.TryAddReagent` and `SolutionComponent.TryAddSolution` now check to see if `skipReactionCheck` is false before checking for a chemical reaction to avoid unnecessarily checking themselves for a reaction again when `SolutionComponent.PerformReaction` calls either of them. * Change SolutionComponent.SolutionChanged to an Action The arguments for event handler have no use here, and any class that can access SolutionChanged can access the SolutionComponent so it can just be an Action with no arguments instead.
This commit is contained in:
committed by
Pieter-Jan Briers
parent
bd5a4e33ab
commit
427836fec9
@@ -2,7 +2,7 @@
|
||||
id: chem.H2SO4
|
||||
name: Sulfuric Acid
|
||||
desc: A highly corrosive, oily, colorless liquid.
|
||||
|
||||
|
||||
- type: reagent
|
||||
id: chem.H2O
|
||||
name: Water
|
||||
@@ -12,4 +12,81 @@
|
||||
id: chem.Ice
|
||||
name: Ice
|
||||
desc: Frozen water.
|
||||
color: "#bed8e6"
|
||||
color: "#bed8e6"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Plasma
|
||||
name: Plasma
|
||||
desc: Funky, space-magic pixie dust. You probably shouldn't eat this, but we both know you will anyways.
|
||||
|
||||
- type: reagent
|
||||
id: chem.Ethanol
|
||||
name: Ethanol
|
||||
desc: A simple alcohol, makes you drunk if consumed, flammable.
|
||||
color: "#b05b3c"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Glucose
|
||||
name: Glucose
|
||||
desc: A simple sugar found in many foods.
|
||||
color: "#ffffff"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Ammonia
|
||||
name: Ammonia
|
||||
desc: An effective fertilizer which is better than what is available to the botanist initially, though it isn't as powerful as Diethylamine
|
||||
color: "#77b58e"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Bleach
|
||||
name: Bleach
|
||||
desc: Heavy duty cleaner that can clean tiles the same as Space Cleaner and also decontaminate clothes. Extremely toxic when ingested.
|
||||
color: "#a1000b"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Diethylamine
|
||||
name: Diethylamine
|
||||
desc: A very potent fertilizer.
|
||||
color: "#a1000b"
|
||||
|
||||
- type: reagent
|
||||
id: chem.FoamingAgent
|
||||
name: Foaming Agent
|
||||
desc: Makes foam such as that required in metal foam grenades
|
||||
color: "#215263"
|
||||
|
||||
- type: reagent
|
||||
id: chem.PolytrinicAcid
|
||||
name: Polytrinic Acid
|
||||
desc: An extremely corrosive chemical substance. The slightest touch of it will melt off most masks and headgear, and it deals extreme damage to anyone who comes directly into contact with it. Spraying it on other items will usually melt them too, which does make it useful if the clown has covered the entire hallway in banana peels.
|
||||
color: "#a1000b"
|
||||
|
||||
- type: reagent
|
||||
id: chem.SpaceCleaner
|
||||
name: Space Cleaner
|
||||
desc: This is able to clean almost all surfaces of almost anything that may dirty them. The janitor is likely to appreciate refills.
|
||||
color: "#215263"
|
||||
|
||||
- type: reagent
|
||||
id: chem.SpaceLube
|
||||
name: Space Lube
|
||||
desc: Space Lube is a high performance lubricant intended for maintenance of extremely complex mechanical equipment (and certainly not used to make people slip).
|
||||
color: "#77b58e"
|
||||
|
||||
- type: reagent
|
||||
id: chem.TableSalt
|
||||
name: Table Salt
|
||||
desc: Commonly known as salt, Sodium Chloride is often used to season food or kill borers instantly.
|
||||
color: "#a1000b"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Thermite
|
||||
name: Thermite
|
||||
desc: A mixture that becomes extremely hot when ignited, and which can burn straight through walls when applied and ignited. It'll slowly inflict burn damage to anybody dumb enough to ingest it, but can't be ignited inside inside said dumb person.
|
||||
color: "#77b58e"
|
||||
|
||||
- type: reagent
|
||||
id: chem.UnstableMutagen
|
||||
name: Unstable Mutagen
|
||||
desc: Causes mutations when injected into living people or plants. High doses may be lethal, especially in humans.
|
||||
color: "#77b58e"
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
- type: reagent
|
||||
id: chem.H2
|
||||
id: chem.H
|
||||
name: Hydrogen
|
||||
desc: A light, flammable gas.
|
||||
|
||||
|
||||
- type: reagent
|
||||
id: chem.O2
|
||||
id: chem.O
|
||||
name: Oxygen
|
||||
desc: An oxidizing, colorless gas.
|
||||
|
||||
|
||||
- type: reagent
|
||||
id: chem.S8
|
||||
id: chem.S
|
||||
name: Sulfur
|
||||
desc: A yellow, crystalline solid.
|
||||
color: "#FFFACD"
|
||||
|
||||
|
||||
- type: reagent
|
||||
id: chem.C
|
||||
name: Carbon
|
||||
@@ -33,7 +33,7 @@
|
||||
color: "#b05b3c"
|
||||
|
||||
- type: reagent
|
||||
id: chem.N2
|
||||
id: chem.N
|
||||
name: Nitrogen
|
||||
desc: A colorless, odorless unreactive gas. Highly stable.
|
||||
|
||||
@@ -44,6 +44,54 @@
|
||||
color: "#434b4d"
|
||||
|
||||
- type: reagent
|
||||
id: chem.F2
|
||||
id: chem.F
|
||||
name: Fluorine
|
||||
desc: A highly toxic pale yellow gas. Extremely reactive.
|
||||
desc: A highly toxic pale yellow gas. Extremely reactive.
|
||||
|
||||
- type: reagent
|
||||
id: chem.Si
|
||||
name: Silicon
|
||||
desc: A hard and brittle crystalline solid with a blue-grey color.
|
||||
color: "#364266"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Cl
|
||||
name: Chlorine
|
||||
desc: A yellow-green gas which is toxic to humans.
|
||||
color: "#a2ff00"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Li
|
||||
name: Lithium
|
||||
desc: A soft, silvery-white alkali metal. It is highly reactive, and ignites if it makes contact with water.
|
||||
color: "#c6c8cc"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Hg
|
||||
name: Mercury
|
||||
desc: A silver metal which is liquid at room temperature. It is highly toxic to humans.
|
||||
color: "#929296"
|
||||
|
||||
- type: reagent
|
||||
id: chem.P
|
||||
name: Phosphorus
|
||||
desc: A reactive metal used in pyrotechnics and weapons.
|
||||
color: "#803330"
|
||||
|
||||
- type: reagent
|
||||
id: chem.K
|
||||
name: Potassium
|
||||
desc: A soft, silvery-white metal. Even more reactive than lithium.
|
||||
color: "#c6c8cc"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Ra
|
||||
name: Radium
|
||||
desc: A radioactive metal, silvery-white in it's pure form. It glows due to it's radioactivity and is highly toxic.
|
||||
color: "#00ff04"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Na
|
||||
name: Sodium
|
||||
desc: A silvery-white alkali metal. Highly reactive in it's pure form.
|
||||
color: "#c6c8cc"
|
||||
|
||||
246
Resources/Prototypes/Reagents/medicine.yml
Normal file
246
Resources/Prototypes/Reagents/medicine.yml
Normal file
@@ -0,0 +1,246 @@
|
||||
- type: reagent
|
||||
id: chem.Alkycosine
|
||||
name: Alkycosine
|
||||
desc: Lessens the damage to neurological tissue. More effective at treating brain damage than alkysine and also a fairly effective painkiller as well. Caution is needed in its creation to avoid mixing bleach and the chlorine needed to make alkysine.
|
||||
color: "#9e232b"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Alkysine
|
||||
name: Alkysine
|
||||
desc: Lessens the damage to neurological tissue, effective even after catastrophic injury. Used for treating brain damage and also a fairly effective painkiller.
|
||||
color: "#a1000b"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Dylovene
|
||||
name: Dylovene
|
||||
desc: A broad-spectrum anti-toxin, which treats toxin damage in the blood stream. Overdosing will cause vomiting, dizzyness and pain.
|
||||
color: "#3a1d8a"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Arithrazine
|
||||
name: Arithrazine
|
||||
desc: A slightly unstable medication used for the most extreme any serious case of radiation poisoning. Lowers radiation level at over twice the rate Hyronalin does and will heal toxin damage at the same time. Deals very minor brute damage to the patient over time, but the patient's body will typically out-regenerate it easily.
|
||||
color: "#bd5902"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Bicaridine
|
||||
name: Bicaridine
|
||||
desc: An analgesic which is highly effective at treating brute damage. It is useful for stabilizing people who have been severely beaten, as well as treating less life-threatening injuries. In the case of bleeding (internal or external), bicaridine will slow down the bleeding heavily. If the dosage exceeds the overdose limit, it'll stop it outright.
|
||||
color: "#ffaa00"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Cryoxadone
|
||||
name: Cryoxadone
|
||||
desc: Required for the proper function of cryogenics. Heals all standard types of damage very swiftly, but only works in temperatures under 170K (usually this means cryo cells). Can also slowly heal clone damage, such as caused by cloning or Slimes.
|
||||
color: "#0091ff"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Clonexadone
|
||||
name: Clonexadone
|
||||
desc: Heals standard damage in the same as Cryoxadone, with the same temperature requirement. Significantly more effective than the former at treating clone damage, although both can be used simultaneously. Best used in cryo cells.
|
||||
color: "#0091ff"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Citalopram
|
||||
name: Citalopram
|
||||
desc: Prevents hallucination slightly.
|
||||
color: "#21693c"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Dermaline
|
||||
name: Dermaline
|
||||
desc: An advanced chemical that is more effective at treating burns damage than Kelotane.
|
||||
color: "#215263"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Dexalin
|
||||
name: Dexalin
|
||||
desc: Used for treating oxygen deprivation. In most cases where it is likely to be needed, the strength of Dexalin Plus will probably be more useful (Results in 1 unit instead of 2).
|
||||
color: "#0041a8"
|
||||
|
||||
- type: reagent
|
||||
id: chem.DexalinPlus
|
||||
name: Dexalin Plus
|
||||
desc: Used in treatment of extreme cases of oxygen deprivation. Even a single unit immediately counters all oxygen loss, which is hugely useful in many circumstances. Any dose beyond this will continue to counter oxygen loss until it is metabolized, essentially removing the need to breathe.
|
||||
color: "#297691"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Ethylredoxrazine
|
||||
name: Ethylredoxrazine
|
||||
desc: Neutralises the effects of alcohol in the blood stream. Though it is commonly needed, it is rarely requested.
|
||||
color: "#2d5708"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Hyperzine
|
||||
name: Hyperzine
|
||||
desc: A highly effective, long lasting muscle stimulant. It allows greater freedom of movement in bulky clothing although it has the side effect of causing some twitching. Dangerous in higher doses.
|
||||
color: "#17bd61"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Hyronalin
|
||||
name: Hyronalin
|
||||
desc: A weak treatment for radiation damage. Considered to be useful mainly for genetic modification, where it reduces radiation levels, and thus the chance of genetic mutations. Largely outclassed by Arithrazine.
|
||||
color: "#17ac61"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Imidazoline
|
||||
name: Imidazoline
|
||||
desc: Effective in treating eye trauma. It heals damage caused by physical or chemical trauma, though it is ineffective in treating genetic defects in the eyes.
|
||||
color: "#f7ef00"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Inacusiate
|
||||
name: Inacusiate
|
||||
desc: You only need 1u for Inacusiate work. Cures deafness instantly. Useful after an explosion.
|
||||
color: "#f7ef00"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Inaprovaline
|
||||
name: Inaprovaline
|
||||
desc: Inaprovaline is a synaptic stimulant and cardiostimulant. Commonly used to stabilize patients- it stops oxygen loss when the patient is in critical health. It'll also slow down bleeding (internal or external) by half while in the body. Acts as a decent painkiller.
|
||||
color: "#73103b"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Kelotane
|
||||
name: Kelotane
|
||||
desc: Treats burn damage and prevents infection.
|
||||
color: "#bf3d19"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Leporazine
|
||||
name: Leporazine
|
||||
desc: This keeps a patient's body temperature stable. High doses can allow short periods of unprotected EVA, but prevents use of the cryogenics tubes.
|
||||
color: "#ff7db5"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Methylin
|
||||
name: Methylin
|
||||
desc: An intelligence enhancer, also used in the treatment of attention deficit hyperactivity disorder. Also known as Ritalin. Allows monkeys (not diona nymphs) to understand human speech and improves their dexterity as long as they have some in their system. Causes toxin and brain damage in higher doses.
|
||||
color: "#a700c4"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Oxycodone
|
||||
name: Oxycodone
|
||||
desc: A very effective painkiller, about 250% as strong as Tramadol.
|
||||
color: "#c4a300"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Phalanximine
|
||||
name: Phalanximine
|
||||
desc: Used in the treatment of cancer, is as effective as Anti-Toxin. Causes moderate radiation and hair loss.
|
||||
color: "#c8ff75"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Paroxetine
|
||||
name: Paroxetine
|
||||
desc: Prevents hallucination, but has a 10% chance of causing intense hallucinations.
|
||||
color: "#c8ff75"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Ryetalyn
|
||||
name: Ryetalyn
|
||||
desc: You only need 1u for Ryetalin to work. Deactivates genetic defects and powers, restoring a patient to an ideal state. May be useful if genetics is unable to function properly. Deactivated effects return if the patient's genes are modified again.
|
||||
color: "#532fd4"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Spaceacillin
|
||||
name: Spaceacillin
|
||||
desc: A theta-lactam antibiotic. A common and very useful medicine, effective against many diseases likely to be encountered in space. Slows progression of diseases.
|
||||
color: "#7f2fd4"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Synaptizine
|
||||
name: Synaptizine
|
||||
desc: Toxic, but treats hallucinations, drowsiness & halves the duration of paralysis, stuns and knockdowns. It is metabolized very slowly. One unit is enough to treat hallucinations; two units is deadly.
|
||||
color: "#d49a2f"
|
||||
|
||||
|
||||
- type: reagent
|
||||
id: chem.Tramadol
|
||||
name: Tramadol
|
||||
desc: A simple, yet effective painkiller. Very effective for patients in shock.
|
||||
color: "#2f6ed4"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Tricordrazine
|
||||
name: Tricordrazine
|
||||
desc: A wide-spectrum stimulant, originally derived from Cordrazine. Is capable of healing all four main damage types simultaneously, however it only heals at half the rate of conventional healing chemicals. Because of its low potency, it's best used as a supplement to other medicines.
|
||||
color: "#00e5ff"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Vaccine
|
||||
name: Vaccine
|
||||
desc: Introduces antigens to the body, allowing the immune system to produce enough antibodies to combat present or future infections. Is blank by default, vaccine carrying antigen is produced at a centrifuge. Each unit raises the associated antibody concentration by 20% so at most 5 units are needed to cure the strongest diseases.
|
||||
color: "#ba0b60"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Albuterol
|
||||
name: Albuterol
|
||||
desc: A bronchodilator that relaxes muscles in the airways and increases air flow to the lungs. It'll remove mucus from your system as long as it's inside your body. Only useful to people with the Asthma disability.
|
||||
color: "#00e5ff"
|
||||
|
||||
- type: reagent
|
||||
id: chem.ChloralHydrate
|
||||
name: Chloral Hydrate
|
||||
desc: A powerful sedative which causes death in doses upwards of 16.2 units. Sends the patient to sleep almost instantly.
|
||||
color: "#00e5ff"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Creatine
|
||||
name: Creatine
|
||||
desc: A muscle-building drug that grants the user enormous strength, before their muscles seize and tear their own body to shreds. In practical terms, 1-25 units just causes toxin damage, and 26 units turns you into a hulk with all its associated benefits with the side effect of taking a little toxin damage over time. You'll remain as a hulk until it's all metabolized, at which point you'll take 200 brute damage and gib. With the correct administration, it can be the most potent drug there is, but even at the best of times it is best considered a double-edged sword.
|
||||
color: "#a1000b"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Cryptobiolin
|
||||
name: Cryptobiolin
|
||||
desc: Causes confusion and dizziness. This is essential to make Spaceacillin.
|
||||
color: "#00e5ff"
|
||||
|
||||
- type: reagent
|
||||
id: chem.HeartbreakerToxin
|
||||
name: Heartbreaker Toxin
|
||||
desc: A hallucinogenic compound that is illegal under space law. A synthetic drug derived from Mindbreaker toxin, it blocks some neurological signals to the respiratory system which causes choking.
|
||||
color: "#00e5ff"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Impedrezene
|
||||
name: Impedrezene
|
||||
desc: A narcotic that impedes one's ability by slowing down the higher brain cell functions. Causes massive brain damage.
|
||||
color: "#215263"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Lexorin
|
||||
name: Lexorin
|
||||
desc: Temporarily stops respiration and causes tissue damage. Large doses are fatal, and will cause people to pass out very quickly. Dexalin and Dexalin Plus will both remove it, however.
|
||||
color: "#a1000b"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Lipozine
|
||||
name: Lipozine
|
||||
desc: Causes weight loss upon consumption.
|
||||
color: "#215263"
|
||||
|
||||
- type: reagent
|
||||
id: chem.MindbreakerToxin
|
||||
name: Mindbreaker Toxin
|
||||
desc: A potent hallucinogenic compound that is illegal under space law. Formerly known as LSD.
|
||||
color: "#77b58e"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Soporific
|
||||
name: Soporific (Sleep-Toxin)
|
||||
desc: A less powerful sedative that takes a while to work, intended to help insomniacs and patients that are too aggressive to be treated normally. Takes roughly 50 seconds to make the patient fall asleep. Is safe in large quantities. Can be counteracted with Anti-Toxin.
|
||||
color: "#215263"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Sterilizine
|
||||
name: Sterilizine
|
||||
desc: Helps the patient when used during surgery, may also decontaminate objects and surfaces that bear pathogens. Is currently useless due to infections not being a thing.
|
||||
color: "#215263"
|
||||
|
||||
- type: reagent
|
||||
id: chem.SpaceDrugs
|
||||
name: Space Drugs
|
||||
desc: An illegal compound which induces a number of effects such as loss of balance and visual artefacts.
|
||||
color: "#a1000b"
|
||||
Reference in New Issue
Block a user