Adds a slightly-more-useful (maybe too useful) reagent recipe browser to chem and drink dispensers (#93903)

This commit is contained in:
MrMelbert
2025-11-14 23:45:24 -07:00
committed by GitHub
parent 13c4e87b3c
commit 1cb280cbf1
20 changed files with 1124 additions and 541 deletions
@@ -257,27 +257,8 @@
//Use GLOB list - saves processing
data["master_reaction_list"] = GLOB.chemical_reactions_results_lookup_list
data["bitflags"] = list()
data["bitflags"]["BRUTE"] = REACTION_TAG_BRUTE
data["bitflags"]["BURN"] = REACTION_TAG_BURN
data["bitflags"]["TOXIN"] = REACTION_TAG_TOXIN
data["bitflags"]["OXY"] = REACTION_TAG_OXY
data["bitflags"]["HEALING"] = REACTION_TAG_HEALING
data["bitflags"]["DAMAGING"] = REACTION_TAG_DAMAGING
data["bitflags"]["EXPLOSIVE"] = REACTION_TAG_EXPLOSIVE
data["bitflags"]["OTHER"] = REACTION_TAG_OTHER
data["bitflags"]["DANGEROUS"] = REACTION_TAG_DANGEROUS
data["bitflags"]["EASY"] = REACTION_TAG_EASY
data["bitflags"]["MODERATE"] = REACTION_TAG_MODERATE
data["bitflags"]["HARD"] = REACTION_TAG_HARD
data["bitflags"]["ORGAN"] = REACTION_TAG_ORGAN
data["bitflags"]["DRINK"] = REACTION_TAG_DRINK
data["bitflags"]["FOOD"] = REACTION_TAG_FOOD
data["bitflags"]["SLIME"] = REACTION_TAG_SLIME
data["bitflags"]["DRUG"] = REACTION_TAG_DRUG
data["bitflags"]["UNIQUE"] = REACTION_TAG_UNIQUE
data["bitflags"]["CHEMICAL"] = REACTION_TAG_CHEMICAL
data["bitflags"]["PLANT"] = REACTION_TAG_PLANT
data["bitflags"]["COMPETITIVE"] = REACTION_TAG_COMPETITIVE
for(var/readable_flag, real_flag in REACTION_TAG_READABLE)
data["bitflags"][readable_flag] = real_flag
return data
@@ -407,5 +388,12 @@
if("toggle_tag_competitive")
ui_tags_selected = ui_tags_selected ^ REACTION_TAG_COMPETITIVE
return TRUE
if("toggle_tag_component")
ui_tags_selected = ui_tags_selected ^ REACTION_TAG_COMPONENT
return TRUE
if("toggle_tag_active")
ui_tags_selected = ui_tags_selected ^ REACTION_TAG_ACTIVE
return TRUE
if("update_ui")
return TRUE
@@ -23,7 +23,7 @@
/// If the UI has the pH meter shown
var/show_ph = TRUE
/// The overlay used to display the beaker on the machine
var/mutable_appearance/beaker_overlay
VAR_PRIVATE/mutable_appearance/beaker_overlay
/// Icon to display when the machine is powered
var/working_state = "dispenser_working"
/// Icon to display when the machine is not powered
@@ -41,9 +41,14 @@
/// Starting purity of the created reagents
var/base_reagent_purity = 1
/// Records the reagents dispensed by the user if this list is not null
var/list/recording_recipe
VAR_PRIVATE/list/recording_recipe
/// Saves all the recipes recorded by the machine
var/list/saved_recipes = list()
VAR_PRIVATE/list/saved_recipes = list()
/// Filters out all reactions that don't have any of these tags from the reaction list
var/shown_reaction_tags = DAMAGE_HEALING_REACTION_TAGS | MEDICATION_REACTION_TAGS | CHEMIST_REACTION_TAGS
/// Filters out all reactions that have any one of these tags from the reaction list
var/hidden_reaction_tags = REACTION_TAG_ACTIVE | REACTION_TAG_FOOD | REACTION_TAG_DRINK
/// The default list of dispensable_reagents
var/static/list/default_dispensable_reagents = list(
@@ -90,6 +95,7 @@
/datum/reagent/drug/space_drugs,
/datum/reagent/toxin
)
/obj/machinery/chem_dispenser/Initialize(mapload)
if(dispensable_reagents != null && !dispensable_reagents.len)
dispensable_reagents = default_dispensable_reagents
@@ -257,6 +263,18 @@
beaker_data["contents"] = beakerContents
.["beaker"] = beaker_data
/obj/machinery/chem_dispenser/ui_static_data(mob/user)
var/list/data = list()
data["reaction_list"] = get_reaction_list()
data["all_bitflags"] = list()
for(var/readable_flag, real_flag in REACTION_TAG_READABLE)
if((real_flag & hidden_reaction_tags) || !(real_flag & shown_reaction_tags))
continue
data["all_bitflags"][readable_flag] = real_flag
return data
/obj/machinery/chem_dispenser/ui_act(action, params, datum/tgui/ui, datum/ui_state/state)
. = ..()
if(.)
@@ -504,6 +522,61 @@
/obj/machinery/chem_dispenser/attack_ai_secondary(mob/user, list/modifiers)
return attack_hand_secondary(user, modifiers)
/obj/machinery/chem_dispenser/proc/get_reaction_list()
var/static/list/reaction_list
if(reaction_list?[type])
return reaction_list[type]
reaction_list ||= list()
reaction_list[type] = list()
var/list/new_reaction_list = list()
for(var/result, reactions in GLOB.chemical_reactions_list_product_index - dispensable_reagents)
var/datum/reagent/result_datum = GLOB.chemical_reagents_list[result]
for(var/datum/chemical_reaction/reaction as anything in reactions)
if(!(reaction.reaction_tags & shown_reaction_tags))
continue
if(reaction.reaction_tags & hidden_reaction_tags)
continue
if(reaction.required_container)
continue
var/index = result_datum.name
var/list/new_info = get_reaction_info(reaction)
new_info["description"] = result_datum.description
new_info["color"] = result_datum.color
var/num_alts = 0
while(new_reaction_list[index])
num_alts++
index = "[result_datum.name] (Alt[num_alts == 1 ? "" : " #[num_alts]"])"
new_reaction_list[index] = new_info
reaction_list[type] = new_reaction_list
return reaction_list[type]
/obj/machinery/chem_dispenser/proc/get_reaction_info(datum/chemical_reaction/reaction)
var/list/info = list()
info["id"] = reaction.type
info["lower_temperature"] = reaction.required_temp
info["upper_temperature"] = reaction.optimal_temp
info["lower_ph"] = reaction.optimal_ph_min
info["upper_ph"] = reaction.optimal_ph_max
info["bitflags"] = reaction.reaction_tags
info["required_reagents"] = reagent_list_to_info(reaction.required_reagents)
info["required_catalysts"] = reagent_list_to_info(reaction.required_catalysts)
return info
/obj/machinery/chem_dispenser/proc/reagent_list_to_info(list/reagent_list)
var/list/info = list()
for(var/datum/reagent/reagent_typepath as anything in reagent_list)
info += list(list(
"name" = reagent_typepath::name,
"amount" = reagent_list[reagent_typepath],
"typepath" = reagent_typepath,
))
return info
/obj/machinery/chem_dispenser/drinks
name = "soda dispenser"
@@ -520,6 +593,8 @@
nopower_state = null
pass_flags = PASSTABLE
show_ph = FALSE
shown_reaction_tags = KITCHEN_REACTION_TAGS
hidden_reaction_tags = REACTION_TAG_ACTIVE
/// The default list of reagents dispensable by the soda dispenser
var/static/list/drinks_dispensable_reagents = list(
/datum/reagent/consumable/coffee,
@@ -676,6 +751,8 @@
name = "botanical chemical dispenser"
desc = "Creates and dispenses chemicals useful for botany."
circuit = /obj/item/circuitboard/machine/chem_dispenser/mutagensaltpeter
shown_reaction_tags = BOTANIST_REACTION_TAGS
hidden_reaction_tags = REACTION_TAG_ACTIVE
/// The default list of dispensable reagents available in the mutagensaltpeter chem dispenser
var/static/list/mutagensaltpeter_dispensable_reagents = list(
@@ -1422,7 +1422,7 @@
/datum/reagent/consumable/ethanol/neurotoxin
name = "Neurotoxin"
description = "A strong neurotoxin that puts the subject into a death-like state."
description = "A strong neurotoxin that puts the patient into a death-like state."
color = "#2E2E61" // rgb: 46, 46, 97
boozepwr = 50
quality = DRINK_VERYGOOD
@@ -1164,7 +1164,7 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/consumable/strawberry_banana
name = "strawberry banana smoothie"
name = "Strawberry Banana Smoothie"
description = "A classic smoothie made from strawberries and bananas."
color = "#FF9999"
nutriment_factor = 0
@@ -1172,7 +1172,7 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/consumable/berry_blast
name = "berry blast smoothie"
name = "Berry Blast Smoothie"
description = "A classic smoothie made from mixed berries."
color = "#A76DC5"
nutriment_factor = 0
@@ -1180,7 +1180,7 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/consumable/funky_monkey
name = "funky monkey smoothie"
name = "Funky Monkey Smoothie"
description = "A classic smoothie made from chocolate and bananas."
color = COLOR_BROWNER_BROWN
nutriment_factor = 0
@@ -1188,7 +1188,7 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/consumable/green_giant
name = "green giant smoothie"
name = "Green Giant Smoothie"
description = "A green vegetable smoothie, made without vegetables."
color = COLOR_VERY_DARK_LIME_GREEN
nutriment_factor = 0
@@ -1196,7 +1196,7 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/consumable/melon_baller
name = "melon baller smoothie"
name = "Melon Baller Smoothie"
description = "A classic smoothie made from melons."
color = "#D22F55"
nutriment_factor = 0
@@ -1204,7 +1204,7 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/consumable/vanilla_dream
name = "vanilla dream smoothie"
name = "Vanilla Dream Smoothie"
description = "A classic smoothie made from vanilla and fresh cream."
color = "#FFF3DD"
nutriment_factor = 0
@@ -983,7 +983,8 @@
/datum/reagent/medicine/epinephrine
name = "Epinephrine"
description = "Very minor boost to stun resistance. Slowly heals damage if a patient is in critical condition, as well as regulating oxygen loss. Overdose causes weakness and toxin damage."
description = "Stabilizes and slowly heals patients in critical condition, and slows suffocation. \
Also provides a very minor boost to stun resistance. Overdose causes weakness and toxin damage."
color = "#D2FFFA"
metabolization_rate = 0.25 * REAGENTS_METABOLISM
overdose_threshold = 30
@@ -1080,7 +1080,7 @@
/datum/reagent/glycerol
name = "Glycerol"
description = "Glycerol is a simple polyol compound. Glycerol is sweet-tasting and of low toxicity."
description = "A simple polyol compound. Sweet-tasting and of low toxicity."
color = "#D3B913"
taste_description = "sweetness"
ph = 9
@@ -1404,7 +1404,7 @@
/datum/reagent/impedrezene
name = "Impedrezene"
description = "Impedrezene is a narcotic that impedes one's ability by slowing down the higher brain cell functions."
description = "A narcotic that impedes one's ability by slowing down the higher brain cell functions."
color = "#E07DDD" // pink = happy = dumb
taste_description = "numbness"
ph = 9.1
@@ -2074,21 +2074,21 @@
/datum/reagent/pentaerythritol
name = "Pentaerythritol"
description = "Slow down, it ain't no spelling bee!"
color = "#E66FFF"
description = "A crystalline compound used in the synthesis of explosives and other chemicals."
color = "#EEEEEF"
taste_description = "acid"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/acetaldehyde
name = "Acetaldehyde"
description = "Similar to plastic. Tastes like dead people."
description = "A colorless liquid with a strong smell. Used in the synthesis of other chemicals."
color = "#EEEEEF"
taste_description = "dead people" //made from formaldehyde, ya get da joke ?
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/acetone_oxide
name = "Acetone Oxide"
description = "Enslaved oxygen"
description = "A highly reactive compoud derived from acetone. Known to cause burns on contact. Used in the synthesis of various explosives."
color = "#966199cb"
taste_description = "acid"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
@@ -2115,7 +2115,7 @@
/datum/reagent/ash
name = "Ash"
description = "Supposedly phoenixes rise from these, but you've never seen it."
description = "A fine ash. Supposedly phoenixes rise from these, but you've never seen it."
color = "#515151"
taste_description = "ash"
ph = 6.5
@@ -2530,7 +2530,7 @@
/datum/reagent/plastic_polymers
name = "Plastic Polymers"
description = "the petroleum based components of plastic."
description = "Petroleum based components of plastic."
color = "#f7eded"
taste_description = "plastic"
ph = 6
@@ -42,7 +42,7 @@
/datum/reagent/clf3
name = "Chlorine Trifluoride"
description = "Makes a temporary 3x3 fireball when it comes into existence, so be careful when mixing. ClF3 applied to a surface burns things that wouldn't otherwise burn, sometimes through the very floors of the station and exposing it to the vacuum of space."
description = "A very flammable liquid capable of burning even through the hull of the station. Bursts into a fireball upon creation."
color = "#FFC8C8"
metabolization_rate = 10 * REAGENTS_METABOLISM
taste_description = "burning"
@@ -248,7 +248,7 @@
/datum/reagent/toxin/zombiepowder
name = "Zombie Powder"
description = "A strong neurotoxin that puts the subject into a death-like state."
description = "A strong neurotoxin that puts the patient into a death-like state."
silent_toxin = TRUE
creation_purity = REAGENT_STANDARD_PURITY
purity = REAGENT_STANDARD_PURITY
@@ -705,7 +705,8 @@
/datum/reagent/toxin/formaldehyde
name = "Formaldehyde"
description = "Formaldehyde, on its own, is a fairly weak toxin. It contains trace amounts of Histamine, very rarely making it decay into Histamine. When used in a dead body, will prevent organ decay."
description = "A fairly weak toxin that helps prevent organ decay in dead bodies. \
It will slowly decay into Histamine over time."
silent_toxin = TRUE
color = "#B4004B"
metabolization_rate = 0.5 * REAGENTS_METABOLISM
@@ -766,7 +767,7 @@
/datum/reagent/toxin/fentanyl
name = "Fentanyl"
description = "Fentanyl will inhibit brain function and cause toxin damage before eventually knocking out its victim."
description = "Inhibits brain function and causes toxin damage before eventually knocking out the patient."
color = "#64916E"
metabolization_rate = 0.5 * REAGENTS_METABOLISM
creation_purity = REAGENT_STANDARD_PURITY
@@ -1046,7 +1047,8 @@
/datum/reagent/toxin/heparin //Based on a real-life anticoagulant. I'm not a doctor, so this won't be realistic.
name = "Heparin"
description = "A powerful anticoagulant. All open cut wounds on the victim will open up and bleed much faster. It directly purges sanguirite, a coagulant."
description = "A powerful anticoagulant. All open cut wounds on the patient will open up and bleed much faster. \
Counters coagulants like Sanguirite, purging them."
silent_toxin = TRUE
creation_purity = REAGENT_STANDARD_PURITY
purity = REAGENT_STANDARD_PURITY
@@ -1064,7 +1066,7 @@
/datum/reagent/toxin/rotatium //Rotatium. Fucks up your rotation and is hilarious
name = "Rotatium"
description = "A constantly swirling, oddly colourful fluid. Causes the consumer's sense of direction and hand-eye coordination to become wild."
description = "A constantly swirling, oddly colourful fluid. Causes the patient's sense of direction and hand-eye coordination to become wild."
silent_toxin = TRUE
creation_purity = REAGENT_STANDARD_PURITY
purity = REAGENT_STANDARD_PURITY
@@ -1164,7 +1166,7 @@
/datum/reagent/toxin/acid/fluacid
name = "Fluorosulfuric Acid"
description = "Fluorosulfuric acid is an extremely corrosive chemical substance."
description = "An extremely corrosive chemical substance."
color = "#5050FF"
creation_purity = REAGENT_STANDARD_PURITY
purity = REAGENT_STANDARD_PURITY
@@ -1186,7 +1188,7 @@
/datum/reagent/toxin/acid/nitracid
name = "Nitric Acid"
description = "Nitric acid is an extremely corrosive chemical substance that violently reacts with living organic tissue."
description = "An extremely corrosive chemical substance that violently reacts with living organic tissue."
color = "#5050FF"
creation_purity = REAGENT_STANDARD_PURITY
purity = REAGENT_STANDARD_PURITY
@@ -26,7 +26,7 @@
rate_up_lim = 12.5
purity_min = 0.5 //100u will natrually just dip under this w/ no buffer
reaction_flags = REACTION_HEAT_ARBITARY //Heating up is arbitary because of submechanics of this reaction.
reaction_tags = REACTION_TAG_MODERATE | REACTION_TAG_EXPLOSIVE | REACTION_TAG_DRUG | REACTION_TAG_DANGEROUS
reaction_tags = REACTION_TAG_MODERATE | REACTION_TAG_EXPLOSIVE | REACTION_TAG_DRUG | REACTION_TAG_DANGEROUS | REACTION_TAG_ORGAN
//The less pure it is, the faster it heats up. tg please don't hate me for making your meth even more dangerous
/datum/chemical_reaction/methamphetamine/reaction_step(datum/reagents/holder, datum/equilibrium/reaction, delta_t, delta_ph, step_reaction_vol)
@@ -160,7 +160,7 @@
required_reagents = list(/datum/reagent/kronkus_extract = 15, /datum/reagent/fuel = 5, /datum/reagent/ammonia = 3)
mob_react = FALSE
reaction_flags = REACTION_INSTANT
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_DRUG | REACTION_TAG_ORGAN | REACTION_TAG_DAMAGING
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_DRUG | REACTION_TAG_ORGAN | REACTION_TAG_DAMAGING | REACTION_TAG_ACTIVE
/datum/chemical_reaction/moon_rock/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume)
var/location = get_turf(holder.my_atom)
@@ -176,7 +176,7 @@
required_reagents = list(/datum/reagent/silver = 10, /datum/reagent/toxin/cyanide = 10, /datum/reagent/lye = 5)
mob_react = FALSE
reaction_flags = REACTION_INSTANT
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_DRUG | REACTION_TAG_ORGAN | REACTION_TAG_DAMAGING
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_DRUG | REACTION_TAG_ORGAN | REACTION_TAG_DAMAGING | REACTION_TAG_ACTIVE
/datum/chemical_reaction/blastoff_ampoule/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume)
var/location = get_turf(holder.my_atom)
@@ -189,7 +189,7 @@
required_reagents = list(/datum/reagent/lead = 5, /datum/reagent/consumable/nothing = 5, /datum/reagent/drug/maint/tar = 10)
mob_react = FALSE
reaction_flags = REACTION_INSTANT
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_DRUG | REACTION_TAG_ORGAN | REACTION_TAG_DAMAGING
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_DRUG | REACTION_TAG_ORGAN | REACTION_TAG_DAMAGING | REACTION_TAG_ACTIVE
/datum/chemical_reaction/saturnx_glob/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume)
var/location = get_turf(holder.my_atom)
@@ -169,7 +169,7 @@
results = list(/datum/reagent/medicine/albuterol = 4, /datum/reagent/medicine/sal_acid = 0.5, /datum/reagent/ammonia = 0.5)
required_catalysts = list(/datum/reagent/toxin/acid = 1)
required_reagents = list(/datum/reagent/medicine/salbutamol = 5, /datum/reagent/medicine/c2/convermol = 1)
reaction_tags = REACTION_TAG_MODERATE | REACTION_TAG_ORGAN | REACTION_TAG_OTHER
reaction_tags = REACTION_TAG_MODERATE | REACTION_TAG_ORGAN | REACTION_TAG_OTHER | REACTION_TAG_ACTIVE
required_temp = 500
optimal_temp = 610
overheat_temp = 980
@@ -181,7 +181,7 @@
results = list(/datum/reagent/medicine/salbutamol = 2, /datum/reagent/ammonia = 1)
required_catalysts = list(/datum/reagent/toxin/acid = 1)
required_reagents = list(/datum/reagent/medicine/albuterol = 3, /datum/reagent/oxygen = 1)
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_ORGAN | REACTION_TAG_OTHER
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_ORGAN | REACTION_TAG_OTHER | REACTION_TAG_ACTIVE
required_temp = 300
optimal_temp = 500
overheat_temp = 800
@@ -191,7 +191,7 @@
results = list(/datum/reagent/inverse/healing/convermol = 1, /datum/reagent/lithium = 3, /datum/reagent/aluminium = 3, /datum/reagent/bromine = 3)
required_catalysts = list(/datum/reagent/toxin/acid/fluacid = 1)
required_reagents = list(/datum/reagent/medicine/albuterol = 5)
reaction_tags = REACTION_TAG_MODERATE | REACTION_TAG_ORGAN | REACTION_TAG_OTHER
reaction_tags = REACTION_TAG_MODERATE | REACTION_TAG_ORGAN | REACTION_TAG_OTHER | REACTION_TAG_ACTIVE
required_temp = 900
optimal_temp = 920
overheat_temp = 990
@@ -401,7 +401,7 @@
/datum/chemical_reaction/medicine/medsuture
required_reagents = list(/datum/reagent/cellulose = 2, /datum/reagent/toxin/formaldehyde = 4, /datum/reagent/medicine/polypyr = 3) //This might be a bit much, reagent cost should be reviewed after implementation.
reaction_flags = REACTION_INSTANT
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_HEALING | REACTION_TAG_BRUTE
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_HEALING | REACTION_TAG_BRUTE | REACTION_TAG_ACTIVE
/datum/chemical_reaction/medicine/medsuture/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume)
new /obj/item/stack/medical/suture/medicated(get_turf(holder.my_atom), round(created_volume * 4))
@@ -409,7 +409,7 @@
/datum/chemical_reaction/medicine/medmesh
required_reagents = list(/datum/reagent/cellulose = 2, /datum/reagent/consumable/aloejuice = 4, /datum/reagent/space_cleaner/sterilizine = 2)
reaction_flags = REACTION_INSTANT
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_HEALING | REACTION_TAG_BURN
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_HEALING | REACTION_TAG_BURN | REACTION_TAG_ACTIVE
/datum/chemical_reaction/medicine/medmesh/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume)
new /obj/item/stack/medical/mesh/advanced(get_turf(holder.my_atom), round(created_volume * 3))
@@ -417,7 +417,7 @@
/datum/chemical_reaction/medicine/poultice
required_reagents = list(/datum/reagent/toxin/bungotoxin = 4, /datum/reagent/cellulose = 4, /datum/reagent/consumable/aloejuice = 4 )
reaction_flags = REACTION_INSTANT
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_HEALING | REACTION_TAG_BRUTE | REACTION_TAG_BURN
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_HEALING | REACTION_TAG_BRUTE | REACTION_TAG_BURN | REACTION_TAG_ACTIVE
/datum/chemical_reaction/medicine/poultice/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume)
new /obj/item/stack/medical/poultice(get_turf(holder.my_atom), round(created_volume * 3))
@@ -42,7 +42,7 @@
/datum/chemical_reaction/sodiumchloride
results = list(/datum/reagent/consumable/salt = 2)
required_reagents = list(/datum/reagent/sodium = 1, /datum/reagent/chlorine = 1) // That's what I said! Sodium Chloride!
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_FOOD
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_FOOD | REACTION_TAG_COMPONENT
required_other = TRUE
/datum/chemical_reaction/sodiumchloride/pre_reaction_other_checks(datum/reagents/holder)
@@ -233,6 +233,7 @@
var/level_min = 1
var/level_max = 2
reaction_flags = REACTION_INSTANT
reaction_tags = REACTION_TAG_ACTIVE
/datum/chemical_reaction/mix_virus/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume)
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in holder.reagent_list
@@ -386,18 +387,18 @@
optimal_ph_min = 1 // Lets increase our range for this basic chem
optimal_ph_max = 12
H_ion_release = -0.02 //handmade is more neutral
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_CHEMICAL | REACTION_TAG_PLANT
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_CHEMICAL | REACTION_TAG_PLANT | REACTION_TAG_COMPONENT
/datum/chemical_reaction/diethylamine
results = list(/datum/reagent/diethylamine = 2)
required_reagents = list (/datum/reagent/ammonia = 1, /datum/reagent/consumable/ethanol = 1)
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_CHEMICAL | REACTION_TAG_PLANT
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_CHEMICAL | REACTION_TAG_PLANT | REACTION_TAG_COMPONENT
/datum/chemical_reaction/space_cleaner
results = list(/datum/reagent/space_cleaner = 2)
required_reagents = list(/datum/reagent/ammonia = 1, /datum/reagent/water = 1)
rate_up_lim = 40
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_UNIQUE
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_UNIQUE | REACTION_TAG_COMPONENT
/datum/chemical_reaction/plantbgone
results = list(/datum/reagent/toxin/plantbgone = 5)
@@ -418,14 +419,14 @@
/datum/chemical_reaction/drying_agent
results = list(/datum/reagent/drying_agent = 3)
required_reagents = list(/datum/reagent/stable_plasma = 2, /datum/reagent/consumable/ethanol = 1, /datum/reagent/sodium = 1)
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_UNIQUE
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_UNIQUE | REACTION_TAG_COMPONENT
//////////////////////////////////// Other goon stuff ///////////////////////////////////////////
/datum/chemical_reaction/acetone
results = list(/datum/reagent/acetone = 3)
required_reagents = list(/datum/reagent/fuel/oil = 1, /datum/reagent/fuel = 1, /datum/reagent/oxygen = 1)
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_CHEMICAL
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_CHEMICAL | REACTION_TAG_COMPONENT
/datum/chemical_reaction/carpet
results = list(/datum/reagent/carpet = 2)
@@ -526,18 +527,18 @@
/datum/chemical_reaction/oil
results = list(/datum/reagent/fuel/oil = 3)
required_reagents = list(/datum/reagent/fuel = 1, /datum/reagent/carbon = 1, /datum/reagent/hydrogen = 1)
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_CHEMICAL
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_CHEMICAL | REACTION_TAG_COMPONENT
/datum/chemical_reaction/phenol
results = list(/datum/reagent/phenol = 3)
required_reagents = list(/datum/reagent/water = 1, /datum/reagent/chlorine = 1, /datum/reagent/fuel/oil = 1)
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_CHEMICAL
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_CHEMICAL | REACTION_TAG_COMPONENT
/datum/chemical_reaction/ash
results = list(/datum/reagent/ash = 1)
required_reagents = list(/datum/reagent/fuel/oil = 1)
required_temp = 480
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_CHEMICAL | REACTION_TAG_PLANT
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_CHEMICAL | REACTION_TAG_PLANT | REACTION_TAG_COMPONENT
/datum/chemical_reaction/colorful_reagent
results = list(/datum/reagent/colorful_reagent = 5)
@@ -643,19 +644,19 @@
/datum/chemical_reaction/electrolysis
results = list(/datum/reagent/oxygen = 2.5, /datum/reagent/hydrogen = 5)
required_reagents = list(/datum/reagent/consumable/liquidelectricity = 1, /datum/reagent/water = 5)
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_CHEMICAL
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_UNIQUE
/datum/chemical_reaction/electrolysis2
results = list(/datum/reagent/oxygen = 2.5, /datum/reagent/hydrogen = 5)
required_reagents = list(/datum/reagent/consumable/liquidelectricity/enriched = 1, /datum/reagent/water = 5)
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_CHEMICAL
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_UNIQUE
//salt electrolysis
/datum/chemical_reaction/saltelectrolysis
results = list(/datum/reagent/chlorine = 2.5, /datum/reagent/sodium = 2.5)
required_reagents = list(/datum/reagent/consumable/salt = 5)
required_catalysts = list(/datum/reagent/consumable/liquidelectricity = 1)
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_CHEMICAL
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_UNIQUE
/datum/chemical_reaction/saltelectrolysis/enriched
required_catalysts = list(/datum/reagent/consumable/liquidelectricity/enriched = 1)
@@ -722,18 +723,18 @@
/datum/chemical_reaction/saltpetre
results = list(/datum/reagent/saltpetre = 3)
required_reagents = list(/datum/reagent/potassium = 1, /datum/reagent/nitrogen = 1, /datum/reagent/oxygen = 3)
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_PLANT
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_PLANT | REACTION_TAG_COMPONENT
/datum/chemical_reaction/lye
results = list(/datum/reagent/lye = 3)
required_reagents = list(/datum/reagent/sodium = 1, /datum/reagent/hydrogen = 1, /datum/reagent/oxygen = 1)
required_temp = 10 //So hercuri still shows life.
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_CHEMICAL
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_CHEMICAL | REACTION_TAG_COMPONENT
/datum/chemical_reaction/lye2
results = list(/datum/reagent/lye = 2)
required_reagents = list(/datum/reagent/ash = 1, /datum/reagent/water = 1, /datum/reagent/carbon = 1)
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_CHEMICAL
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_CHEMICAL | REACTION_TAG_COMPONENT
/datum/chemical_reaction/royal_bee_jelly
results = list(/datum/reagent/royal_bee_jelly = 5)
@@ -901,7 +902,7 @@
purity_min = 0
mix_message = "The solution freezes up into ice!"
reaction_flags = REACTION_COMPETITIVE
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_CHEMICAL | REACTION_TAG_DRINK
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_CHEMICAL | REACTION_TAG_DRINK | REACTION_TAG_COMPONENT | REACTION_TAG_ACTIVE
/datum/chemical_reaction/water
results = list(/datum/reagent/water = 0.92)//rough density excahnge
@@ -1092,5 +1093,3 @@
glitter.data["colors"] = list("[accumulated_color]" = 100)
glitter.color = accumulated_color
@@ -11,7 +11,7 @@
var/strengthdiv = 10
var/modifier = 0
reaction_flags = REACTION_INSTANT
reaction_tags = REACTION_TAG_EXPLOSIVE | REACTION_TAG_MODERATE | REACTION_TAG_DANGEROUS
reaction_tags = REACTION_TAG_EXPLOSIVE | REACTION_TAG_MODERATE | REACTION_TAG_DANGEROUS | REACTION_TAG_ACTIVE
required_temp = 0 //Prevent impromptu RPGs
// Only clear mob reagents in special cases
var/clear_mob_reagents = FALSE
@@ -189,7 +189,7 @@
/datum/chemical_reaction/gunpowder
results = list(/datum/reagent/gunpowder = 3)
required_reagents = list(/datum/reagent/saltpetre = 1, /datum/reagent/medicine/c2/multiver = 1, /datum/reagent/sulfur = 1)
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_EXPLOSIVE
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_EXPLOSIVE | REACTION_TAG_CHEMICAL
/datum/chemical_reaction/reagent_explosion/gunpowder_explosion
required_reagents = list(/datum/reagent/gunpowder = 1)
@@ -208,7 +208,7 @@
/datum/chemical_reaction/emp_pulse
required_reagents = list(/datum/reagent/uranium = 1, /datum/reagent/iron = 1, /datum/reagent/aluminium = 1)
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_EXPLOSIVE | REACTION_TAG_DANGEROUS
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_EXPLOSIVE | REACTION_TAG_DANGEROUS | REACTION_TAG_ACTIVE
/datum/chemical_reaction/emp_pulse/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume)
//pretending this reaction took two ingredients and not three for its effects
@@ -228,7 +228,7 @@
/datum/chemical_reaction/beesplosion
required_reagents = list(/datum/reagent/consumable/honey = 1, /datum/reagent/medicine/strange_reagent = 1, /datum/reagent/uranium/radium = 1)
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_EXPLOSIVE | REACTION_TAG_DANGEROUS
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_EXPLOSIVE | REACTION_TAG_DANGEROUS | REACTION_TAG_ACTIVE
/datum/chemical_reaction/beesplosion/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume)
var/location = holder.my_atom.drop_location()
@@ -251,7 +251,7 @@
/datum/chemical_reaction/stabilizing_agent
results = list(/datum/reagent/stabilizing_agent = 3)
required_reagents = list(/datum/reagent/iron = 1, /datum/reagent/oxygen = 1, /datum/reagent/hydrogen = 1)
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_EXPLOSIVE | REACTION_TAG_CHEMICAL | REACTION_TAG_PLANT
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_EXPLOSIVE | REACTION_TAG_CHEMICAL | REACTION_TAG_PLANT | REACTION_TAG_COMPONENT
/datum/chemical_reaction/clf3
results = list(/datum/reagent/clf3 = 4)
@@ -300,7 +300,7 @@
/datum/chemical_reaction/sorium_vortex
required_reagents = list(/datum/reagent/sorium = 1)
required_temp = 474
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_EXPLOSIVE | REACTION_TAG_DANGEROUS
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_EXPLOSIVE | REACTION_TAG_DANGEROUS | REACTION_TAG_ACTIVE
/datum/chemical_reaction/sorium_vortex/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume)
var/turf/T = get_turf(holder.my_atom)
@@ -323,7 +323,7 @@
/datum/chemical_reaction/ldm_vortex
required_reagents = list(/datum/reagent/liquid_dark_matter = 1)
required_temp = 474
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_EXPLOSIVE | REACTION_TAG_DANGEROUS
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_EXPLOSIVE | REACTION_TAG_DANGEROUS | REACTION_TAG_ACTIVE
/datum/chemical_reaction/ldm_vortex/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume)
var/turf/T = get_turf(holder.my_atom)
@@ -356,7 +356,7 @@
/datum/chemical_reaction/flash_powder_flash
required_reagents = list(/datum/reagent/flash_powder = 1)
required_temp = 374
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_EXPLOSIVE | REACTION_TAG_DANGEROUS
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_EXPLOSIVE | REACTION_TAG_DANGEROUS | REACTION_TAG_ACTIVE
/datum/chemical_reaction/flash_powder_flash/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume)
var/location = get_turf(holder.my_atom)
@@ -397,7 +397,7 @@
required_temp = 374
mob_react = FALSE
reaction_flags = REACTION_INSTANT
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_EXPLOSIVE | REACTION_TAG_DANGEROUS
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_EXPLOSIVE | REACTION_TAG_DANGEROUS | REACTION_TAG_ACTIVE
/datum/chemical_reaction/smoke_powder_smoke/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume)
var/location = get_turf(holder.my_atom)
@@ -427,7 +427,7 @@
/datum/chemical_reaction/sonic_powder_deafen
required_reagents = list(/datum/reagent/sonic_powder = 1)
required_temp = 374
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_EXPLOSIVE | REACTION_TAG_DANGEROUS
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_EXPLOSIVE | REACTION_TAG_DANGEROUS | REACTION_TAG_ACTIVE
/datum/chemical_reaction/sonic_powder_deafen/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume)
var/location = get_turf(holder.my_atom)
@@ -177,7 +177,7 @@
rate_up_lim = 10
purity_min = 0.7
reaction_flags = REACTION_PH_VOL_CONSTANT
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_DAMAGING | REACTION_TAG_PLANT | REACTION_TAG_OTHER
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_DAMAGING | REACTION_TAG_PLANT | REACTION_TAG_OTHER | REACTION_TAG_COMPONENT
/datum/chemical_reaction/lexorin
results = list(/datum/reagent/toxin/lexorin = 3)
@@ -204,7 +204,7 @@
required_reagents = list(/datum/reagent/toxin/hot_ice = 1)
required_temp = T0C + 30 //Don't burst into flames when you melt
thermic_constant = -200//Counter the heat
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_DAMAGING | REACTION_TAG_CHEMICAL | REACTION_TAG_TOXIN
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_DAMAGING | REACTION_TAG_CHEMICAL | REACTION_TAG_TOXIN | REACTION_TAG_ACTIVE
/datum/chemical_reaction/chloralhydrate
results = list(/datum/reagent/toxin/chloralhydrate = 1)