diff --git a/code/__defines/_reagents.dm b/code/__defines/_reagents.dm index d2257c07065..6bfb2457e62 100644 --- a/code/__defines/_reagents.dm +++ b/code/__defines/_reagents.dm @@ -83,7 +83,12 @@ #define REAGENT_ID_TUNGSTEN "tungsten" #define REAGENT_NUTRIMENT "Nutriment" #define REAGENT_ID_NUTRIMENT "nutriment" - +#define REAGENT_TITANIUM "Titanium" +#define REAGENT_ID_TITANIUM "titanium" +#define REAGENT_TITANIUMDIOX "Titanium dioxide" +#define REAGENT_ID_TITANIUMDIOX "titanium_diox" +#define REAGENT_TIN "Tin" +#define REAGENT_ID_TIN "tin" // Xeno chem react #define XENO_CHEM_NUTRI "nutr" diff --git a/code/__defines/refinery.dm b/code/__defines/refinery.dm new file mode 100644 index 00000000000..221c6b44b70 --- /dev/null +++ b/code/__defines/refinery.dm @@ -0,0 +1,52 @@ +#define REFINERY_SINTERING_SMOKE "FLAG_SMOKE" +#define REFINERY_SINTERING_EXPLODE "FLAG_EXPLODE" +#define REFINERY_SINTERING_SPIDERS "FLAG_SPIDERS" + +#define REFINERY_DEFAULT_TRANSFER_AMOUNTS list(0,1,2,5,10,15,20,25,30,40,60,80,100,120) +#define SHEET_TO_REAGENT_EQUIVILENT *(1/REAGENTS_PER_SHEET) // 0.05 normally 1/20 +// The tl;dr here is that the supply_conversion_value of the reagent should just match the per sheet value with the macro above. +// That should keep everything inline and not cause any cargo exploits. + +#define REFINERY_TUTORIAL_INPUT (1 << 0) +#define REFINERY_TUTORIAL_FILTER (1 << 1) +#define REFINERY_TUTORIAL_HUB (1 << 2) +#define REFINERY_TUTORIAL_NOPOWER (1 << 3) +#define REFINERY_TUTORIAL_NOINPUT (1 << 4) +#define REFINERY_TUTORIAL_NOOUTPUT (1 << 5) +#define REFINERY_TUTORIAL_ALLIN (1 << 6) +#define REFINERY_TUTORIAL_SINGLEOUTPUT (1 << 7) + +#define REAGENT_VAT_VOLUME 500 +#define CARGOTANKER_VOLUME 3000 + +// Use these, unless it had a sheet analog to match, VAL * 0.05 * 2000 = per full tank points +#define REFINERYEXPORT_VALUE_NO 0.1 SHEET_TO_REAGENT_EQUIVILENT // 10 per tank +#define REFINERYEXPORT_VALUE_UNWANTED 0.5 SHEET_TO_REAGENT_EQUIVILENT // 50 per tank +#define REFINERYEXPORT_VALUE_COMMON 1 SHEET_TO_REAGENT_EQUIVILENT // 100 per tank +#define REFINERYEXPORT_VALUE_RARE 2 SHEET_TO_REAGENT_EQUIVILENT // 200 per tank +#define REFINERYEXPORT_VALUE_PROCESSED 3 SHEET_TO_REAGENT_EQUIVILENT // 300 per tank +#define REFINERYEXPORT_VALUE_HIGHREFINED 4 SHEET_TO_REAGENT_EQUIVILENT // 400 per tank +#define REFINERYEXPORT_VALUE_MASSINDUSTRY 8 SHEET_TO_REAGENT_EQUIVILENT // 800 per tank +#define REFINERYEXPORT_VALUE_PEAK 16 SHEET_TO_REAGENT_EQUIVILENT // 1600 per tank +#define REFINERYEXPORT_VALUE_GODTIER 20 SHEET_TO_REAGENT_EQUIVILENT // 2000 per tank + +// Use these or you'll get weird endround lists +#define REFINERYEXPORT_REASON_BIOHAZARD "unwanted biohazards" +#define REFINERYEXPORT_REASON_RAW "raw industrial materials" +#define REFINERYEXPORT_REASON_PHORON "advanced phoronics research" +#define REFINERYEXPORT_REASON_DRUG "pharmaceutical drugs" +#define REFINERYEXPORT_REASON_ILLDRUG "illegal drugs" +#define REFINERYEXPORT_REASON_RECDRUG "widespread recreational drugs" +#define REFINERYEXPORT_REASON_CLONEDRUG "vat cloning stablizers" +#define REFINERYEXPORT_REASON_SPECIALDRUG "specialized high end drugs" +#define REFINERYEXPORT_REASON_DIET "dietary supplements" +#define REFINERYEXPORT_REASON_FOOD "culinary ingredients" +#define REFINERYEXPORT_REASON_MATSCI "material science research" +#define REFINERYEXPORT_REASON_MEDSCI "medical science research" +#define REFINERYEXPORT_REASON_INDUSTRY "heavy industrial materials" +#define REFINERYEXPORT_REASON_PRECURSOR "industrial precursor chemicals" +#define REFINERYEXPORT_REASON_WEAPONS "chemical weaponry" +#define REFINERYEXPORT_REASON_COMSTIM "combat stimulants" +#define REFINERYEXPORT_REASON_COSMETIC "cosmetic coatings and drugs" +#define REFINERYEXPORT_REASON_CLEAN "cleaning products" +#define REFINERYEXPORT_REASON_LUBE "industrial lubricants" diff --git a/code/__defines/research/techweb_nodes.dm b/code/__defines/research/techweb_nodes.dm index 1abbf3eb83f..5326651ffba 100644 --- a/code/__defines/research/techweb_nodes.dm +++ b/code/__defines/research/techweb_nodes.dm @@ -40,6 +40,7 @@ #define TECHWEB_NODE_DONK_PRODUCTS "donk_products" #define TECHWEB_NODE_ELECTRIC_WEAPONS "electric_weapons" #define TECHWEB_NODE_ENERGY_MANIPULATION "energy_manipulation" +#define TECHWEB_NODE_CHEM_REFINERY "chem_refinery" #define TECHWEB_NODE_EXODRONE "exodrone" #define TECHWEB_NODE_EXOTIC_AMMO "exotic_ammo" #define TECHWEB_NODE_EXP_TOOLS "exp_tools" diff --git a/code/_helpers/global_lists.dm b/code/_helpers/global_lists.dm index ebe9304618c..03a0c033d27 100644 --- a/code/_helpers/global_lists.dm +++ b/code/_helpers/global_lists.dm @@ -1476,8 +1476,44 @@ GLOBAL_LIST_INIT(ore_reagents, list( //have a number of reageents divisible by R /obj/item/ore/lead = list(REAGENT_ID_LEAD), /obj/item/ore/hydrogen = list(REAGENT_ID_HYDROGEN), /obj/item/ore/verdantium = list(REAGENT_ID_RADIUM,REAGENT_ID_PHORON,REAGENT_ID_NITROGEN,REAGENT_ID_PHOSPHORUS,REAGENT_ID_SODIUM), // Some fun stuff to be useful with - /obj/item/ore/rutile = list(REAGENT_ID_TUNGSTEN,REAGENT_ID_OXYGEN) // Should be titanium -)) + /obj/item/ore/rutile = list(REAGENT_ID_TITANIUMDIOX,REAGENT_ID_OXYGEN), + /obj/item/ore/copper = list(REAGENT_ID_COPPER), + /obj/item/ore/tin = list(REAGENT_ID_TIN), + /obj/item/ore/void_opal = list(REAGENT_ID_SILICON,REAGENT_ID_SILICON,REAGENT_ID_OXYGEN,REAGENT_ID_WATER), + /obj/item/ore/painite = list(REAGENT_ID_CALCIUM,REAGENT_ID_ALUMINIUM,REAGENT_ID_OXYGEN,REAGENT_ID_OXYGEN), + /obj/item/ore/quartz = list(REAGENT_ID_SILICON,REAGENT_ID_OXYGEN), + /obj/item/ore/bauxite = list(REAGENT_ID_ALUMINIUM,REAGENT_ID_ALUMINIUM), + )) + +// Don't need a new list for every grinder in the game +GLOBAL_LIST_INIT(reagent_sheets,list( // Recompressing reagents back into sheets + REAGENT_ID_COPPER = MAT_COPPER, + REAGENT_ID_TIN = MAT_TIN, + REAGENT_ID_WOODPULP = MAT_CARDBOARD, + REAGENT_ID_CARBON = MAT_GRAPHITE, + REAGENT_ID_ALUMINIUM = MAT_ALUMINIUM, + REAGENT_ID_TITANIUM = MAT_TITANIUM, + REAGENT_ID_IRON = MAT_IRON, + REAGENT_ID_LEAD = MAT_LEAD, + REAGENT_ID_URANIUM = MAT_URANIUM, + REAGENT_ID_GOLD = MAT_GOLD, + REAGENT_ID_SILVER = MAT_SILVER, + REAGENT_ID_PLATINUM = MAT_PLATINUM, + REAGENT_ID_SILICON = MAT_GLASS, + // Mostly harmless + REAGENT_ID_PROTEIN = REFINERY_SINTERING_SMOKE, + REAGENT_ID_TRIGLYCERIDE = REFINERY_SINTERING_SMOKE, + REAGENT_ID_SODIUM = REFINERY_SINTERING_SMOKE, + REAGENT_ID_PHOSPHORUS = REFINERY_SINTERING_SMOKE, + REAGENT_ID_ETHANOL = REFINERY_SINTERING_SMOKE, + // Extremely stupid ones + REAGENT_ID_OXYGEN = REFINERY_SINTERING_EXPLODE, + REAGENT_ID_HYDROGEN = REFINERY_SINTERING_EXPLODE, + REAGENT_ID_PHORON = REFINERY_SINTERING_EXPLODE, + REAGENT_ID_SUPERMATTER = REFINERY_SINTERING_EXPLODE, + // Nothing is funnier to me + REAGENT_ID_SPIDEREGG = REFINERY_SINTERING_SPIDERS, + )) //List of the ammo types that can be used in game. GLOBAL_LIST_INIT(global_ammo_types, list( diff --git a/code/_helpers/refinery.dm b/code/_helpers/refinery.dm new file mode 100644 index 00000000000..7d93b9190ea --- /dev/null +++ b/code/_helpers/refinery.dm @@ -0,0 +1,55 @@ +/// Grinds down various objects into their reagent components. Returns true if any reagents were gained from the attempt. +/proc/grind_items_to_reagents(var/list/holdingitems,var/datum/reagents/R) + var/start_volume = R.total_volume + + for(var/obj/item/O in holdingitems) + var/remaining_volume = R.maximum_volume - R.total_volume + if(remaining_volume <= 0) + break + + if(GLOB.sheet_reagents[O.type]) + var/obj/item/stack/stack = O + if(istype(stack)) + var/list/sheet_components = GLOB.sheet_reagents[stack.type] + var/amount_to_take = max(0,min(stack.get_amount(),round(remaining_volume/REAGENTS_PER_SHEET))) + if(amount_to_take) + stack.use(amount_to_take) + if(QDELETED(stack)) + holdingitems -= stack + if(islist(sheet_components)) + amount_to_take = (amount_to_take/(sheet_components.len)) + for(var/i in sheet_components) + R.add_reagent(i, (amount_to_take*REAGENTS_PER_SHEET)) + else + R.add_reagent(sheet_components, (amount_to_take*REAGENTS_PER_SHEET)) + continue + + else if(GLOB.ore_reagents[O.type]) + var/obj/item/ore/D = O + if(istype(D)) + var/list/ore_components = GLOB.ore_reagents[D.type] + if(remaining_volume >= REAGENTS_PER_ORE) + holdingitems -= D + qdel(D) + if(islist(ore_components)) + var/amount_to_take = (REAGENTS_PER_ORE/(ore_components.len)) + for(var/i in ore_components) + R.add_reagent(i, amount_to_take) + else + R.add_reagent(ore_components, REAGENTS_PER_ORE) + continue + + else if(O.reagents && O.reagents.total_volume > 0) + O.reagents.trans_to_obj(R.my_atom, min(O.reagents.total_volume, remaining_volume)) + if(O.reagents.total_volume == 0) + holdingitems -= O + qdel(O) + if (R.total_volume >= R.maximum_volume) + break + + else + // Cronch + holdingitems -= O + qdel(O) + + return (R.total_volume > start_volume) diff --git a/code/controllers/subsystems/internal_wiki.dm b/code/controllers/subsystems/internal_wiki.dm index 34429a27f43..bae4349bb5e 100644 --- a/code/controllers/subsystems/internal_wiki.dm +++ b/code/controllers/subsystems/internal_wiki.dm @@ -294,12 +294,10 @@ SUBSYSTEM_DEF(internal_wiki) var/list/assemble_reaction = list() assemble_reaction["temp_min"] = CR.temp_range[1] assemble_reaction["temp_max"] = CR.temp_range[2] - /* Downstream features assemble_reaction["xgm_min"] = CR.minimum_xgm_pressure assemble_reaction["xgm_max"] = CR.maximum_xgm_pressure - assemble_reaction["require_xgm_gas"] = CR.require_xgm_gas - assemble_reaction["rejects_xgm_gas"] = CR.rejects_xgm_gas - */ + assemble_reaction["require_xgm_gas"] = CR.require_xgm_gas ? GLOB.gas_data.name[CR.require_xgm_gas] : null + assemble_reaction["rejects_xgm_gas"] = CR.rejects_xgm_gas ? GLOB.gas_data.name[CR.rejects_xgm_gas] : null var/list/reqs = list() for(var/RQ in CR.required_reagents) var/decl/chemical_reaction/r_RQ = SSchemistry.chemical_reagents[RQ] @@ -431,6 +429,15 @@ SUBSYSTEM_DEF(internal_wiki) return allergies return null +/datum/controller/subsystem/internal_wiki/proc/assemble_sintering(var/sinter) + if(sinter == REFINERY_SINTERING_EXPLODE) + return "violent detonation" + if(sinter == REFINERY_SINTERING_SMOKE) + return "toxic fumes" + if(sinter == REFINERY_SINTERING_SPIDERS) + return "OH GOD WHY!?" + return sinter + /datum/controller/subsystem/internal_wiki/proc/add_icon(var/list/data, var/ic, var/is, var/col) var/load_data = list() load_data["icon"] = ic // dmi path @@ -1148,14 +1155,12 @@ SUBSYSTEM_DEF(internal_wiki) data["addictive"] = 0 if(R.id in get_addictive_reagents(ADDICT_ALL)) data["addictive"] = TRUE - /* Downstream features data["industrial_use"] = R.industrial_use data["supply_points"] = R.supply_conversion_value ? R.supply_conversion_value : 0 var/value = R.supply_conversion_value * REAGENTS_PER_SHEET * SSsupply.points_per_money value = FLOOR(value * 100,1) / 100 // Truncate decimals data["market_price"] = value - data["sintering"] = global.reagent_sheets[R.id] - */ + data["sintering"] = SSinternal_wiki.assemble_sintering(GLOB.reagent_sheets[R.id]) data["overdose"] = R.overdose data["flavor"] = R.taste_description data["allergen"] = SSinternal_wiki.assemble_allergens(R.allergen_type) @@ -1166,7 +1171,6 @@ SUBSYSTEM_DEF(internal_wiki) body += "Description: [data["description"]]
" if(data["addictive"]) body += "DANGER, addictive.
" - /* Downstream features if(data["industrial_use"]) body += "Industrial Use: [data["industrial_use"]]
" var/tank_size = CARGOTANKER_VOLUME @@ -1177,16 +1181,16 @@ SUBSYSTEM_DEF(internal_wiki) if(data["sintering"]) var/mat_id = data["sintering"] switch(mat_id) - if("FLAG_SMOKE") + if(REFINERY_SINTERING_SMOKE) body += "Sintering Results: COMBUSTION
" - if("FLAG_EXPLODE") + if(REFINERY_SINTERING_EXPLODE) body += "Sintering Results: DETONATION
" - if("FLAG_SPIDERS") + if(REFINERY_SINTERING_SPIDERS) body += "Sintering Results: DO NOT EVER
" else var/datum/material/C = get_material_by_name(data["sintering"]) - body += "Sintering Results: [C.display_name] [C.sheet_plural_name]
" - */ + if(C) + body += "Sintering Results: [C.display_name] [C.sheet_plural_name]
" if(data["overdose"] > 0) body += "Overdose: [data["overdose"]]u
" body += "Flavor: [data["flavor"]]
" @@ -1569,13 +1573,11 @@ SUBSYSTEM_DEF(internal_wiki) else body += "Potential Chemical breakdown [segment]:
" segment++ - /* Downstream features body += " -Temperature: [react["xgm_min"]]K - [react["xgm_max"]]K | ([react["xgm_min"] - T0C]C - [react["xgm_max"] - T0C]C)
" if(react["require_xgm_gas"]) - body += " -Requires Gas: [react["require_xgm_gas"])]
" + body += " -Requires Gas: [react["require_xgm_gas"]]
" if(react["rejects_xgm_gas"]) body += " -Rejects Gas: [react["rejects_xgm_gas"]]
" - */ for(var/RQ in react["required"]) body += " -Component: [RQ]
" for(var/IH in react["inhibitor"]) diff --git a/code/datums/components/antags/changeling/powers/epinephrine_overdose.dm b/code/datums/components/antags/changeling/powers/epinephrine_overdose.dm index 38177dc9560..7dbab675632 100644 --- a/code/datums/components/antags/changeling/powers/epinephrine_overdose.dm +++ b/code/datums/components/antags/changeling/powers/epinephrine_overdose.dm @@ -52,6 +52,8 @@ color = "#C8A5DC" metabolism = REM * 2 wiki_flag = WIKI_SPOILER + supply_conversion_value = REFINERYEXPORT_VALUE_RARE + industrial_use = REFINERYEXPORT_REASON_MATSCI /datum/reagent/epinephrine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) diff --git a/code/datums/components/reagent_hose/item.dm b/code/datums/components/reagent_hose/item.dm index b250a077173..3151261b69b 100644 --- a/code/datums/components/reagent_hose/item.dm +++ b/code/datums/components/reagent_hose/item.dm @@ -103,6 +103,7 @@ return else - to_chat(user, span_notice("There are no available connectors on \the [target]. You wind \the [src] back up.")) + if(remembered) + to_chat(user, span_notice("There are no available connectors on \the [target]. You wind \the [src] back up.")) remembered = null // Unintuitive if it does not reset state ..() diff --git a/code/datums/elements/sellable.dm b/code/datums/elements/sellable.dm index 23be2312c0b..1630072f9eb 100644 --- a/code/datums/elements/sellable.dm +++ b/code/datums/elements/sellable.dm @@ -122,3 +122,53 @@ /datum/element/sellable/vaccine/calculate_sell_value(obj/source) return 5 + + +// Refinery chemical tanks +/datum/element/sellable/trolley_tank + sale_info = "This can be sold on the cargo shuttle if filled with a single reagent." + needs_crate = FALSE + +/datum/element/sellable/trolley_tank/sell_error(obj/source) + var/obj/vehicle/train/trolley_tank/tank = source + if(!tank.reagents || tank.reagents.reagent_list.len == 0) + return "Error: Product was not filled with any reagents to sell. Payment rendered null under terms of agreement." + var/min_tank = (CARGOTANKER_VOLUME - 100) + if(tank.reagents.total_volume < min_tank) + return "Error: Product was improperly packaged. Send full tanks only (minimum [min_tank] units). Payment rendered null under terms of agreement." + if(tank.reagents.reagent_list.len > 1) + return "Error: Product was improperly refined. Send purified mixtures only (too many reagents in tank). Payment rendered null under terms of agreement." + return null + +/datum/element/sellable/trolley_tank/calculate_sell_value(obj/source) + var/obj/vehicle/train/trolley_tank/tank = source + + // Update export values + var/datum/reagent/R = tank.reagents.reagent_list[1] + var/reagent_value = FLOOR(R.volume * R.supply_conversion_value, 1) + + return reagent_value + +/datum/element/sellable/trolley_tank/calculate_sell_quantity(obj/source) + var/obj/vehicle/train/trolley_tank/tank = source + if(!tank.reagents || tank.reagents.reagent_list.len == 0) + return "0u " + var/datum/reagent/R = tank.reagents.reagent_list[1] + return "[R.name] [tank.reagents.total_volume]u " + +/datum/element/sellable/trolley_tank/sell(obj/source, var/datum/exported_crate/EC, var/in_crate) + . = ..() + var/obj/vehicle/train/trolley_tank/tank = source + if(. && tank.reagents?.reagent_list?.len) + // Update end round data, has nothing to do with actual cargo sales + var/datum/reagent/R = tank.reagents.reagent_list[1] + var/reagent_value = FLOOR(R.volume * R.supply_conversion_value, 1) + if(R.industrial_use) + if(isnull(GLOB.refined_chems_sold[R.industrial_use])) + var/list/data = list() + data["units"] = FLOOR(R.volume, 1) + data["value"] = reagent_value + GLOB.refined_chems_sold[R.industrial_use] = data + else + GLOB.refined_chems_sold[R.industrial_use]["units"] += FLOOR(R.volume, 1) + GLOB.refined_chems_sold[R.industrial_use]["value"] += reagent_value diff --git a/code/datums/roundstats/roundstats.dm b/code/datums/roundstats/roundstats.dm index 1b80cf31cad..64cb6d50059 100644 --- a/code/datums/roundstats/roundstats.dm +++ b/code/datums/roundstats/roundstats.dm @@ -26,7 +26,7 @@ GLOBAL_VAR_INIT(prey_absorbed_roundstat, 0) //VOREStation Edit - Obviously GLOBAL_VAR_INIT(prey_digested_roundstat, 0) //VOREStation Edit - Obviously GLOBAL_VAR_INIT(items_digested_roundstat, 0) //VOREStation Edit - Obviously GLOBAL_LIST_EMPTY(security_printer_tickets) //VOREStation Edit - +GLOBAL_LIST_EMPTY(refined_chems_sold) /hook/roundend/proc/RoundTrivia()//bazinga var/list/valid_stats_list = list() //This is to be populated with the good shit @@ -72,7 +72,6 @@ GLOBAL_LIST_EMPTY(security_printer_tickets) //VOREStation Edit else good_num = 0 - //VOREStation Add Start - Vore stats lets gooooo if(GLOB.prey_eaten_roundstat > 0) valid_stats_list.Add("A total of [GLOB.prey_eaten_roundstat] individuals were eaten today!") if(GLOB.prey_digested_roundstat > 0) @@ -81,7 +80,24 @@ GLOBAL_LIST_EMPTY(security_printer_tickets) //VOREStation Edit valid_stats_list.Add("A total of [GLOB.prey_absorbed_roundstat] individuals were absorbed today!") if(GLOB.items_digested_roundstat > 0) valid_stats_list.Add("A total of [GLOB.items_digested_roundstat] items were digested today!") - //VOREStation Add End + + var/points = 0 + var/units = 0 + if(GLOB.refined_chems_sold && GLOB.refined_chems_sold.len > 0) + valid_stats_list.Add(span_warning("The station exported:")) + + for(var/D in GLOB.refined_chems_sold) + units += GLOB.refined_chems_sold[D]["units"] + points += GLOB.refined_chems_sold[D]["value"] + + if(GLOB.refined_chems_sold[D]["units"] >= 1000) // Don't spam the list + var/dols = GLOB.refined_chems_sold[D]["value"] * SSsupply.points_per_money + dols = FLOOR(dols * 100,1) / 100 // Truncate decimals + valid_stats_list.Add("[GLOB.refined_chems_sold[D]["units"]]u of [D], for [GLOB.refined_chems_sold[D]["value"]] points! A total of [dols] [dols > 1 ? "thalers" : "thaler"]") + + var/end_dols = points * SSsupply.points_per_money + end_dols = FLOOR(end_dols * 100,1) / 100 // Truncate decimals + valid_stats_list.Add("For a total of: [points] points, or [end_dols] [end_dols > 1 ? "thalers" : "thaler"]!") if(LAZYLEN(valid_stats_list)) to_world(span_world("Shift trivia!")) diff --git a/code/datums/supplypacks/supply.dm b/code/datums/supplypacks/supply.dm index e3f408ddd5d..aef9846d156 100644 --- a/code/datums/supplypacks/supply.dm +++ b/code/datums/supplypacks/supply.dm @@ -168,6 +168,20 @@ contains = list(/obj/vehicle/train/trolley) cost = 15 +/datum/supply_pack/supply/cargotank + name = "Cargo Train Tanker" + desc = "A cargo train tanker. For selling large volumes of a reagent." + contains = list(/obj/vehicle/train/trolley_tank) + cost = 15 + +/datum/supply_pack/supply/freezer + name = "Freezer crate" + desc = "An empty freezer for storing perishable items." + contains = list() + cost = 20 + containertype = /obj/structure/closet/crate/freezer + containername = "Freezer crate" + /datum/supply_pack/explorergear name= JOB_EXPLORER + " gear" desc = "Standard issue equipment for Explorers. Requires EVA and Exploration access." diff --git a/code/game/machinery/frame.dm b/code/game/machinery/frame.dm index d41491f22ff..89281eca65f 100644 --- a/code/game/machinery/frame.dm +++ b/code/game/machinery/frame.dm @@ -216,6 +216,52 @@ GLOBAL_LIST(construction_frame_floor) circuit = /obj/machinery/atmospheric_field_generator frame_size = 3 +// Refinery machines +/datum/frame/frame_types/industrial_reagent_grinder + name = "Industrial Chemical Grinder" + icon_override = 'icons/obj/stock_parts_refinery.dmi' + frame_class = FRAME_CLASS_MACHINE + +/datum/frame/frame_types/industrial_reagent_pump + name = "Industrial Chemical Pump" + icon_override = 'icons/obj/stock_parts_refinery.dmi' + frame_class = FRAME_CLASS_MACHINE + +/datum/frame/frame_types/industrial_reagent_filter + name = "Industrial Chemical Filter" + icon_override = 'icons/obj/stock_parts_refinery.dmi' + frame_class = FRAME_CLASS_MACHINE + +/datum/frame/frame_types/industrial_reagent_vat + name = "Industrial Chemical Vat" + icon_override = 'icons/obj/stock_parts_refinery.dmi' + frame_class = FRAME_CLASS_MACHINE + +/datum/frame/frame_types/industrial_reagent_pipe + name = "Industrial Chemical Pipe" + icon_override = 'icons/obj/stock_parts_refinery.dmi' + frame_class = FRAME_CLASS_MACHINE + +/datum/frame/frame_types/industrial_reagent_waste_processor + name = "Industrial Chemical Waste Processor" + icon_override = 'icons/obj/stock_parts_refinery.dmi' + frame_class = FRAME_CLASS_MACHINE + +/datum/frame/frame_types/industrial_reagent_hub + name = "Industrial Chemical Hub" + icon_override = 'icons/obj/stock_parts_refinery.dmi' + frame_class = FRAME_CLASS_MACHINE + +/datum/frame/frame_types/industrial_reagent_reactor + name = "Industrial Chemical Reactor" + icon_override = 'icons/obj/stock_parts_refinery.dmi' + frame_class = FRAME_CLASS_MACHINE + +/datum/frame/frame_types/industrial_reagent_furnace + name = "Industrial Chemical Sintering Furnace" + icon_override = 'icons/obj/stock_parts_refinery.dmi' + frame_class = FRAME_CLASS_MACHINE + ////////////////////////////// // Frame Object (Structure) ////////////////////////////// diff --git a/code/game/objects/items/weapons/circuitboards/frame.dm b/code/game/objects/items/weapons/circuitboards/frame.dm index dcf8b91451e..e721c7de0a2 100644 --- a/code/game/objects/items/weapons/circuitboards/frame.dm +++ b/code/game/objects/items/weapons/circuitboards/frame.dm @@ -291,3 +291,108 @@ /obj/item/stock_parts/micro_laser = 1, /obj/item/stock_parts/console_screen = 1 ) + +// Smart centrifuge +/obj/item/circuitboard/smart_centrifuge + name = T_BOARD("smart centrifuge") + build_path = /obj/machinery/smart_centrifuge + board_type = new /datum/frame/frame_types/machine + matter = list(MAT_STEEL = 50, MAT_GLASS = 50) + origin_tech = list(TECH_MAGNET = 3, TECH_DATA = 2, TECH_MATERIAL = 3) + req_components = list( + /obj/item/stock_parts/scanning_module = 1, + /obj/item/stock_parts/motor = 1, + /obj/item/stock_parts/gear = 3, + /obj/item/stack/material/glass/reinforced = 1) + +// Refinery machines +/obj/item/circuitboard/industrial_reagent_grinder + name = T_BOARD("industrial chemical grinder") + build_path = /obj/machinery/reagent_refinery/grinder + board_type = new /datum/frame/frame_types/industrial_reagent_grinder + req_components = list( + /obj/item/stock_parts/capacitor = 1, + /obj/item/stock_parts/motor = 2, + /obj/item/stock_parts/gear = 2, + /obj/item/reagent_containers/glass/beaker/large = 1) + +/obj/item/circuitboard/industrial_reagent_pump + name = T_BOARD("industrial chemical pump") + build_path = /obj/machinery/reagent_refinery/pump + board_type = new /datum/frame/frame_types/industrial_reagent_pump + req_components = list( + /obj/item/stock_parts/motor = 1, + /obj/item/stack/material/glass/reinforced = 1) + +/obj/item/circuitboard/industrial_reagent_filter + name = T_BOARD("industrial chemical filter") + build_path = /obj/machinery/reagent_refinery/filter + board_type = new /datum/frame/frame_types/industrial_reagent_filter + req_components = list( + /obj/item/stock_parts/motor = 1, + /obj/item/stock_parts/scanning_module = 1, + /obj/item/stock_parts/motor = 1, + /obj/item/stock_parts/gear = 1, + /obj/item/stack/material/glass/reinforced = 1) + +/obj/item/circuitboard/industrial_reagent_vat + name = T_BOARD("industrial chemical vat") + build_path = /obj/machinery/reagent_refinery/vat + board_type = new /datum/frame/frame_types/industrial_reagent_vat + req_components = list( + /obj/item/stock_parts/motor = 1, + /obj/item/stack/material/glass/reinforced = 1) + +/obj/item/circuitboard/industrial_reagent_pipe + name = T_BOARD("industrial chemical pipe") + build_path = /obj/machinery/reagent_refinery/pipe + board_type = new /datum/frame/frame_types/industrial_reagent_pipe + req_components = list( /obj/item/stack/material/glass/reinforced = 1) + +/obj/item/circuitboard/industrial_reagent_waste_processor + name = T_BOARD("industrial chemical waste processor") + build_path = /obj/machinery/reagent_refinery/waste_processor + board_type = new /datum/frame/frame_types/industrial_reagent_waste_processor + req_components = list( + /obj/item/stock_parts/capacitor = 4, + /obj/item/stock_parts/micro_laser = 4, + /obj/item/stock_parts/manipulator = 1, + /obj/item/stack/material/glass/reinforced = 1) + +/obj/item/circuitboard/industrial_reagent_hub + name = T_BOARD("industrial chemical hub") + build_path = /obj/machinery/reagent_refinery/hub + board_type = new /datum/frame/frame_types/industrial_reagent_hub + req_components = list( + /obj/item/stock_parts/motor = 1, + /obj/item/stock_parts/manipulator = 1) + +/obj/item/circuitboard/industrial_reagent_reactor + name = T_BOARD("industrial chemical reactor") + build_path = /obj/machinery/reagent_refinery/reactor + board_type = new /datum/frame/frame_types/industrial_reagent_reactor + req_components = list( + /obj/item/stock_parts/motor = 1, + /obj/item/stock_parts/capacitor = 4, + /obj/item/stock_parts/micro_laser = 4, + /obj/item/stock_parts/manipulator = 1, + /obj/item/stack/material/glass/reinforced = 1) + +/obj/item/circuitboard/industrial_reagent_furnace + name = T_BOARD("industrial chemical sintering furnace") + build_path = /obj/machinery/reagent_refinery/furnace + board_type = new /datum/frame/frame_types/industrial_reagent_furnace + req_components = list( + /obj/item/stock_parts/motor = 2, + /obj/item/stock_parts/capacitor = 4, + /obj/item/stock_parts/scanning_module = 1, + /obj/item/stock_parts/manipulator = 1, + /obj/item/stock_parts/gear = 2) + +/obj/item/circuitboard/pump_relay + name = T_BOARD("pump relay") + build_path = /obj/machinery/pump_relay + board_type = new /datum/frame/frame_types/machine + req_components = list( + /obj/item/stock_parts/capacitor = 1, + /obj/item/stock_parts/motor = 1) diff --git a/code/game/objects/items/weapons/manuals.dm b/code/game/objects/items/weapons/manuals.dm index b6ddf773d5a..530f73a0a16 100644 --- a/code/game/objects/items/weapons/manuals.dm +++ b/code/game/objects/items/weapons/manuals.dm @@ -1670,3 +1670,76 @@ "} + + +// Chemical Refinery +/obj/item/book/manual/chem_refinery + name = "Chemical Refinery Basic Operations" + icon_state ="bookrefinery" + item_state = "book15" + author = "Engineering Encyclopedia" + title = "Chemical Refinery Basic Operations" + + dat = {" + + + + +

OPERATING MANUAL FOR MK 1 INDUSTRIAL REAGENT REFINERY EQUIPMENT

+
+

OPERATING PRINCIPLES

+

The chemical refinery is not a single machine, but instead many machines connected together to perform the complex, multi-step, reactions needed for production of high value industrial reagents for export from the station.

+

Unlike a traditional chemistry department where reagents are created at small scales for local use; A chemical refinery is often dedicated to one or two types of reagents, produced at massive quantities. Each cargo train tanker will need to be filled full of a single reagent to be properly sold by cargo.

+

To achieve this, the refinery has many unique machines, each with a role to play. Multiple of the same type of machine will often be needed. As reagents often need many steps to filter and react them to their final forms.

+
+

MACHINERY OVERVIEW

+

In order of importance in refinery operations:

+

Pipes:

+

Pipes form the inexpensive backbone of reagent transfer in a refinery, and connect more complex modules of a refinery together. Pipes do not require power to transport reagents, but do so only in one direction. The red pipe marks an input connection from another machine. Arrows are also pressed into the hull of the pipe to indicate flow.

+ +

Filters:

+

Similar to pipes, a filter allows reagents to flow from one machine to the next. With a red pipe as input. Once reagents are present in a filter, one of them may be chosen. Once chosen the reagent will be filtered to the purple marked outlet on the filter's side. The filter will not move any reagents if no filtered reagent is selected. It can also be configured to filter out nothing, or everything, if the filter is being used as a way divert flow or purge upstream machinery.

+ +

Hubs:

+

Hubs are an automatic quick connect solution to pumping reagents from the refinery into cargo train tankers. Once a tanker is moved onto a hub's pad, it will begin filling or draining after a small delay. A hub's mode of operation depends entirely on if a machine's output points into it, or not. If a machine's output points into a hub, it will fill cargo tankers on the pad. If the hub connects to a machine's input instead, it will drain cargo tankers into that machine.

+ +

Grinders:

+

Solid materials such as metal sheets, ores, and plants may be ground down for use in the refinery. Though this method of reagent production is generally slower, and requires manual input. The grinder only has a single output.

+ +

Vats:

+

Vats are your primary reagent storage tanks. They hold large volumes of reagents. Like any part of the refinery, once reagents are flowing inside them, they can react with other reagents. Separation, filtering, and careful mixing is critical for the construction of a seamlessly operating refinery. Vats only have a single output, all other sides are considered inputs.

+ +

Reactors:

+

Reactors are the most complex machine in the refinery. It is capable of distilling reagents that require complex atmospheric conditions. A reactor only has a single output, all other sides are considered inputs. Reagents inside a reactor are separated into internal pressurized tanks, and only react during the machine's distillation cycle. The reactor will automatically shift between pumping and distilling once it detects chemical input. The results will often require filtering and reprocessing, as the input reagents are used to flush the reaction chamber each cycle.

+

Reactors are compatible with portable atmospherics pads, and may be anchored on top of one to automatically connect it to a gas network. The gas network will provide the specific pressure and temperature required for the reaction within the machine. Many reactions require specific conditions to progress, and some input reagents may have different reactions depending on temperature and gas composition. Consult a trained chemist for insights on enhancing your refinery layout.

+ +

Sintering Furnaces:

+

Sintering is the process of heating a material under high pressure, causing it to weld together into a cohesive form. Unfortunately, this can only be done with pure materials, as the correctly mixed ratios required for proper alloy production are not possible. Only base materials such as iron, gold, or silver may be formed. Though some reagents may produce other results. It is inadvisable to attempt sintering on flammable or explosive reagents.

+ +

Pumps:

+

Pumps allow for the high volume exchange of reagents from one machine to another, but they are also useful for their multiple hose connectors. Allowing you to pump reagents from any other hose connector equipped tool. With this feature, they can serve as the input connection for long distance fracking networks.

+ +

Fluid Pumps:

+

While not directly a refinery machine, they serve a core function outside of the refinery. Fluid pumps will extract eroded ores from bodies of water near mineral rich deposits. Discussion of high value ores with an experienced miner is recommended. Ores must remain intact near a body of water to be collected by the pump.

+

Fluid pumps operate on an internal power cell, protected behind a water proof panel. A crowbar is handy for opening it. Hoses can be connected to a fluid pump, allowing it to connect to long distance tube networks.

+

Rarely, large cracks can be found underground, these complex networks of micro fractures can be pumped and drained repeatedly to expand them, and extract the dissolved ores deep within the ground. This process is described as fracking.

+ +

Pump Relay:

+

The location of external fluid pumps are often very far away from the chemical refinery they are destined for. Pump relays allow two input hoses, and one output hose. Active as a passive, no power required pump. Using the pressure of the other pumps at the head of the network. Pump relays may be spaced far apart, unlike refinery piping, saving crews time and expensive parts.

+ +

Waste Processors:

+

Many reagents have little use in huge quantities, such as water from a pumped river. This waste reagent may be disposed of quickly in a waste processor. Shredding it to an atomic level and dispersing it through nearby bluespace. Similar to what happens to opens dropped out of a shuttles bluespace shielding during flight.

+ +
+

OPERATIONAL GOALS

+

With the provided knowledge, anything is possible with the right reagents and machines. Reagents produced by the refinery are intended for sale from the station's cargo department. Reagents must be sold pure, and in a full cargo tanker. Each reagent has a different value and purpose on the market. For methods of reagent production, consult a trained chemist, or one of our trusted exonet partners; Such as BINGLE.

+ + + "} diff --git a/code/game/turfs/flooring/gas_cracks.dm b/code/game/turfs/flooring/gas_cracks.dm new file mode 100644 index 00000000000..2adbf8728c8 --- /dev/null +++ b/code/game/turfs/flooring/gas_cracks.dm @@ -0,0 +1,224 @@ +/************************************************************************ + * Mapper information: + * Intended for POI spawns, surrounded by mineral turf walls that DO NOT CAVEGEN + * These turfs must be surrounded by atmos of the exact same type, or be isolated + * by walls. They may be placed next to eachother freely. They do not use the planet's + * atmos. They start as compressed pockets of gas for miners to uncover. + * + * If these are given a /sif or other planet override they should be safe to use anywhere. + * As these cracks do not produce gas on their own. They just have the atmos at init, and + * produce gas when mined with a deep drill rig. + * + * Be careful when mapping them to avoid active edges. +************************************************************************/ + +/turf/simulated/floor/gas_crack + icon = 'icons/turf/flooring/asteroid.dmi' + desc = "Rough sand with a huge crack. It seems to be nothing in particular." + description_info = "Fluid pumps can be used to frack for reagents in nearby ores, and a mining drill can also bore through trapped gas deposits beneath it." + name = "cracked sand" + icon_state = "asteroid_cracked" + initial_flooring = /decl/flooring/rock + var/list/gas_type = null + oxygen = 0 + nitrogen = 0 + + // Fracking results for fluid pump + var/static/list/ore_types = list( + ORE_HEMATITE = list(REAGENT_ID_SILICATE,REAGENT_ID_IRON,REAGENT_ID_CARBON), + ORE_URANIUM = list(REAGENT_ID_RADIUM,REAGENT_ID_RADIUM,REAGENT_ID_CALCIUM,REAGENT_ID_PHOSPHORUS), // Doesn't produce uranium due to low use in reagents, and emp reaction + ORE_COPPER = list(REAGENT_ID_GOLD,REAGENT_ID_COPPER,REAGENT_ID_LEAD), // Commonly + ORE_GOLD = list(REAGENT_ID_GOLD,REAGENT_ID_COPPER,REAGENT_ID_LEAD), // Found + ORE_TIN = list(REAGENT_ID_GOLD,REAGENT_ID_COPPER,REAGENT_ID_LEAD), // Together + ORE_SILVER = list(REAGENT_ID_SILVER,REAGENT_ID_LEAD,REAGENT_ID_COPPER), // lead loves this one too + ORE_DIAMOND = list(REAGENT_ID_TITANIUMDIOX,REAGENT_ID_PHOSPHORUS,REAGENT_ID_SULFUR,REAGENT_ID_CARBON), // Ignius process + ORE_PHORON = list(REAGENT_ID_PHORON,REAGENT_ID_RADIUM,REAGENT_ID_PHOSPHORUS,REAGENT_ID_SULFUR), // Ignius heavymetals? + ORE_PLATINUM = list(REAGENT_ID_PLATINUM,REAGENT_ID_COPPER), // Don't have much to group it with + ORE_MHYDROGEN = list(REAGENT_ID_SILICATE,REAGENT_ID_HYDROGEN), + ORE_SAND = list(REAGENT_ID_SILICATE,REAGENT_ID_SILICON,REAGENT_ID_LITHIUM,REAGENT_ID_PHOSPHORUS,REAGENT_ID_CALCIUM,REAGENT_ID_SODIUMCHLORIDE,REAGENT_ID_CARBON), // Catch all sedimentry + ORE_CARBON = list(REAGENT_ID_SILICATE,REAGENT_ID_CARBON,REAGENT_ID_SODIUMCHLORIDE), // Salty coal + ORE_BAUXITE = list(REAGENT_ID_TITANIUMDIOX,REAGENT_ID_ALUMINIUM,REAGENT_ID_SODIUMCHLORIDE), // ore's general components and neighbours + ORE_RUTILE = list(REAGENT_ID_TITANIUMDIOX,REAGENT_ID_SILICATE,REAGENT_ID_SILICON,REAGENT_ID_SODIUMCHLORIDE) // ore's general components and neighbours + ) + +/turf/simulated/floor/gas_crack/pump_reagents(var/datum/reagents/R, var/volume) + // pick random turfs in range, then use their deep ores to get some extra reagents + var/i = 0 + while(i++ < 4) // Do this a few times + var/turf/simulated/mineral/M = pick(orange(5,src)) + if(!istype(M)) + return + for(var/metal in ore_types) + if(!M.resources[metal]) + return + var/list/ore_list = ore_types[metal] + if(!ore_list || !ore_list.len) + return + if(prob(60)) + var/reagent_id = pick(ore_list) + R.add_reagent(reagent_id, round(volume, 0.1)) + + +/turf/simulated/floor/gas_crack/oxygen + gas_type = list(GAS_O2) + oxygen = 500 + +/turf/simulated/floor/gas_crack/oxygen/pump_reagents(var/datum/reagents/R, var/volume) + . = ..() + R.add_reagent(REAGENT_ID_OXYGEN, round(volume / 2, 0.1)) + +/turf/simulated/floor/gas_crack/oxygen/examine(mob/user) + . = ..() + . += "A strong breeze blows through it." + + +/turf/simulated/floor/gas_crack/nitrogen + gas_type = list(GAS_N2) + nitrogen = 500 + +/turf/simulated/floor/gas_crack/nitrogen/pump_reagents(var/datum/reagents/R, var/volume) + . = ..() + R.add_reagent(REAGENT_ID_NITROGEN, round(volume / 2, 0.1)) + +/turf/simulated/floor/gas_crack/nitrogen/examine(mob/user) + . = ..() + . += "A stale breeze blows through it." + +/turf/simulated/floor/gas_crack/carbon + gas_type = list(GAS_CO2) + carbon_dioxide = 500 + +/turf/simulated/floor/gas_crack/carbon/pump_reagents(var/datum/reagents/R, var/volume) + . = ..() + R.add_reagent(REAGENT_ID_CARBON, round(volume / 2, 0.1)) + +/turf/simulated/floor/gas_crack/carbon/examine(mob/user) + . = ..() + . += "A warm breeze blows through it." + +/turf/simulated/floor/gas_crack/nitro + gas_type = list(GAS_N2O) + nitrogen = 250 + carbon_dioxide = 250 + +/turf/simulated/floor/gas_crack/nitro/pump_reagents(var/datum/reagents/R, var/volume) + . = ..() + R.add_reagent(REAGENT_ID_OXYGEN, round(volume / 3, 0.1)) + R.add_reagent(REAGENT_ID_NITROGEN, round(volume / 3, 0.1)) + +/turf/simulated/floor/gas_crack/nitro/examine(mob/user) + . = ..() + . += "A strange smell wafts from beneath it." + +/turf/simulated/floor/gas_crack/phoron + gas_type = list(GAS_PHORON) + phoron = 500 + +/turf/simulated/floor/gas_crack/phoron/pump_reagents(var/datum/reagents/R, var/volume) + . = ..() + R.add_reagent(REAGENT_ID_PHORON, round(volume / 3, 0.1)) + +/turf/simulated/floor/gas_crack/phoron/examine(mob/user) + . = ..() + . += "A terrible smell wafts from beneath it." + +/turf/simulated/floor/gas_crack/air + gas_type = list(GAS_O2,GAS_N2) + oxygen = 250 + nitrogen = 250 + +/turf/simulated/floor/gas_crack/air/pump_reagents(var/datum/reagents/R, var/volume) + . = ..() + R.add_reagent(REAGENT_ID_OXYGEN, round(volume / 2, 0.1)) + R.add_reagent(REAGENT_ID_NITROGEN, round(volume / 2, 0.1)) + +/turf/simulated/floor/gas_crack/air/examine(mob/user) + . = ..() + . += "A fresh breeze blows through it." + + +/turf/simulated/floor/gas_crack/terrible + gas_type = list(GAS_CO2,GAS_PHORON,GAS_N2O) + carbon_dioxide = 250 + phoron = 250 + +/turf/simulated/floor/gas_crack/terrible/pump_reagents(var/datum/reagents/R, var/volume) + . = ..() + R.add_reagent(REAGENT_ID_NITROGEN, round(volume / 2, 0.1)) + R.add_reagent(REAGENT_ID_SULFUR, round(volume / 2, 0.1)) + R.add_reagent(REAGENT_ID_PHOSPHORUS, round(volume / 2, 0.1)) + R.add_reagent(REAGENT_ID_PHORON, round(volume / 3, 0.1)) + +/turf/simulated/floor/gas_crack/terrible/examine(mob/user) + . = ..() + . += "A dangerous smell wafts from beneath it." + + + + +// a highly randomized version of the gascrack. Do not use the base type, use the planet atmo overrides. +/turf/simulated/floor/gas_crack/random + var/random_reagents = list() + gas_type = list() + +/turf/simulated/floor/gas_crack/random/Initialize(mapload, floortype) + . = ..() + // Set mined gas type + if(prob(15)) + gas_type.Add(GAS_CO2) + if(prob(15)) + gas_type.Add(GAS_PHORON) + if(prob(15)) + gas_type.Add(GAS_N2O) + if(prob(15)) + gas_type.Add(GAS_O2) + if(prob(15)) + gas_type.Add(GAS_N2) + if(!gas_type.len) + gas_type.Add(pick(list(GAS_CO2,GAS_PHORON,GAS_N2O,GAS_O2,GAS_N2))) + // Set fracking reagent + add_random_reagent() + if(prob(60)) + add_random_reagent() + if(prob(30)) + add_random_reagent() + if(prob(10)) + add_random_reagent() + if(prob(1)) + add_random_reagent() + if(prob(1)) + add_random_reagent() + +/turf/simulated/floor/gas_crack/random/proc/add_random_reagent() + random_reagents += pick(list(REAGENT_ID_NITROGEN, + REAGENT_ID_SULFUR, + REAGENT_ID_PHOSPHORUS, + REAGENT_ID_PHORON, + REAGENT_ID_COPPER, + REAGENT_ID_GOLD, + REAGENT_ID_IRON, + REAGENT_ID_NITROGEN, + REAGENT_ID_HYDROGEN, + REAGENT_ID_CARBON, + REAGENT_ID_MERCURY, + REAGENT_ID_LITHIUM, + REAGENT_ID_POTASSIUM, + REAGENT_ID_SILICON, + REAGENT_ID_SODIUMCHLORIDE, + REAGENT_ID_RADIUM, + REAGENT_ID_CALCIUM, + REAGENT_ID_CALCIUMCARBONATE, + REAGENT_ID_URANIUM, + REAGENT_ID_AMMONIA, + REAGENT_ID_FLUORINE, + REAGENT_ID_CHLORINE)) + +/turf/simulated/floor/gas_crack/random/pump_reagents(var/datum/reagents/R, var/volume) + . = ..() + R.add_reagent(pick(random_reagents), round(volume / 3, 0.1)) + R.add_reagent(pick(random_reagents), round(volume / 3, 0.1)) + R.add_reagent(pick(random_reagents), round(volume / 3, 0.1)) + +/turf/simulated/floor/gas_crack/random/examine(mob/user) + . = ..() + . += "An odd smell wafts from beneath it." diff --git a/code/modules/mining/alloys.dm b/code/modules/mining/alloys.dm index 826f30dd5ef..d605b08caf8 100644 --- a/code/modules/mining/alloys.dm +++ b/code/modules/mining/alloys.dm @@ -44,7 +44,7 @@ ORE_SAND = 2 ) product = /obj/item/stack/material/glass/phoronglass -/* + /datum/alloy/bronze metaltag = MAT_BRONZE requires = list( @@ -52,4 +52,3 @@ ORE_TIN = 1 ) product = /obj/item/stack/material/bronze -*/ diff --git a/code/modules/mining/drilling/drill.dm b/code/modules/mining/drilling/drill.dm index db906eb661e..332d3113556 100644 --- a/code/modules/mining/drilling/drill.dm +++ b/code/modules/mining/drilling/drill.dm @@ -16,10 +16,12 @@ var/supported = 0 var/active = 0 var/list/resource_field = list() + var/list/gas_field = list() var/obj/item/radio/intercom/faultreporter var/drill_range = 5 var/offset = 2 var/current_capacity = 0 + var/drill_moles_per_tick = 0 var/list/stored_ore = list( ORE_SAND = 0, @@ -54,9 +56,9 @@ ORE_MHYDROGEN = /obj/item/ore/hydrogen, ORE_SAND = /obj/item/ore/glass, ORE_CARBON = /obj/item/ore/coal, - // ORE_COPPER = /obj/item/ore/copper, - // ORE_TIN = /obj/item/ore/tin, - // ORE_BAUXITE = /obj/item/ore/bauxite, + ORE_COPPER = /obj/item/ore/copper, + ORE_TIN = /obj/item/ore/tin, + ORE_BAUXITE = /obj/item/ore/bauxite, ORE_RUTILE = /obj/item/ore/rutile ) @@ -70,14 +72,14 @@ // Found with an advanced laser. exotic_drilling >= 1 var/list/ore_types_uncommon = list( ORE_MARBLE = /obj/item/ore/marble, - //ORE_PAINITE = /obj/item/ore/painite, - //ORE_QUARTZ = /obj/item/ore/quartz, + ORE_PAINITE = /obj/item/ore/painite, + ORE_QUARTZ = /obj/item/ore/quartz, ORE_LEAD = /obj/item/ore/lead ) // Found with an ultra laser. exotic_drilling >= 2 var/list/ore_types_rare = list( - //ORE_VOPAL = /obj/item/ore/void_opal, + ORE_VOPAL = /obj/item/ore/void_opal, ORE_VERDANTIUM = /obj/item/ore/verdantium ) @@ -155,7 +157,16 @@ if(ismineralturf(get_turf(src))) var/turf/simulated/mineral/M = get_turf(src) M.GetDrilled() - + // Extract gasses! + else if(istype(get_turf(src), /turf/simulated/floor/gas_crack)) + if(gas_field.len) + //Create gas mixture to hold data for passing + var/datum/gas_mixture/GM = new + for(var/gas in gas_field) + GM.adjust_multi(gas, drill_moles_per_tick) + GM.temperature = 423 // ~150C + var/atom/location = src.loc + location.assume_air(GM) else if(istype(get_turf(src), /turf/simulated)) var/turf/simulated/T = get_turf(src) T.ex_act(2.0) @@ -213,7 +224,8 @@ harvesting.turf_resource_types &= ~(TURF_HAS_MINERALS) harvesting.resources = null resource_field -= harvesting - else + + else if(!gas_field.len) // Won't stop digging if gas pressure is detected active = 0 need_player_check = 1 update_icon() @@ -366,7 +378,9 @@ /obj/machinery/mining/drill/proc/get_resource_field() resource_field = list() + gas_field = list() need_update_field = 0 + drill_moles_per_tick = 0 var/turf/T = get_turf(src) if(!istype(T)) return @@ -380,8 +394,15 @@ if(!istype(mine_turf, /turf/space/)) if(mine_turf && mine_turf.turf_resource_types & TURF_HAS_MINERALS) resource_field += mine_turf - - if(!resource_field.len) + // gas mining + if(istype(mine_turf,/turf/simulated/floor/gas_crack)) + // Get gasses the cracks around us could give! + var/turf/simulated/floor/gas_crack/G = mine_turf + if(!G.gas_type) + continue + drill_moles_per_tick += 2 + gas_field.Add(G.gas_type) + if(!resource_field.len && !gas_field.len) system_error("Resources depleted.") /obj/machinery/mining/drill/proc/use_cell_power() @@ -408,7 +429,7 @@ current_capacity = 0 // Set the amount of ore in the drill to 0. balloon_alert(usr, "onloaded cache into the ore box.") else - balloon_alert(usr, "move an ore box to the droll before unloading it.") + balloon_alert(usr, "move an ore box to the drill before unloading it.") /obj/machinery/mining/brace diff --git a/code/modules/mining/drilling/scanner.dm b/code/modules/mining/drilling/scanner.dm index 6fd864e02e6..8f9e25c69e0 100644 --- a/code/modules/mining/drilling/scanner.dm +++ b/code/modules/mining/drilling/scanner.dm @@ -41,13 +41,13 @@ var/ore_type switch(metal) - if(ORE_SAND, ORE_CARBON, ORE_MARBLE, /*ORE_QUARTZ*/) ore_type = "surface minerals" - if(ORE_HEMATITE, /*ORE_TIN, ORE_COPPER, ORE_BAUXITE,*/ ORE_LEAD) ore_type = "industrial metals" - if(ORE_GOLD, ORE_SILVER, ORE_RUTILE) ore_type = "precious metals" - if(ORE_DIAMOND, /*ORE_PAINITE*/) ore_type = "precious gems" - if(ORE_URANIUM) ore_type = "nuclear fuel" - if(ORE_PHORON, ORE_PLATINUM, ORE_MHYDROGEN) ore_type = "exotic matter" - if(ORE_VERDANTIUM, /*ORE_VOPAL*/) ore_type = "anomalous matter" + if(ORE_SAND, ORE_CARBON, ORE_MARBLE, ORE_QUARTZ) ore_type = "surface minerals" + if(ORE_HEMATITE, ORE_TIN, ORE_COPPER, ORE_BAUXITE, ORE_LEAD) ore_type = "industrial metals" + if(ORE_GOLD, ORE_SILVER, ORE_RUTILE) ore_type = "precious metals" + if(ORE_DIAMOND, ORE_PAINITE) ore_type = "precious gems" + if(ORE_URANIUM) ore_type = "nuclear fuel" + if(ORE_PHORON, ORE_PLATINUM, ORE_MHYDROGEN) ore_type = "exotic matter" + if(ORE_VERDANTIUM, ORE_VOPAL) ore_type = "anomalous matter" if(ore_type) metals[ore_type] += T.resources[metal] diff --git a/code/modules/mining/machinery/machine_processing.dm b/code/modules/mining/machinery/machine_processing.dm index c924cc820db..d59d321ed9e 100644 --- a/code/modules/mining/machinery/machine_processing.dm +++ b/code/modules/mining/machinery/machine_processing.dm @@ -164,7 +164,7 @@ var/active = FALSE var/points = 0 - var/points_mult = 1 //VOREStation Add - multiplier for points generated when ore hits the processors + var/points_mult = 1 //- multiplier for points generated when ore hits the processors var/static/list/ore_values = list( ORE_SAND = 1, ORE_HEMATITE = 1, @@ -185,7 +185,7 @@ ORE_LEAD = 40, ORE_MHYDROGEN = 40, ORE_VERDANTIUM = 60, - ORE_RUTILE = 40) //VOREStation Add + ORE_RUTILE = 40) /obj/machinery/mineral/processing_unit/Initialize(mapload) . = ..() diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index f9c93774688..3357d9a0351 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -58,12 +58,12 @@ var/list/mining_overlay_cache = list() ORE_VERDANTIUM = /obj/item/ore/verdantium, ORE_MARBLE = /obj/item/ore/marble, ORE_LEAD = /obj/item/ore/lead, -// ORE_COPPER = /obj/item/ore/copper, -// ORE_TIN = /obj/item/ore/tin, -// ORE_BAUXITE = /obj/item/ore/bauxite, -// ORE_VOPAL = /obj/item/ore/void_opal, -// ORE_PAINITE = /obj/item/ore/painite, -// ORE_QUARTZ = /obj/item/ore/quartz, + ORE_COPPER = /obj/item/ore/copper, + ORE_TIN = /obj/item/ore/tin, + ORE_BAUXITE = /obj/item/ore/bauxite, + ORE_VOPAL = /obj/item/ore/void_opal, + ORE_PAINITE = /obj/item/ore/painite, + ORE_QUARTZ = /obj/item/ore/quartz, ORE_RUTILE = /obj/item/ore/rutile ) @@ -720,15 +720,15 @@ var/list/mining_overlay_cache = list() new /obj/item/stack/material/uranium(src, rand(5,25)) /turf/simulated/mineral/proc/make_ore(var/rare_ore) - if(mineral || ignore_mapgen || ignore_oregen) //VOREStation Edit - Makes sense, doesn't it? + if(mineral || ignore_mapgen || ignore_oregen) return var/mineral_name if(rare_ore) - mineral_name = pickweight(list(ORE_MARBLE = 5,/* ORE_QUARTZ = 15, ORE_COPPER = 10, ORE_TIN = 5, ORE_BAUXITE = 5*/, ORE_URANIUM = 15, ORE_PLATINUM = 20, ORE_HEMATITE = 15, ORE_RUTILE = 20, ORE_CARBON = 15, ORE_DIAMOND = 3, ORE_GOLD = 15, ORE_SILVER = 15, ORE_PHORON = 25, ORE_LEAD = 5,/* ORE_VOPAL = 1,*/ ORE_VERDANTIUM = 2/*, ORE_PAINITE = 1*/)) + mineral_name = pickweight(list(ORE_MARBLE = 5, ORE_QUARTZ = 15, ORE_COPPER = 10, ORE_TIN = 5, ORE_BAUXITE = 5, ORE_URANIUM = 15, ORE_PLATINUM = 20, ORE_HEMATITE = 15, ORE_RUTILE = 20, ORE_CARBON = 15, ORE_DIAMOND = 3, ORE_GOLD = 15, ORE_SILVER = 15, ORE_PHORON = 25, ORE_LEAD = 5, ORE_VOPAL = 1, ORE_VERDANTIUM = 2, ORE_PAINITE = 1)) else - mineral_name = pickweight(list(ORE_MARBLE = 3,/* ORE_QUARTZ = 10, ORE_COPPER = 20, ORE_TIN = 15, ORE_BAUXITE = 15*/, ORE_URANIUM = 10, ORE_PLATINUM = 10, ORE_HEMATITE = 70, ORE_RUTILE = 15, ORE_CARBON = 70, ORE_DIAMOND = 2, ORE_GOLD = 10, ORE_SILVER = 10, ORE_PHORON = 20, ORE_LEAD = 3,/* ORE_VOPAL = 1,*/ ORE_VERDANTIUM = 1/*, ORE_PAINITE = 1*/)) + mineral_name = pickweight(list(ORE_MARBLE = 3, ORE_QUARTZ = 10, ORE_COPPER = 20, ORE_TIN = 15, ORE_BAUXITE = 15, ORE_URANIUM = 10, ORE_PLATINUM = 10, ORE_HEMATITE = 70, ORE_RUTILE = 15, ORE_CARBON = 70, ORE_DIAMOND = 2, ORE_GOLD = 10, ORE_SILVER = 10, ORE_PHORON = 20, ORE_LEAD = 3, ORE_VOPAL = 1, ORE_VERDANTIUM = 1, ORE_PAINITE = 1)) if(mineral_name && (mineral_name in GLOB.ore_data)) mineral = GLOB.ore_data[mineral_name] diff --git a/code/modules/mining/ore.dm b/code/modules/mining/ore.dm index e03cd6eb277..81d608df783 100644 --- a/code/modules/mining/ore.dm +++ b/code/modules/mining/ore.dm @@ -106,7 +106,7 @@ icon_state = "ore_lead" material = ORE_LEAD origin_tech = list(TECH_MATERIAL = 3) -/* + /obj/item/ore/copper name = "raw copper" icon_state = "ore_copper" @@ -121,12 +121,12 @@ name = "raw bauxite" icon_state = "ore_bauxite" material = ORE_BAUXITE -*/ + /obj/item/ore/rutile name = "raw rutile" icon_state = "ore_rutile" material = ORE_RUTILE -/* + /obj/item/ore/void_opal name = "raw void opal" icon_state = "ore_void_opal" @@ -141,7 +141,7 @@ name = "raw quartz" icon_state = "ore_quartz" material = ORE_QUARTZ -*/ + /obj/item/ore/slag name = "Slag" desc = "Someone screwed up..." @@ -159,7 +159,6 @@ else return ..() -//VOREStation Add /obj/item/ore/attack(mob/living/M as mob, mob/living/user as mob) if(M.handle_eat_minerals(src, user)) return @@ -169,7 +168,6 @@ if(user.handle_eat_minerals(src)) return ..() -//VOREStation Add End /obj/item/ore_chunk name = "ore chunk" diff --git a/code/modules/mining/ore_datum.dm b/code/modules/mining/ore_datum.dm index 643c10d61df..e85dbdeaf4c 100644 --- a/code/modules/mining/ore_datum.dm +++ b/code/modules/mining/ore_datum.dm @@ -36,7 +36,7 @@ "million" = 704 ) xarch_source_mineral = REAGENT_ID_POTASSIUM - reagent = REAGENT_ID_URANIUM + reagent = REAGENT_ID_RADIUM // Otherwise it emp pulses constantly with iron /ore/hematite name = ORE_HEMATITE @@ -158,6 +158,7 @@ "billion" = 13, "billion_lower" = 10 ) + reagent = REAGENT_ID_PHOSPHORUS /ore/marble name = ORE_MARBLE @@ -178,7 +179,7 @@ ore = /obj/item/ore/lead scan_icon = "mineral_rare" reagent = REAGENT_ID_LEAD -/* + /ore/copper name = ORE_COPPER display_name = ORE_COPPER @@ -199,6 +200,7 @@ spread_chance = 10 ore = /obj/item/ore/tin scan_icon = "mineral_common" + reagent = REAGENT_ID_TIN /ore/quartz name = ORE_QUARTZ @@ -208,6 +210,7 @@ spread_chance = 5 ore = /obj/item/ore/quartz scan_icon = "mineral_common" + reagent = REAGENT_ID_SILICON /ore/bauxite name = ORE_BAUXITE @@ -218,7 +221,7 @@ ore = /obj/item/ore/bauxite scan_icon = "mineral_common" reagent = REAGENT_ID_ALUMINIUM -*/ + /ore/rutile name = ORE_RUTILE display_name = ORE_RUTILE @@ -228,7 +231,8 @@ alloy = 1 ore = /obj/item/ore/rutile scan_icon = "mineral_uncommon" -/* + reagent = REAGENT_ID_TITANIUMDIOX + /ore/painite name = ORE_PAINITE display_name = "rough painite" @@ -237,6 +241,7 @@ spread_chance = 3 ore = /obj/item/ore/painite scan_icon = "mineral_rare" + reagent = REAGENT_ID_CALCIUM /ore/void_opal name = ORE_VOPAL @@ -246,4 +251,4 @@ spread_chance = 1 ore = /obj/item/ore/void_opal scan_icon = "mineral_rare" -*/ + reagent = REAGENT_ID_SULFUR diff --git a/code/modules/mob/living/carbon/human/species/lleill/lleill_items.dm b/code/modules/mob/living/carbon/human/species/lleill/lleill_items.dm index 7f25d30a5e4..5e842927153 100644 --- a/code/modules/mob/living/carbon/human/species/lleill/lleill_items.dm +++ b/code/modules/mob/living/carbon/human/species/lleill/lleill_items.dm @@ -21,6 +21,8 @@ reagent_state = LIQUID color = "#ffffff" scannable = 1 + supply_conversion_value = REFINERYEXPORT_VALUE_RARE + industrial_use = REFINERYEXPORT_REASON_MATSCI /datum/reagent/glamour_transparent/affect_blood(var/mob/living/carbon/target, var/removed) if(!target.cloaked) @@ -58,6 +60,8 @@ color = "#ffffff" scannable = 1 wiki_flag = WIKI_SPOILER + supply_conversion_value = REFINERYEXPORT_VALUE_RARE + industrial_use = REFINERYEXPORT_REASON_MATSCI /datum/reagent/glamour_scaling/affect_blood(var/mob/living/carbon/target, var/removed) if(!(/mob/living/proc/set_size in target.verbs)) @@ -90,6 +94,8 @@ reagent_state = LIQUID color = "#ffffff" scannable = 1 + supply_conversion_value = REFINERYEXPORT_VALUE_RARE + industrial_use = REFINERYEXPORT_REASON_MATSCI /datum/reagent/glamour_twinkling/affect_blood(var/mob/living/carbon/human/target, var/removed) if(target.species.darksight < 10) diff --git a/code/modules/mob/living/carbon/human/species/station/traits/negative.dm b/code/modules/mob/living/carbon/human/species/station/traits/negative.dm index c65b5d6fb1b..5fc3fa11468 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits/negative.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits/negative.dm @@ -565,15 +565,15 @@ /datum/trait/negative/lonely/proc/handle_loneliness(var/mob/living/carbon/human/H) var/ms = "" if(H.loneliness_stage == escalation_speed) - ms = "[pick("Well.. No one is around you anymore...","Well.. You're alone now...","You suddenly feel alone...")]" // Outpost 21 edit - More variety + ms = "[pick("Well.. No one is around you anymore...","Well.. You're alone now...","You suddenly feel alone...")]" if(H.loneliness_stage >= 50) - ms = "[pick("You begin to feel alone...","You feel isolated...","You need company...","Where is everyone?...","You need to find someone...")]" // Outpost 21 edit - More variety + ms = "[pick("You begin to feel alone...","You feel isolated...","You need company...","Where is everyone?...","You need to find someone...")]" if(H.loneliness_stage >= 250) - ms = "[pick("You don't think you can last much longer without some visible company!", "You should go find someone to be with!","You need to find company!","Find someone to be with!")]" // Outpost 21 edit - More variety + ms = "[pick("You don't think you can last much longer without some visible company!", "You should go find someone to be with!","You need to find company!","Find someone to be with!")]" if(H.stuttering < hallucination_cap) H.stuttering += 5 if(H.loneliness_stage >= warning_cap) - ms = span_danger(span_bold("[pick("Where are the others?", "Please, there has to be someone nearby!", "I don't want to be alone!","Please, anyone! I don't want to be alone!")]")) // Outpost 21 edit - More variety + ms = span_danger(span_bold("[pick("Where are the others?", "Please, there has to be someone nearby!", "I don't want to be alone!","Please, anyone! I don't want to be alone!")]")) if(world.time < H.next_loneliness_time) return if(ms != "") diff --git a/code/modules/power/singularity/particle_accelerator/particle_smasher.dm b/code/modules/power/singularity/particle_accelerator/particle_smasher.dm index cb4287705ae..83c90926c73 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_smasher.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_smasher.dm @@ -514,7 +514,6 @@ required_atmos_temp_max = 6000 probability = 40 -/* Currently missing Tin reagent /datum/particle_smasher_recipe/copper_gold display_name = MAT_GOLD + " from " + MAT_COPPER reagents = list(REAGENT_ID_TIN = 10) @@ -528,7 +527,6 @@ required_atmos_temp_min = 5000 required_atmos_temp_max = 8000 probability = 40 -*/ /datum/particle_smasher_recipe/hydrogen_deuterium display_name = MAT_DEUTERIUM + " from " + MAT_GRAPHITE diff --git a/code/modules/random_map/automata/caves.dm b/code/modules/random_map/automata/caves.dm index 42bbcc6798f..44bd381c86e 100644 --- a/code/modules/random_map/automata/caves.dm +++ b/code/modules/random_map/automata/caves.dm @@ -60,7 +60,6 @@ if(!current_cell) return 0 var/turf/simulated/mineral/T = locate((origin_x-1)+x,(origin_y-1)+y,origin_z) - //VOREStation Edit Start if(istype(T) && !T.ignore_mapgen) if(!T.ignore_cavegen) if(map[current_cell] == FLOOR_CHAR) @@ -75,7 +74,6 @@ else if(map[current_cell] == EMPTY_CHAR) T.turf_resource_types |= TURF_HAS_RARE_ORE get_additional_spawns(map[current_cell],T,get_spawn_dir(x, y)) - //VOREStation Edit End return T /datum/random_map/automata/cave_system/apply_to_map() diff --git a/code/modules/random_map/noise/ore.dm b/code/modules/random_map/noise/ore.dm index 9031dd1b638..692f172c466 100644 --- a/code/modules/random_map/noise/ore.dm +++ b/code/modules/random_map/noise/ore.dm @@ -64,13 +64,13 @@ T.resources[ORE_MHYDROGEN] = 0 T.resources[ORE_VERDANTIUM] = 0 T.resources[ORE_LEAD] = 0 - //T.resources[ORE_COPPER] = rand(RESOURCE_MID_MIN, RESOURCE_HIGH_MAX) - //T.resources[ORE_TIN] = rand(RESOURCE_LOW_MIN, RESOURCE_MID_MAX) - //T.resources[ORE_BAUXITE] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) - T.resources[ORE_RUTILE] = 0 - //T.resources[ORE_VOPAL] = 0 - //T.resources[ORE_QUARTZ] = 0 - //T.resources[ORE_PAINITE] = 0 + T.resources[ORE_COPPER] = rand(RESOURCE_MID_MIN, RESOURCE_HIGH_MAX) + T.resources[ORE_TIN] = rand(RESOURCE_LOW_MIN, RESOURCE_MID_MAX) + T.resources[ORE_BAUXITE] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) + T.resources[ORE_RUTILE] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) + T.resources[ORE_VOPAL] = 0 + T.resources[ORE_QUARTZ] = rand(RESOURCE_LOW_MIN, RESOURCE_MID_MAX) + T.resources[ORE_PAINITE] = 0 else if(current_cell < deep_val) // Rare metals. T.resources[ORE_GOLD] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) T.resources[ORE_SILVER] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) @@ -83,13 +83,13 @@ T.resources[ORE_DIAMOND] = 0 T.resources[ORE_HEMATITE] = 0 T.resources[ORE_MARBLE] = 0 - //T.resources[ORE_COPPER] = 0 - //T.resources[ORE_TIN] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) - //T.resources[ORE_BAUXITE] = 0 - T.resources[ORE_RUTILE] = 0 - //T.resources[ORE_VOPAL] = 0 - //T.resources[ORE_QUARTZ] = 0 - //T.resources[ORE_PAINITE] = 0 + T.resources[ORE_COPPER] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) + T.resources[ORE_TIN] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) + T.resources[ORE_BAUXITE] = 0 + T.resources[ORE_RUTILE] = rand(RESOURCE_LOW_MIN, RESOURCE_MID_MAX) + T.resources[ORE_VOPAL] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) + T.resources[ORE_QUARTZ] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) + T.resources[ORE_PAINITE] = 0 else // Deep metals. T.resources[ORE_URANIUM] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) T.resources[ORE_DIAMOND] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) @@ -102,13 +102,13 @@ T.resources[ORE_HEMATITE] = 0 T.resources[ORE_GOLD] = 0 T.resources[ORE_SILVER] = 0 - //T.resources[ORE_COPPER] = 0 - //T.resources[ORE_TIN] = 0 - //T.resources[ORE_BAUXITE] = 0 + T.resources[ORE_COPPER] = 0 + T.resources[ORE_TIN] = 0 + T.resources[ORE_BAUXITE] = 0 T.resources[ORE_RUTILE] = 0 - //T.resources[ORE_VOPAL] = 0 - //T.resources[ORE_QUARTZ] = 0 - //T.resources[ORE_PAINITE] = 0 + T.resources[ORE_VOPAL] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) + T.resources[ORE_QUARTZ] = 0 + T.resources[ORE_PAINITE] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) return /datum/random_map/noise/ore/get_map_char(var/value) diff --git a/code/modules/reagents/holder/holder.dm b/code/modules/reagents/holder/holder.dm index df3e24ced69..1b4b31cb68b 100644 --- a/code/modules/reagents/holder/holder.dm +++ b/code/modules/reagents/holder/holder.dm @@ -280,14 +280,14 @@ //not directly injected into the contents. It first calls touch, then the appropriate trans_to_*() or splash_mob(). //If for some reason touch effects are bypassed (e.g. injecting stuff directly into a reagent container or person), //call the appropriate trans_to_*() proc. -/datum/reagents/proc/trans_to(var/atom/target, var/amount = 1, var/multiplier = 1, var/copy = 0) +/datum/reagents/proc/trans_to(var/atom/target, var/amount = 1, var/multiplier = 1, var/copy = 0, var/force_open_container = FALSE) touch(target) //First, handle mere touch effects if(ismob(target)) return splash_mob(target, amount, copy) if(isturf(target)) return trans_to_turf(target, amount, multiplier, copy) - if(isobj(target) && target.is_open_container() && !isbelly(target.loc)) + if(isobj(target) && (target.is_open_container() || force_open_container) && !isbelly(target.loc)) return trans_to_obj(target, amount, multiplier, copy) return 0 @@ -331,7 +331,7 @@ else if (istype(target, /datum/reagents)) return F.trans_to_holder(target, amount) -/datum/reagents/proc/trans_id_to(var/atom/target, var/id, var/amount = 1) +/datum/reagents/proc/trans_id_to(var/atom/target, var/id, var/amount = 1, var/force_open_container = FALSE) if (!target || !target.reagents) return @@ -345,7 +345,7 @@ F.add_reagent(id, amount, tmpdata) remove_reagent(id, amount) - return F.trans_to(target, amount) // Let this proc check the atom's type + return F.trans_to(target, amount, force_open_container = force_open_container) // Let this proc check the atom's type // When applying reagents to an atom externally, touch() is called to trigger any on-touch effects of the reagent. // This does not handle transferring reagents to things. diff --git a/code/modules/reagents/machinery/grinder.dm b/code/modules/reagents/machinery/grinder.dm index 6ca29c31225..4fb79a5197f 100644 --- a/code/modules/reagents/machinery/grinder.dm +++ b/code/modules/reagents/machinery/grinder.dm @@ -1,5 +1,4 @@ /obj/machinery/reagentgrinder - name = "All-In-One Grinder" desc = "Grinds stuff into itty bitty bits." icon = 'icons/obj/kitchen.dmi' @@ -199,51 +198,7 @@ inuse = 0 // Process. - for (var/obj/item/O in holdingitems) - - var/remaining_volume = beaker.reagents.maximum_volume - beaker.reagents.total_volume - if(remaining_volume <= 0) - break - - if(GLOB.sheet_reagents[O.type]) - var/obj/item/stack/stack = O - if(istype(stack)) - var/list/sheet_components = GLOB.sheet_reagents[stack.type] - var/amount_to_take = max(0,min(stack.get_amount(),round(remaining_volume/REAGENTS_PER_SHEET))) - if(amount_to_take) - stack.use(amount_to_take) - if(QDELETED(stack)) - holdingitems -= stack - if(islist(sheet_components)) - amount_to_take = (amount_to_take/(sheet_components.len)) - for(var/i in sheet_components) - beaker.reagents.add_reagent(i, (amount_to_take*REAGENTS_PER_SHEET)) - else - beaker.reagents.add_reagent(sheet_components, (amount_to_take*REAGENTS_PER_SHEET)) - continue - - if(GLOB.ore_reagents[O.type]) - var/obj/item/ore/R = O - if(istype(R)) - var/list/ore_components = GLOB.ore_reagents[R.type] - if(remaining_volume >= REAGENTS_PER_ORE) - holdingitems -= R - qdel(R) - if(islist(ore_components)) - var/amount_to_take = (REAGENTS_PER_ORE/(ore_components.len)) - for(var/i in ore_components) - beaker.reagents.add_reagent(i, amount_to_take) - else - beaker.reagents.add_reagent(ore_components, REAGENTS_PER_ORE) - continue - - if(O.reagents) - O.reagents.trans_to_obj(beaker, min(O.reagents.total_volume, remaining_volume)) - if(O.reagents.total_volume == 0) - holdingitems -= O - qdel(O) - if (beaker.reagents.total_volume >= beaker.reagents.maximum_volume) - break + grind_items_to_reagents(holdingitems,beaker.reagents) /obj/machinery/reagentgrinder/proc/replace_beaker(mob/living/user, obj/item/reagent_containers/new_beaker) if(!user) diff --git a/code/modules/reagents/reactions/distilling/crystalizing.dm b/code/modules/reagents/reactions/distilling/crystalizing.dm new file mode 100644 index 00000000000..0efd0a4c257 --- /dev/null +++ b/code/modules/reagents/reactions/distilling/crystalizing.dm @@ -0,0 +1,28 @@ +// Crystalizing (temps under 0) +/decl/chemical_reaction/distilling/sugar + name = "Crystalizing Sugar" + id = "distill_sugar" + result = REAGENT_ID_SUGAR + required_reagents = list(REAGENT_ID_CARBON = 5) + catalysts = list(REAGENT_ID_WATER = 1, REAGENT_ID_SUGAR = 1) // Rebuild the crystals! + result_amount = 0.5 + + temp_range = list(T0C -10, T0C -5) // crystal growth + temp_shift = -1 + + require_xgm_gas = GAS_PHORON + rejects_xgm_gas = GAS_O2 + +/decl/chemical_reaction/distilling/fuel_phoron + name = "Crystalizing Phoron" + id = "distill_phoron_fuel" + result = REAGENT_ID_PHORON + required_reagents = list(REAGENT_ID_FUEL = 1, REAGENT_ID_MERCURY = 1) + catalysts = list(REAGENT_ID_PHORON = 1) // Rebuild the crystals! + result_amount = 0.5 + + temp_range = list(T0C -70, T0C -25) // crystal growth + temp_shift = 1 + + require_xgm_gas = GAS_N2 + rejects_xgm_gas = GAS_O2 diff --git a/code/modules/reagents/reactions/distilling/distilling.dm b/code/modules/reagents/reactions/distilling/distilling.dm index f67a28842d1..1f2dbaa18ba 100644 --- a/code/modules/reagents/reactions/distilling/distilling.dm +++ b/code/modules/reagents/reactions/distilling/distilling.dm @@ -26,25 +26,67 @@ var/list/temp_range = list(T0C, T20C) var/temp_shift = 0 // How much the temperature changes when the reaction occurs. + var/require_xgm_gas = null + var/rejects_xgm_gas = null + var/maximum_xgm_pressure = null + var/minimum_xgm_pressure = null + var/consumes_xgm_gas = 0 // Mols of gas consumed during reaction + /decl/chemical_reaction/distilling/can_happen(var/datum/reagents/holder) - if(!istype(holder, /datum/reagents/distilling) || !istype(holder.my_atom, /obj/machinery/portable_atmospherics/powered/reagent_distillery)) + if(!istype(holder, /datum/reagents/distilling)) return FALSE - // Super special temperature check. - var/obj/machinery/portable_atmospherics/powered/reagent_distillery/RD = holder.my_atom - if(RD.current_temp < temp_range[1] || RD.current_temp > temp_range[2]) - return FALSE + // return_air() will get the current turf for most things unless overriden to use a tank or such! + var/datum/gas_mixture/GM = holder.my_atom.return_air() + if(require_xgm_gas || rejects_xgm_gas || minimum_xgm_pressure || maximum_xgm_pressure) + if(!GM) + return + if(require_xgm_gas && GM.gas[require_xgm_gas] <= 10) // If have required gas to react + return + if(rejects_xgm_gas && GM.gas[rejects_xgm_gas] >= 1) // If blocked by a gas it doesn't like + return + if(minimum_xgm_pressure && GM.return_pressure() < minimum_xgm_pressure) + return + if(maximum_xgm_pressure && GM.return_pressure() > maximum_xgm_pressure) + return + + // Special distilling conditions must be met, each object has different vars to meet it though. + if(istype(holder.my_atom,/obj/distilling_tester)) + // Unit test needs some special handholding + var/obj/distilling_tester/DD = holder.my_atom + if(DD.current_temp < temp_range[1] || DD.current_temp > temp_range[2]) + return FALSE + else if(istype(holder.my_atom,/obj/machinery/portable_atmospherics/powered/reagent_distillery)) + // Super special temperature check. + var/obj/machinery/portable_atmospherics/powered/reagent_distillery/RD = holder.my_atom + if(RD.current_temp < temp_range[1] || RD.current_temp > temp_range[2]) + return FALSE + else if(istype(holder.my_atom, /obj/machinery/reagent_refinery/reactor)) + // Check gas temp for refinery + if(!GM || GM.temperature < temp_range[1] || GM.temperature > temp_range[2]) + return FALSE return ..() -/* /decl/chemical_reaction/distilling/on_reaction(var/datum/reagents/holder, var/created_volume) - if(istype(holder.my_atom, /obj/item/reagent_containers/glass/distilling)) - var/obj/item/reagent_containers/glass/distilling/D = holder.my_atom - var/obj/machinery/portable_atmospherics/powered/reagent_distillery/RD = D.Master - RD.current_temp += temp_shift - return -*/ + // Handle gas consumption + var/datum/gas_mixture/GM = holder.my_atom.return_air() + if(consumes_xgm_gas != 0 && GM) + GM.adjust_gas(require_xgm_gas,-consumes_xgm_gas, TRUE) + + // Distilling can change gas temps, handle it here. + if(temp_shift != 0) + if(istype(holder.my_atom,/obj/distilling_tester)) + return + // Special handling for this + if(istype(holder.my_atom,/obj/machinery/portable_atmospherics/powered/reagent_distillery)) + var/obj/machinery/portable_atmospherics/powered/reagent_distillery/RD = holder.my_atom + RD.current_temp += temp_shift + return + // Change gas temps + if(!GM) + return + GM.add_thermal_energy(temp_shift * 1000) // Subtypes // @@ -151,6 +193,17 @@ temp_shift = 0.5 temp_range = list(T0C + 7, T0C + 13) +/decl/chemical_reaction/distilling/ethanol + name = "Distilling Ethanol" + id = "distill_ethanol" + result = REAGENT_ID_ETHANOL + required_reagents = list(REAGENT_ID_NUTRIMENT = 1, REAGENT_ID_WATER = 1, REAGENT_ID_SUGAR = 1) + result_amount = 2 + + reaction_rate = HALF_LIFE(30) + + temp_range = list(T20C+30, T20C + 40) + // Unique /decl/chemical_reaction/distilling/berserkjuice name = "Distilling Brute Juice" @@ -214,3 +267,71 @@ reaction_rate = HALF_LIFE(20) temp_range = list(T0C + 90, T0C + 95) + +/decl/chemical_reaction/distilling/hydrogen + name = "Distilling Hydrogen" + id = "distill_hydrogen" + result = REAGENT_ID_HYDROGEN + inhibitors = list(REAGENT_ID_CARBON = 1) + required_reagents = list(REAGENT_ID_WATER = 1) + result_amount = 2 + + temp_range = list(T20C + 110, T20C + 290) + temp_shift = 3 // It's burning off phoron + + require_xgm_gas = GAS_PHORON + rejects_xgm_gas = GAS_O2 + +/decl/chemical_reaction/distilling/oxygen + name = "Distilling Oxygen" + id = "distill_oxygen" + result = REAGENT_ID_OXYGEN + inhibitors = list(REAGENT_ID_CARBON = 1) + required_reagents = list(REAGENT_ID_WATER = 1) + catalysts = list(REAGENT_ID_PHORON = 1) + result_amount = 1 + + temp_range = list(T20C + 150, T20C + 320) + temp_shift = 3 // It's burning off phoron + + require_xgm_gas = GAS_N2 + rejects_xgm_gas = GAS_O2 + +/decl/chemical_reaction/distilling/mineralized_sodium + name = "Distilling Sodium" + id = "distill_sodium" + result = REAGENT_ID_SODIUM + required_reagents = list(REAGENT_ID_MINERALIZEDFLUID = 1) + result_amount = 1 + + temp_range = list(T20C + 600, T20C + 800) + temp_shift = -1 + + require_xgm_gas = GAS_PHORON + rejects_xgm_gas = GAS_O2 + +/decl/chemical_reaction/distilling/mineralized_carbon + name = "Distilling Carbon" + id = "distill_carbon" + result = REAGENT_ID_CARBON + required_reagents = list(REAGENT_ID_MINERALIZEDFLUID = 1) + result_amount = 1 + + temp_range = list(T20C + 400, T20C + 800) + temp_shift = -1 + + require_xgm_gas = GAS_O2 + rejects_xgm_gas = GAS_PHORON + +/decl/chemical_reaction/distilling/reduce_salt + name = "Distilling Sodium" + id = "distill_reduce_tablesalt" + result = REAGENT_ID_SODIUM + required_reagents = list(REAGENT_ID_SODIUMCHLORIDE = 1) + result_amount = 1 + + temp_range = list(T20C + 800, T20C + 1000) + temp_shift = -1 + + require_xgm_gas = GAS_PHORON + rejects_xgm_gas = GAS_O2 diff --git a/code/modules/reagents/reactions/distilling/gas_condensing.dm b/code/modules/reagents/reactions/distilling/gas_condensing.dm new file mode 100644 index 00000000000..8988c4c5e2a --- /dev/null +++ b/code/modules/reagents/reactions/distilling/gas_condensing.dm @@ -0,0 +1,101 @@ +// Condensing atmo gasses into reagents +// If there is ever work done converting atmogas back and forth from reagent to gas then this should be tuned to avoid creating something from nothing! +#define CONDENSING_RATE 50 +#define CONDENSING_RESULT 0.5 +#define CONDENSING_HEAT 2 +#define OIL_CONSUMPTION_RATE 0.01 + +/decl/chemical_reaction/distilling/condense_oxygen + name = "Condensing Oxygen" + id = "condense_oxygen" + result = REAGENT_ID_OXYGEN + required_reagents = list(REAGENT_ID_FROSTOIL = OIL_CONSUMPTION_RATE) + inhibitors = list(REAGENT_ID_OXYGEN = 0.1) // Used to limit the reaction + result_amount = CONDENSING_RESULT + + temp_range = list(54.36, 90.19) // kelvin + temp_shift = CONDENSING_HEAT + + require_xgm_gas = GAS_O2 + rejects_xgm_gas = GAS_PHORON + consumes_xgm_gas = CONDENSING_RATE + +/decl/chemical_reaction/distilling/condense_nitrogen + name = "Condensing Nitrogen" + id = "condense_nitrogen" + result = REAGENT_ID_NITROGEN + required_reagents = list(REAGENT_ID_FROSTOIL = OIL_CONSUMPTION_RATE) + inhibitors = list(REAGENT_ID_NITROGEN = 0.1) // Used to limit the reaction + result_amount = CONDENSING_RESULT + + temp_range = list(63.15, 77.36) // kelvin + temp_shift = CONDENSING_HEAT + + require_xgm_gas = GAS_N2 + rejects_xgm_gas = GAS_PHORON + consumes_xgm_gas = CONDENSING_RATE + +/decl/chemical_reaction/distilling/condense_nitrox + name = "Condensing Nitrous Oxide" + id = "condense_nitro" + result = REAGENT_ID_NITROGEN // Figure out something better + required_reagents = list(REAGENT_ID_FROSTOIL = OIL_CONSUMPTION_RATE) + inhibitors = list(REAGENT_ID_NITROGEN = 0.1) // Used to limit the reaction + result_amount = CONDENSING_RESULT + + temp_range = list(0, 182.3) // kelvin + temp_shift = CONDENSING_HEAT + + require_xgm_gas = GAS_N2O + rejects_xgm_gas = GAS_PHORON + consumes_xgm_gas = CONDENSING_RATE + +/decl/chemical_reaction/distilling/condense_carbon + name = "Condensing Carbon Dioxide" + id = "condense_carbon" + result = REAGENT_ID_CARBON + required_reagents = list(REAGENT_ID_FROSTOIL = OIL_CONSUMPTION_RATE) + inhibitors = list(REAGENT_ID_CARBON = 0.1) // Used to limit the reaction + result_amount = CONDENSING_RESULT + + temp_range = list(54.36, 90.19) // kelvin + temp_shift = CONDENSING_HEAT + + require_xgm_gas = GAS_CO2 + rejects_xgm_gas = GAS_PHORON + consumes_xgm_gas = CONDENSING_RATE + +/decl/chemical_reaction/distilling/condense_phoron + name = "Condensing Phoron" + id = "condense_phoron" + result = REAGENT_ID_PHORON + required_reagents = list(REAGENT_ID_FROSTOIL = OIL_CONSUMPTION_RATE) + inhibitors = list(REAGENT_ID_PHORON = 0.1) // Used to limit the reaction + result_amount = CONDENSING_RESULT + + temp_range = list(14.60, 52.99) // kelvin + temp_shift = CONDENSING_HEAT + + require_xgm_gas = GAS_PHORON + rejects_xgm_gas = GAS_O2 + consumes_xgm_gas = CONDENSING_RATE + +/decl/chemical_reaction/distilling/condense_fuel + name = "Condensing Volatiles" + id = "condense_fuel" + result = REAGENT_ID_FUEL + required_reagents = list(REAGENT_ID_FROSTOIL = OIL_CONSUMPTION_RATE) + inhibitors = list(REAGENT_ID_FUEL = 0.1) // Used to limit the reaction + result_amount = CONDENSING_RESULT + + temp_range = list(91.60, 120.19) // kelvin + temp_shift = CONDENSING_HEAT + + require_xgm_gas = GAS_VOLATILE_FUEL + rejects_xgm_gas = GAS_O2 + consumes_xgm_gas = CONDENSING_RATE + +#undef CONDENSING_RATE +#undef CONDENSING_RESULT +#undef CONDENSING_HEAT +#undef OIL_CONSUMPTION_RATE diff --git a/code/modules/reagents/reactions/distilling/heavy_industrial.dm b/code/modules/reagents/reactions/distilling/heavy_industrial.dm new file mode 100644 index 00000000000..0f477b3276b --- /dev/null +++ b/code/modules/reagents/reactions/distilling/heavy_industrial.dm @@ -0,0 +1,187 @@ +// Heavy chemicals +/decl/chemical_reaction/distilling/titanium_refine + name = REAGENT_TITANIUM + id = "distill_titanium" + result = REAGENT_ID_TITANIUM + required_reagents = list(REAGENT_ID_TITANIUMDIOX = 1, REAGENT_ID_CHLORINE = 4, REAGENT_ID_SODIUM = 1) + result_amount = 1 + + temp_range = list(T20C + 900, T20C + 1100) + temp_shift = -1 + + require_xgm_gas = GAS_N2 + rejects_xgm_gas = GAS_O2 + +/decl/chemical_reaction/distilling/concentrate_radium + name = REAGENT_CONCENTRATEDRADIUM + id = "distill_conrad" + result = REAGENT_ID_CONCENTRATEDRADIUM + required_reagents = list(REAGENT_ID_RADIUM = 5, REAGENT_ID_LEAD = 1) + catalysts = list(REAGENT_ID_URANIUM = 1) + result_amount = 1 + + temp_range = list(T20C + 1500, T20C + 2000) + temp_shift = -1 + + require_xgm_gas = GAS_PHORON + rejects_xgm_gas = GAS_N2 + +/decl/chemical_reaction/distilling/cyanide + name = REAGENT_CYANIDE + id = "distill_cyanide" + result = REAGENT_ID_CYANIDE + required_reagents = list(REAGENT_ID_CARBON = 1, REAGENT_ID_NITROGEN = 1, REAGENT_ID_WATER = 2) + result_amount = 1 + + temp_range = list(T0C + 150, T0C + 170) + temp_shift = 0 + + require_xgm_gas = GAS_N2 + rejects_xgm_gas = GAS_O2 + +/decl/chemical_reaction/distilling/sacid + name = REAGENT_SACID + id = "distill_sacid" + result = REAGENT_ID_SACID + required_reagents = list(REAGENT_ID_HYDROGEN = 2, REAGENT_ID_SULFUR = 1) + result_amount = 1 + + temp_range = list(T0C + 200, T0C + 300) + temp_shift = 5 + + require_xgm_gas = GAS_O2 + rejects_xgm_gas = GAS_N2 + +/decl/chemical_reaction/distilling/toxin + name = REAGENT_TOXIN + id = "distill_rawtoxin" + result = REAGENT_ID_TOXIN + required_reagents = list(REAGENT_ID_SACID = 2, REAGENT_ID_CYANIDE = 1) + result_amount = 1 + + temp_range = list(T0C + 120, T0C + 580) + temp_shift = 2 + + require_xgm_gas = GAS_PHORON + rejects_xgm_gas = GAS_N2 + + +// Marker ink for paint production +/decl/chemical_reaction/distilling/marker_ink_black + name = REAGENT_MARKERINKBLACK + id = "distill_marker_black" + result = REAGENT_ID_MARKERINKBLACK + required_reagents = list(REAGENT_ID_LUBE = 1, REAGENT_ID_ETHANOL = 1, REAGENT_ID_CARBON = 1) + result_amount = 1 + + temp_range = list(T20C + 90, T20C + 160) + temp_shift = -1 + + require_xgm_gas = GAS_O2 + rejects_xgm_gas = GAS_PHORON + +/decl/chemical_reaction/distilling/marker_ink_red + name = REAGENT_MARKERINKRED + id = "distill_marker_red" + result = REAGENT_ID_MARKERINKRED + required_reagents = list(REAGENT_ID_LUBE = 1, REAGENT_ID_ETHANOL = 1, REAGENT_ID_IRON = 1) + result_amount = 1 + + temp_range = list(T20C + 90, T20C + 160) + temp_shift = -1 + + require_xgm_gas = GAS_O2 + rejects_xgm_gas = GAS_PHORON + +/decl/chemical_reaction/distilling/marker_ink_yellow + name = REAGENT_MARKERINKYELLOW + id = "distill_marker_yellow" + result = REAGENT_ID_MARKERINKYELLOW + required_reagents = list(REAGENT_ID_LUBE = 1, REAGENT_ID_ETHANOL = 1, REAGENT_ID_SULFUR = 1) + result_amount = 1 + + temp_range = list(T20C + 90, T20C + 160) + temp_shift = -1 + + require_xgm_gas = GAS_O2 + rejects_xgm_gas = GAS_PHORON + +/decl/chemical_reaction/distilling/marker_ink_green + name = REAGENT_MARKERINKGREEN + id = "distill_marker_green" + result = REAGENT_ID_MARKERINKGREEN + required_reagents = list(REAGENT_ID_LUBE = 1, REAGENT_ID_ETHANOL = 1, REAGENT_ID_COPPER = 1) + result_amount = 1 + + temp_range = list(T20C + 90, T20C + 160) + temp_shift = -1 + + require_xgm_gas = GAS_O2 + rejects_xgm_gas = GAS_PHORON + +/decl/chemical_reaction/distilling/marker_ink_blue + name = REAGENT_MARKERINKBLUE + id = "distill_marker_blue" + result = REAGENT_ID_MARKERINKBLUE + required_reagents = list(REAGENT_ID_LUBE = 1, REAGENT_ID_ETHANOL = 1, REAGENT_ID_PRUSSIANBLUE = 1) + result_amount = 1 + + temp_range = list(T20C + 90, T20C + 160) + temp_shift = -1 + + require_xgm_gas = GAS_O2 + rejects_xgm_gas = GAS_PHORON + +/decl/chemical_reaction/distilling/marker_ink_grey + name = REAGENT_MARKERINKGREY + id = "distill_marker_grey" + result = REAGENT_ID_MARKERINKGREY + required_reagents = list(REAGENT_ID_LUBE = 1, REAGENT_ID_ETHANOL = 1, REAGENT_ID_TIN = 1) + result_amount = 1 + + temp_range = list(T20C + 90, T20C + 160) + temp_shift = -1 + + require_xgm_gas = GAS_O2 + rejects_xgm_gas = GAS_PHORON + + +// Secondary distillation for markers +/decl/chemical_reaction/distilling/marker_ink_orange + name = REAGENT_MARKERINKORANGE + id = "distill_marker_orange" + result = REAGENT_ID_MARKERINKORANGE + required_reagents = list(REAGENT_ID_MARKERINKRED = 1, REAGENT_ID_MARKERINKYELLOW = 1) + result_amount = 1 + + temp_range = list(T20C + 90, T20C + 160) + temp_shift = -1 + + require_xgm_gas = GAS_O2 + rejects_xgm_gas = GAS_PHORON + +/decl/chemical_reaction/distilling/marker_ink_purple + name = REAGENT_MARKERINKPURPLE + id = "distill_marker_purple" + result = REAGENT_ID_MARKERINKPURPLE + required_reagents = list(REAGENT_ID_MARKERINKRED = 1, REAGENT_ID_MARKERINKBLUE = 1) + result_amount = 1 + + temp_range = list(T20C + 90, T20C + 160) + temp_shift = -1 + + require_xgm_gas = GAS_O2 + rejects_xgm_gas = GAS_PHORON + +/decl/chemical_reaction/distilling/marker_ink_brown + name = REAGENT_MARKERINKBROWN + id = "distill_marker_brown" + result = REAGENT_ID_MARKERINKBROWN + required_reagents = list(REAGENT_ID_MARKERINKRED = 1, REAGENT_ID_MARKERINKGREY = 1) + result_amount = 1 + + temp_range = list(T20C + 90, T20C + 160) + temp_shift = -1 + + require_xgm_gas = GAS_O2 + rejects_xgm_gas = GAS_PHORON diff --git a/code/modules/reagents/reactions/distilling/hydroponics.dm b/code/modules/reagents/reactions/distilling/hydroponics.dm new file mode 100644 index 00000000000..9f340eff3cb --- /dev/null +++ b/code/modules/reagents/reactions/distilling/hydroponics.dm @@ -0,0 +1,52 @@ +// Hydroponics refinery fun +/decl/chemical_reaction/distilling/fertilizer + name = REAGENT_FERTILIZER + id = "distill_fertilizer" + result = REAGENT_ID_FERTILIZER + required_reagents = list(REAGENT_ID_WATER = 5, REAGENT_ID_NUTRIMENT = 1, REAGENT_ID_PHOSPHORUS = 1, REAGENT_ID_SULFUR = 1) + result_amount = 3 + + temp_range = list(T20C + 40, T20C + 60) + temp_shift = 0 + + require_xgm_gas = GAS_CO2 + rejects_xgm_gas = GAS_N2 + +/decl/chemical_reaction/distilling/eznutrient + name = REAGENT_EZNUTRIENT + id = "distill_eznutriment" + result = REAGENT_ID_EZNUTRIENT + required_reagents = list(REAGENT_ID_FERTILIZER = 1, REAGENT_ID_CALCIUM = 1, REAGENT_ID_CARBON = 2) + result_amount = 1 + + temp_range = list(T0C + 10, T0C + 50) + temp_shift = 0 + + require_xgm_gas = GAS_O2 + rejects_xgm_gas = GAS_PHORON + +/decl/chemical_reaction/distilling/leftforzed + name = REAGENT_LEFT4ZED + id = "distill_leftforzed" + result = REAGENT_ID_LEFT4ZED + required_reagents = list(REAGENT_ID_FERTILIZER = 1, REAGENT_ID_RADIUM = 2, REAGENT_ID_CALCIUM = 2) + result_amount = 1 + + temp_range = list(T0C + 40, T0C + 80) + temp_shift = 2 + + require_xgm_gas = GAS_PHORON + rejects_xgm_gas = GAS_N2 + +/decl/chemical_reaction/distilling/robustharvest + name = REAGENT_ROBUSTHARVEST + id = "distill_robustharvest" + result = REAGENT_ID_ROBUSTHARVEST + required_reagents = list(REAGENT_ID_FERTILIZER = 1, REAGENT_ID_CARBON = 2, REAGENT_ID_BICARIDINE = 1) + result_amount = 1 + + temp_range = list(T0C + 40, T0C + 80) + temp_shift = 2 + + require_xgm_gas = GAS_PHORON + rejects_xgm_gas = GAS_N2 diff --git a/code/modules/reagents/reactions/instant/instant.dm b/code/modules/reagents/reactions/instant/instant.dm index 50a16b8c9c4..633073d0a5a 100644 --- a/code/modules/reagents/reactions/instant/instant.dm +++ b/code/modules/reagents/reactions/instant/instant.dm @@ -11,6 +11,7 @@ id = REAGENT_ID_INAPROVALINE result = REAGENT_ID_INAPROVALINE required_reagents = list(REAGENT_ID_OXYGEN = 1, REAGENT_ID_CARBON = 1, REAGENT_ID_SUGAR = 1) + inhibitors = list(REAGENT_ID_WATER = 1) result_amount = 3 /decl/chemical_reaction/instant/dylovene @@ -140,6 +141,7 @@ id = REAGENT_ID_KELOTANE result = REAGENT_ID_KELOTANE required_reagents = list(REAGENT_ID_SILICON = 1, REAGENT_ID_CARBON = 1) + inhibitors = list(REAGENT_ID_WATER = 1) result_amount = 2 log_is_important = 1 @@ -494,6 +496,7 @@ id = REAGENT_ID_SODIUMCHLORIDE result = REAGENT_ID_SODIUMCHLORIDE required_reagents = list(REAGENT_ID_SODIUM = 1, REAGENT_ID_CHLORINE = 1) + inhibitors = list(REAGENT_ID_COPPER = 1) result_amount = 2 /decl/chemical_reaction/instant/condensedcapsaicin @@ -524,6 +527,7 @@ id = REAGENT_ID_LEXORIN result = REAGENT_ID_LEXORIN required_reagents = list(REAGENT_ID_PHORON = 1, REAGENT_ID_HYDROGEN = 1, REAGENT_ID_NITROGEN = 1) + inhibitors = list(REAGENT_ID_COPPER = 1) result_amount = 3 /decl/chemical_reaction/instant/methylphenidate @@ -1217,7 +1221,7 @@ id = REAGENT_ID_HYDROPHORON result = REAGENT_ID_HYDROPHORON required_reagents = list(REAGENT_ID_HYDROGEN = 1, REAGENT_ID_PHORON = 1) - inhibitors = list(REAGENT_ID_NITROGEN = 1) //So it doesn't mess with lexorin + inhibitors = list(REAGENT_ID_NITROGEN = 1, REAGENT_ID_COPPER = 1) //So it doesn't mess with lexorin result_amount = 2 /decl/chemical_reaction/instant/deuterium @@ -1287,3 +1291,201 @@ result = REAGENT_ID_ASUSTENANCE required_reagents = list(REAGENT_ID_NUTRIMENT = 1, REAGENT_ID_MUTAGEN = 1, REAGENT_ID_PHORON = 1) result_amount = 1 + +/decl/chemical_reaction/instant/titanium_oxidation + name = REAGENT_TITANIUMDIOX + id = "oxidize_titanium" + result = REAGENT_ID_TITANIUMDIOX + required_reagents = list(REAGENT_ID_TITANIUM = 1, REAGENT_ID_OXYGEN = 2) + result_amount = 1 + +/* Metallic paints */ +/decl/chemical_reaction/instant/metal_paint + name = "Metallic white paint" + id = "metal_paint" + result = REAGENT_ID_PAINT + required_reagents = list(REAGENT_ID_TITANIUMDIOX = 1, REAGENT_ID_WATER = 3, REAGENT_ID_MARKERINK = 1) + result_amount = 5 + +/decl/chemical_reaction/instant/metal_paint/send_data() + return "#b2d1da" + +/decl/chemical_reaction/instant/red_metal_paint + name = "Metallic red paint" + id = "red_metal_paint" + result = REAGENT_ID_PAINT + required_reagents = list(REAGENT_ID_TITANIUMDIOX = 1, REAGENT_ID_WATER = 3, REAGENT_ID_MARKERINKRED = 1) + result_amount = 5 + +/decl/chemical_reaction/instant/red_metal_paint/send_data() + return "#ff7a7a" + +/decl/chemical_reaction/instant/orange_metal_paint + name = "Metallic orange paint" + id = "orange_metal_paint" + result = REAGENT_ID_PAINT + required_reagents = list(REAGENT_ID_TITANIUMDIOX = 1, REAGENT_ID_WATER = 3, REAGENT_ID_MARKERINKORANGE = 1) + result_amount = 5 + +/decl/chemical_reaction/instant/orange_metal_paint/send_data() + return "#ffd690" + +/decl/chemical_reaction/instant/yellow_metal_paint + name = "Metallic yellow paint" + id = "yellow_metal_paint" + result = REAGENT_ID_PAINT + required_reagents = list(REAGENT_ID_TITANIUMDIOX = 1, REAGENT_ID_WATER = 3, REAGENT_ID_MARKERINKYELLOW = 1) + result_amount = 5 + +/decl/chemical_reaction/instant/yellow_metal_paint/send_data() + return "#ffffab" + +/decl/chemical_reaction/instant/green_metal_paint + name = "Metallic green paint" + id = "green_metal_paint" + result = REAGENT_ID_PAINT + required_reagents = list(REAGENT_ID_TITANIUMDIOX = 1, REAGENT_ID_WATER = 3, REAGENT_ID_MARKERINKGREEN = 1) + result_amount = 5 + +/decl/chemical_reaction/instant/green_metal_paint/send_data() + return "#69d76b" + +/decl/chemical_reaction/instant/blue_metal_paint + name = "Metallic blue paint" + id = "blue_metal_paint" + result = REAGENT_ID_PAINT + required_reagents = list(REAGENT_ID_TITANIUMDIOX = 1, REAGENT_ID_WATER = 3, REAGENT_ID_MARKERINKBLUE = 1) + result_amount = 5 + +/decl/chemical_reaction/instant/blue_metal_paint/send_data() + return "#81aff5" + +/decl/chemical_reaction/instant/purple_metal_paint + name = "Metallic purple paint" + id = "purple_metal_paint" + result = REAGENT_ID_PAINT + required_reagents = list(REAGENT_ID_TITANIUMDIOX = 1, REAGENT_ID_WATER = 3, REAGENT_ID_MARKERINKPURPLE = 1) + result_amount = 5 + +/decl/chemical_reaction/instant/purple_metal_paint/send_data() + return "#e77acc" + +/decl/chemical_reaction/instant/brown_metal_paint + name = "Metallic brown paint" + id = "brown_metal_paint" + result = REAGENT_ID_PAINT + required_reagents = list(REAGENT_ID_TITANIUMDIOX = 1, REAGENT_ID_WATER = 3, REAGENT_ID_MARKERINKBROWN = 1) + result_amount = 5 + +/decl/chemical_reaction/instant/brown_metal_paint/send_data() + return "#827655" + +/decl/chemical_reaction/instant/orange_juice_metal_paint + name = "Metallic orange juice paint" + id = "orange_juice_metal_paint" + result = REAGENT_ID_PAINT + required_reagents = list(REAGENT_ID_TITANIUMDIOX = 1, REAGENT_ID_WATER = 3, REAGENT_ID_ORANGEJUICE = 5) + result_amount = 5 + +/decl/chemical_reaction/instant/orange_juice_metal_paint/send_data() + return "#e2a254" + +/decl/chemical_reaction/instant/tomato_juice_metal_paint + name = "Metallic tomato juice paint" + id = "tomato_juice_metal_paint" + result = REAGENT_ID_PAINT + required_reagents = list(REAGENT_ID_TITANIUMDIOX = 1, REAGENT_ID_WATER = 3, REAGENT_ID_TOMATOJUICE = 5) + result_amount = 5 + +/decl/chemical_reaction/instant/tomato_juice_metal_paint/send_data() + return "#934e49" + +/decl/chemical_reaction/instant/lime_juice_metal_paint + name = "Metallic lime juice paint" + id = "lime_juice_metal_paint" + result = REAGENT_ID_PAINT + required_reagents = list(REAGENT_ID_TITANIUMDIOX = 1, REAGENT_ID_WATER = 3, REAGENT_ID_LIMEJUICE = 5) + result_amount = 5 + +/decl/chemical_reaction/instant/lime_juice_metal_paint/send_data() + return "#556c51" + +/decl/chemical_reaction/instant/carrot_juice_metal_paint + name = "Metallic carrot juice paint" + id = "carrot_juice_metal_paint" + result = REAGENT_ID_PAINT + required_reagents = list(REAGENT_ID_TITANIUMDIOX = 1, REAGENT_ID_WATER = 3, REAGENT_ID_CARROTJUICE = 5) + result_amount = 5 + +/decl/chemical_reaction/instant/carrot_juice_metal_paint/send_data() + return "#a06a4b" + +/decl/chemical_reaction/instant/berry_juice_metal_paint + name = "Metallic berry juice paint" + id = "berry_juice_metal_paint" + result = REAGENT_ID_PAINT + required_reagents = list(REAGENT_ID_TITANIUMDIOX = 1, REAGENT_ID_WATER = 3, REAGENT_ID_BERRYJUICE = 5) + result_amount = 5 + +/decl/chemical_reaction/instant/berry_juice_metal_paint/send_data() + return "#ae5892" + +/decl/chemical_reaction/instant/grape_juice_metal_paint + name = "Metallic grape juice paint" + id = "grape_juice_metal_paint" + result = REAGENT_ID_PAINT + required_reagents = list(REAGENT_ID_TITANIUMDIOX = 1, REAGENT_ID_WATER = 3, REAGENT_ID_GRAPEJUICE = 5) + result_amount = 5 + +/decl/chemical_reaction/instant/grape_juice_metal_paint/send_data() + return "#925e5e" + +/decl/chemical_reaction/instant/poisonberry_juice_metal_paint + name = "Metallic poison berry juice paint" + id = "poisonberry_juice_metal_paint" + result = REAGENT_ID_PAINT + required_reagents = list(REAGENT_ID_TITANIUMDIOX = 1, REAGENT_ID_WATER = 3, REAGENT_ID_POISONBERRYJUICE = 5) + result_amount = 5 + +/decl/chemical_reaction/instant/poisonberry_juice_metal_paint/send_data() + return "#683c4d" + +/decl/chemical_reaction/instant/watermelon_juice_metal_paint + name = "Metallic watermelon juice paint" + id = "watermelon_juice_metal_paint" + result = REAGENT_ID_PAINT + required_reagents = list(REAGENT_ID_TITANIUMDIOX = 1, REAGENT_ID_WATER = 3, REAGENT_ID_WATERMELONJUICE = 5) + result_amount = 5 + +/decl/chemical_reaction/instant/watermelon_juice_metal_paint/send_data() + return "#a47a7a" + +/decl/chemical_reaction/instant/lemon_juice_metal_paint + name = "Metallic lemon juice paint" + id = "lemon_juice_metal_paint" + result = REAGENT_ID_PAINT + required_reagents = list(REAGENT_ID_TITANIUMDIOX = 1, REAGENT_ID_WATER = 3, REAGENT_ID_LEMONJUICE = 5) + result_amount = 5 + +/decl/chemical_reaction/instant/lemon_juice_metal_paint/send_data() + return "#8f8f5c" + +/decl/chemical_reaction/instant/banana_juice_metal_paint + name = "Metallic banana juice paint" + id = "banana_juice_metal_paint" + result = REAGENT_ID_PAINT + required_reagents = list(REAGENT_ID_TITANIUMDIOX = 1, REAGENT_ID_WATER = 3, REAGENT_ID_BANANA = 5) + result_amount = 5 + +/decl/chemical_reaction/instant/banana_juice_metal_paint/send_data() + return "#9c9129" + +/decl/chemical_reaction/instant/potato_juice_metal_paint + name = "Metallic potato juice paint" + id = "potato_juice_metal_paint" + result = REAGENT_ID_PAINT + required_reagents = list(REAGENT_ID_TITANIUMDIOX = 1, REAGENT_ID_WATER = 3, REAGENT_ID_POTATOJUICE = 5) + result_amount = 5 + +/decl/chemical_reaction/instant/potato_juice_metal_paint/send_data() + return "#2e2a21" diff --git a/code/modules/reagents/reagents/_reagents.dm b/code/modules/reagents/reagents/_reagents.dm index 96fcb5f4608..682cc0c7132 100644 --- a/code/modules/reagents/reagents/_reagents.dm +++ b/code/modules/reagents/reagents/_reagents.dm @@ -46,6 +46,8 @@ var/from_belly = FALSE var/wiki_flag = 0 // Bitflags for secret/food/drink reagent sorting + var/supply_conversion_value = null + var/industrial_use = null // unique description for export off station /datum/reagent/proc/remove_self(var/amount) // Shortcut if(holder) diff --git a/code/modules/reagents/reagents/core.dm b/code/modules/reagents/reagents/core.dm index 49df4025515..f8083cd90fb 100644 --- a/code/modules/reagents/reagents/core.dm +++ b/code/modules/reagents/reagents/core.dm @@ -15,6 +15,10 @@ glass_name = "tomato juice" glass_desc = "Are you sure this is tomato juice?" + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_BIOHAZARD + + /datum/reagent/blood/initialize_data(var/newdata) ..() if(data && data["blood_colour"]) @@ -210,6 +214,9 @@ color = "#0050F0" mrate_static = TRUE + supply_conversion_value = REFINERYEXPORT_VALUE_RARE + industrial_use = REFINERYEXPORT_REASON_MEDSCI + /datum/reagent/antibodies/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(src.data) M.antibodies |= src.data[REAGENT_ID_ANTIBODIES] @@ -229,6 +236,9 @@ glass_name = REAGENT_ID_WATER glass_desc = "The father of all refreshments." + supply_conversion_value = REFINERYEXPORT_VALUE_NO + industrial_use = REFINERYEXPORT_REASON_RAW + /datum/reagent/water/touch_turf(var/turf/simulated/T) if(!istype(T)) return @@ -324,6 +334,9 @@ glass_name = "welder fuel" glass_desc = "Unless you are an industrial tool, this is probably not safe for consumption." + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_RAW + /datum/reagent/fuel/touch_turf(var/turf/T, var/amount) ..() new /obj/effect/decal/cleanable/liquid_fuel(T, amount, FALSE) diff --git a/code/modules/reagents/reagents/dispenser.dm b/code/modules/reagents/reagents/dispenser.dm index 0652d27e960..a2851948821 100644 --- a/code/modules/reagents/reagents/dispenser.dm +++ b/code/modules/reagents/reagents/dispenser.dm @@ -6,6 +6,8 @@ taste_mult = 1.1 reagent_state = SOLID color = "#A8A8A8" + supply_conversion_value = 1 // has sheet value + industrial_use = REFINERYEXPORT_REASON_RAW /datum/reagent/calcium name = REAGENT_CALCIUM @@ -15,6 +17,8 @@ taste_mult = 1.3 reagent_state = SOLID color = "#e9e6e4" + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_RAW //VOREStation Edit /datum/reagent/calcium/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) @@ -37,6 +41,8 @@ reagent_state = SOLID color = "#1C1300" ingest_met = REM * 5 + supply_conversion_value = REFINERYEXPORT_VALUE_UNWANTED + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/carbon/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) @@ -65,6 +71,8 @@ taste_description = "pool water" reagent_state = GAS color = "#808080" + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_RAW /datum/reagent/chlorine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.take_organ_damage(1*REM, 0) @@ -78,6 +86,8 @@ description = "A highly ductile metal." taste_description = "pennies" color = "#6E3B08" + supply_conversion_value = 0.5 SHEET_TO_REAGENT_EQUIVILENT // has sheet value + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/ethanol name = REAGENT_ETHANOL //Parent class for all alcoholic reagents. @@ -105,6 +115,8 @@ affects_robots = 1 //kiss my shiny metal ass wiki_flag = WIKI_DRINK + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_FOOD /datum/reagent/ethanol/touch_mob(var/mob/living/L, var/amount) ..() @@ -290,6 +302,8 @@ taste_description = "acid" reagent_state = GAS color = "#808080" + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_RAW /datum/reagent/fluorine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.adjustToxLoss(removed) @@ -304,6 +318,8 @@ taste_mult = 0 //no taste reagent_state = GAS color = "#808080" + supply_conversion_value = REFINERYEXPORT_VALUE_NO + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/iron name = REAGENT_IRON @@ -312,6 +328,8 @@ taste_description = "metal" reagent_state = SOLID color = "#353535" + supply_conversion_value = 1 SHEET_TO_REAGENT_EQUIVILENT // has sheet value + industrial_use = REFINERYEXPORT_REASON_RAW /datum/reagent/lithium name = REAGENT_LITHIUM @@ -320,6 +338,8 @@ taste_description = "metal" reagent_state = SOLID color = "#808080" + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/lithium/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien != IS_DIONA) @@ -335,6 +355,8 @@ taste_mult = 0 //mercury apparently is tasteless. IDK reagent_state = LIQUID color = "#484848" + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/mercury/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien != IS_DIONA) @@ -351,6 +373,8 @@ taste_mult = 0 //no taste reagent_state = GAS color = "#808080" + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_RAW /datum/reagent/oxygen name = REAGENT_OXYGEN @@ -359,6 +383,8 @@ taste_mult = 0 reagent_state = GAS color = "#808080" + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_RAW /datum/reagent/oxygen/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_VOX) @@ -371,6 +397,8 @@ taste_description = "vinegar" reagent_state = SOLID color = "#832828" + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_RAW /datum/reagent/potassium name = REAGENT_POTASSIUM @@ -379,6 +407,8 @@ taste_description = "sweetness" //potassium is bitter in higher doses but sweet in lower ones. reagent_state = SOLID color = "#A0A0A0" + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_RAW /datum/reagent/radium name = REAGENT_RADIUM @@ -387,6 +417,8 @@ taste_mult = 0 //Apparently radium is tasteless reagent_state = SOLID color = "#C7C7C7" + supply_conversion_value = REFINERYEXPORT_VALUE_RARE + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/radium/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(issmall(M)) removed *= 2 @@ -408,6 +440,8 @@ taste_mult = 0 //Apparently radium is tasteless reagent_state = SOLID color = "#C7C7C7" + supply_conversion_value = REFINERYEXPORT_VALUE_RARE + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/radium/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(issmall(M)) removed *= 2 @@ -428,6 +462,8 @@ touch_met = 50 // It's acid! var/power = 5 var/meltdose = 10 // How much is needed to melt + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/acid/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(issmall(M)) removed *= 2 @@ -512,6 +548,8 @@ taste_mult = 0 reagent_state = SOLID color = "#A8A8A8" + supply_conversion_value = REFINERYEXPORT_VALUE_UNWANTED + industrial_use = REFINERYEXPORT_REASON_RAW /datum/reagent/sodium name = REAGENT_SODIUM @@ -520,6 +558,8 @@ taste_description = "salty metal" reagent_state = SOLID color = "#808080" + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_RAW /datum/reagent/sugar name = REAGENT_SUGAR @@ -534,6 +574,9 @@ glass_desc = "The organic compound commonly known as table sugar and sometimes called saccharose. This white, odorless, crystalline powder has a pleasing, sweet taste." glass_icon = DRINK_ICON_NOISY + supply_conversion_value = REFINERYEXPORT_VALUE_RARE + industrial_use = REFINERYEXPORT_REASON_FOOD + /datum/reagent/sugar/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.adjust_nutrition(removed * 3) @@ -562,6 +605,8 @@ taste_description = "old eggs" reagent_state = SOLID color = "#BF8C00" + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_RAW /datum/reagent/tungsten name = REAGENT_TUNGSTEN @@ -571,3 +616,38 @@ taste_mult = 0 //no taste reagent_state = SOLID color = "#DCDCDC" + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_PRECURSOR + +/datum/reagent/titanium_dioxide + name = REAGENT_TITANIUMDIOX + id = REAGENT_ID_TITANIUMDIOX + description = "A crumbly white powder, often used in dyes." + taste_description = "metal" + taste_mult = 0 //no taste + reagent_state = SOLID + color = "#cadcef" + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_COSMETIC + +/datum/reagent/titanium + name = REAGENT_TITANIUM + id = REAGENT_ID_TITANIUM + description = "A chemical element, lightweight and biologically inert." + taste_description = "metal" + taste_mult = 0 //no taste + reagent_state = SOLID + color = "#cadcef" + supply_conversion_value = REFINERYEXPORT_VALUE_RARE + industrial_use = REFINERYEXPORT_REASON_INDUSTRY + +/datum/reagent/tin + name = REAGENT_TIN + id = REAGENT_ID_TIN + description = "A chemical element, soft and highly flexible." + taste_description = "metal" + taste_mult = 0 //no taste + reagent_state = SOLID + color = "#efe9ca" + supply_conversion_value = 0.5 SHEET_TO_REAGENT_EQUIVILENT // has sheet value + industrial_use = REFINERYEXPORT_REASON_PRECURSOR diff --git a/code/modules/reagents/reagents/drugs.dm b/code/modules/reagents/reagents/drugs.dm index 37a9326ef2a..609adceb877 100644 --- a/code/modules/reagents/reagents/drugs.dm +++ b/code/modules/reagents/reagents/drugs.dm @@ -23,6 +23,9 @@ mrate_static = TRUE overdose = REAGENTS_OVERDOSE + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_ILLDRUG + /datum/reagent/drugs/affect_blood(mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) return @@ -55,6 +58,8 @@ "Colors seem... flatter.", "Everything feels a little dull, now.") wiki_flag = WIKI_SPOILER + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED // bonus + industrial_use = REFINERYEXPORT_REASON_ILLDRUG /datum/reagent/drugs/bliss/affect_blood(mob/living/carbon/M, var/alien, var/removed) ..() @@ -99,6 +104,8 @@ "Reality seems like a real pain in the ass to deal with right now.", "Things feel really colourless to you all of a sudden.", "You feel the urge to lie down and nap.") + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED // bonus + industrial_use = REFINERYEXPORT_REASON_ILLDRUG /datum/reagent/drugs/ambrosia_extract/affect_blood(mob/living/carbon/M, var/alien, var/removed) ..() @@ -131,6 +138,8 @@ "Nothing really makes sense right now.", "It feels like you've melded with the world around you...") sober_message_list = list("Everything feels... flat.", "You feel almost TOO grounded in your surroundings.") + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED // bonus + industrial_use = REFINERYEXPORT_REASON_ILLDRUG /datum/reagent/drugs/psilocybin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) ..() @@ -184,6 +193,8 @@ "Nothing really makes sense right now.", "It feels like you've melded with the world around you...") sober_message_list = list("Everything feels... flat.", "You feel almost TOO grounded in your surroundings.") + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_ILLDRUG /datum/reagent/drugs/talum_quem/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) ..() @@ -209,6 +220,8 @@ taste_description = "sour staleness" color = "#181818" high_messages = FALSE + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_RECDRUG /datum/reagent/drugs/nicotine/handle_addiction(var/mob/living/carbon/M, var/alien) // A copy of the base with withdrawl, but with much less effects, such as vomiting. @@ -254,6 +267,8 @@ color = "#BF80BF" high_message_list = list("You feel focused.", "Your attention is undivided.") sober_message_list = list("It becomes harder to focus...", "You feel distractible.") + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_DRUG /datum/reagent/drugs/citalopram name = REAGENT_CITALOPRAM @@ -263,6 +278,8 @@ color = "#FF80FF" high_message_list = list("Everything feels a bit more steady.", "Your mind feels stable.") sober_message_list = list("You feel a little tired.", "You feel a little more listless...") + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_DRUG /datum/reagent/drugs/citalopram/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) ..() @@ -277,6 +294,8 @@ color = "#FF80BF" high_message_list = list("Everything feels good, stable.", "You feel grounded.") sober_message_list = list("The stability is gone...", "Everything is much less stable.") + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_DRUG /datum/reagent/drugs/paroxetine/affect_blood(mob/living/carbon/M, var/alien, var/removed) ..() @@ -295,3 +314,5 @@ color = "#e6efe3" high_message_list = list("You feel sluggish...", "You feel calm and collected.") sober_message_list = list("You feel so much more antsy...", "Your concentration wavers.") + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_DRUG diff --git a/code/modules/reagents/reagents/food_drinks.dm b/code/modules/reagents/reagents/food_drinks.dm index a26ec2aa2f5..fac8821d2f0 100644 --- a/code/modules/reagents/reagents/food_drinks.dm +++ b/code/modules/reagents/reagents/food_drinks.dm @@ -14,6 +14,9 @@ affects_robots = 1 //VOREStation Edit wiki_flag = WIKI_FOOD + supply_conversion_value = REFINERYEXPORT_VALUE_UNWANTED + industrial_use = REFINERYEXPORT_REASON_FOOD + /datum/reagent/nutriment/mix_data(var/list/newdata, var/newamount) if(!islist(newdata) || !newdata.len) @@ -660,6 +663,8 @@ reagent_state = LIQUID color = "#BBEDA4" overdose = REAGENTS_OVERDOSE + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_DIET /datum/reagent/lipozine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.adjust_nutrition(-10 * removed) @@ -676,6 +681,8 @@ overdose = REAGENTS_OVERDOSE ingest_met = REM cup_prefix = "salty" + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_FOOD /datum/reagent/sodiumchloride/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) ..() @@ -697,6 +704,8 @@ color = "#000000" cup_prefix = "peppery" wiki_flag = WIKI_FOOD + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_FOOD /datum/reagent/enzyme name = REAGENT_ENZYME @@ -708,6 +717,8 @@ color = "#365E30" overdose = REAGENTS_OVERDOSE wiki_flag = WIKI_FOOD + supply_conversion_value = REFINERYEXPORT_VALUE_RARE + industrial_use = REFINERYEXPORT_REASON_FOOD /datum/reagent/spacespice name = REAGENT_SPACESPICE @@ -717,6 +728,8 @@ color = "#e08702" cup_prefix = "spicy" wiki_flag = WIKI_FOOD + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_FOOD /datum/reagent/browniemix name = REAGENT_BROWNIEMIX @@ -726,6 +739,8 @@ color = "#441a03" allergen_type = ALLERGEN_CHOCOLATE wiki_flag = WIKI_FOOD + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_FOOD /datum/reagent/cakebatter name = REAGENT_CAKEBATTER @@ -734,6 +749,8 @@ reagent_state = LIQUID color = "#F0EDDA" wiki_flag = WIKI_FOOD + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_FOOD /datum/reagent/frostoil name = REAGENT_FROSTOIL @@ -745,6 +762,8 @@ ingest_met = REM color = "#B31008" wiki_flag = WIKI_FOOD + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_FOOD /datum/reagent/frostoil/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) @@ -783,6 +802,8 @@ reagent_state = LIQUID color = "#B31008" metabolism = REM * 0.5 + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_MATSCI /datum/reagent/capsaicin name = REAGENT_CAPSAICIN @@ -795,6 +816,8 @@ color = "#B31008" cup_prefix = "hot" wiki_flag = WIKI_FOOD + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_WEAPONS /datum/reagent/capsaicin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) @@ -839,6 +862,8 @@ ingest_met = REM color = "#B31008" cup_prefix = "dangerously hot" + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_WEAPONS /datum/reagent/condensedcapsaicin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) @@ -973,7 +998,7 @@ /* Drinks */ /datum/reagent/drink - name = REAGENT_DRINK + name = REAGENT_DEVELOPER_WARNING // Unit test ignore id = REAGENT_ID_DRINK description = "Uh, some kind of drink." ingest_met = REM @@ -986,6 +1011,8 @@ var/adj_temp = 0 var/water_based = TRUE wiki_flag = WIKI_DRINK + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_FOOD /datum/reagent/drink/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) var/strength_mod = 1 @@ -1184,6 +1211,8 @@ glass_name = "poison berry juice" glass_desc = "A glass of deadly juice." cup_prefix = "poison" + supply_conversion_value = REFINERYEXPORT_VALUE_UNWANTED + industrial_use = REFINERYEXPORT_REASON_BIOHAZARD /datum/reagent/drink/juice/potato name = REAGENT_POTATOJUICE @@ -5028,6 +5057,9 @@ glass_name = REAGENT_ID_CINNAMONPOWDER glass_desc = "A glass of ground cinnamon. Dare you take the challenge?" + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_FOOD + /datum/reagent/gelatin name = REAGENT_GELATIN id = REAGENT_ID_GELATIN @@ -5037,3 +5069,6 @@ glass_name = REAGENT_GELATIN glass_desc = "It's like flavourless slime." + + supply_conversion_value = REFINERYEXPORT_VALUE_UNWANTED + industrial_use = REFINERYEXPORT_REASON_FOOD diff --git a/code/modules/reagents/reagents/food_drinks_vr.dm b/code/modules/reagents/reagents/food_drinks_vr.dm index 619ec36e6cf..fad189a55e8 100644 --- a/code/modules/reagents/reagents/food_drinks_vr.dm +++ b/code/modules/reagents/reagents/food_drinks_vr.dm @@ -9,6 +9,8 @@ reagent_state = LIQUID color = "#ff2424" strength = 10 + supply_conversion_value = REFINERYEXPORT_VALUE_NO + industrial_use = REFINERYEXPORT_REASON_BIOHAZARD /datum/reagent/toxin/plantcolony name = REAGENT_PLANTCOLONY @@ -18,6 +20,8 @@ reagent_state = LIQUID color = "#7ce01f" strength = 10 + supply_conversion_value = REFINERYEXPORT_VALUE_NO + industrial_use = REFINERYEXPORT_REASON_BIOHAZARD /datum/reagent/nutriment/grubshake name = REAGENT_GRUBSHAKE @@ -353,9 +357,6 @@ glass_name = REAGENT_SCSATW glass_desc = "The best accessory to daydrinking." -/datum/reagent/drink - name = REAGENT_DEVELOPER_WARNING // Unit test ignore - /datum/reagent/drink/choccymilk name = REAGENT_CHOCCYMILK id = REAGENT_ID_CHOCCYMILK diff --git a/code/modules/reagents/reagents/medicine.dm b/code/modules/reagents/reagents/medicine.dm index 057ac202f9a..49e4020af5c 100644 --- a/code/modules/reagents/reagents/medicine.dm +++ b/code/modules/reagents/reagents/medicine.dm @@ -10,6 +10,8 @@ overdose = REAGENTS_OVERDOSE * 2 metabolism = REM * 0.2 scannable = 1 + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_DRUG /datum/reagent/inaprovaline/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien != IS_DIONA) @@ -29,6 +31,8 @@ scannable = 1 touch_met = REM * 0.3 can_overdose_touch = TRUE + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_SPECIALDRUG /datum/reagent/inaprovaline/topical/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien != IS_DIONA) @@ -51,6 +55,8 @@ overdose = REAGENTS_OVERDOSE overdose_mod = 0.25 scannable = 1 + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_DRUG /datum/reagent/bicaridine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) var/chem_effective = 1 * M.species.chem_strength_heal @@ -88,6 +94,8 @@ scannable = 1 touch_met = REM * 0.75 can_overdose_touch = TRUE + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_SPECIALDRUG /datum/reagent/bicaridine/topical/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) var/chem_effective = 1 * M.species.chem_strength_heal @@ -114,6 +122,8 @@ overdose = REAGENTS_OVERDOSE * 0.8 metabolism = REM * 0.4 scannable = 1 + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_DRUG /datum/reagent/calciumcarbonate/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) // Why would you inject this. if(alien != IS_DIONA) @@ -132,6 +142,8 @@ color = "#FFA800" overdose = REAGENTS_OVERDOSE scannable = 1 + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_DRUG /datum/reagent/kelotane/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) var/chem_effective = 1 * M.species.chem_strength_heal @@ -152,6 +164,8 @@ color = "#FF8000" overdose = REAGENTS_OVERDOSE * 0.5 scannable = 1 + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_DRUG /datum/reagent/dermaline/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) var/chem_effective = 1 * M.species.chem_strength_heal @@ -172,6 +186,8 @@ scannable = 1 touch_met = REM * 0.75 can_overdose_touch = TRUE + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_SPECIALDRUG /datum/reagent/dermaline/topical/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) var/chem_effective = 1 * M.species.chem_strength_heal @@ -196,6 +212,8 @@ reagent_state = LIQUID color = "#00A000" scannable = 1 + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_DRUG /datum/reagent/dylovene/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) var/chem_effective = 1 * M.species.chem_strength_heal @@ -219,6 +237,8 @@ scannable = 1 overdose = REAGENTS_OVERDOSE * 0.5 overdose_mod = 0 // Not used, but it shouldn't deal toxin damage anyways. Carth heals toxins! + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_SPECIALDRUG /datum/reagent/carthatoline/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) @@ -255,6 +275,8 @@ overdose = REAGENTS_OVERDOSE scannable = 1 metabolism = REM * 0.25 + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_DRUG /datum/reagent/dexalin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_VOX) @@ -280,6 +302,8 @@ overdose = REAGENTS_OVERDOSE * 0.5 overdose_mod = 1.25 scannable = 1 + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_SPECIALDRUG /datum/reagent/dexalinp/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_VOX) @@ -303,6 +327,8 @@ reagent_state = LIQUID color = "#8040FF" scannable = 1 + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_DRUG /datum/reagent/tricordrazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien != IS_DIONA) @@ -326,6 +352,8 @@ color = "#B060FF" scannable = 1 can_overdose_touch = TRUE + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_SPECIALDRUG /datum/reagent/tricorlidaze/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) if(alien != IS_DIONA) @@ -363,6 +391,8 @@ metabolism = REM * 0.5 mrate_static = TRUE scannable = 1 + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_CLONEDRUG /datum/reagent/cryoxadone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(M.bodytemperature < 170) @@ -388,6 +418,8 @@ metabolism = REM * 0.5 mrate_static = TRUE scannable = 1 + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_CLONEDRUG /datum/reagent/clonexadone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(M.bodytemperature < 170) @@ -415,6 +447,8 @@ mrate_static = TRUE affects_dead = FALSE //Clarifying this here since the original intent was this ONLY works on people that have the bloodpump_corpse modifier. scannable = 1 + supply_conversion_value = REFINERYEXPORT_VALUE_MASSINDUSTRY + industrial_use = REFINERYEXPORT_REASON_CLONEDRUG /datum/reagent/mortiferin/on_mob_life(var/mob/living/carbon/M, var/alien, var/datum/reagents/metabolism/location) . = ..(M, alien, location) @@ -454,6 +488,8 @@ mrate_static = TRUE scannable = 1 affects_dead = TRUE + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_CLONEDRUG /datum/reagent/necroxadone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) var/chem_effective = 1 * M.species.chem_strength_heal @@ -490,6 +526,8 @@ scannable = 1 metabolism = 0.02 mrate_static = TRUE + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_DRUG /datum/reagent/paracetamol/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) var/chem_effective = 1 * M.species.chem_strength_pain @@ -515,6 +553,8 @@ scannable = 1 metabolism = 0.02 mrate_static = TRUE + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_DRUG /datum/reagent/tramadol/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) var/chem_effective = 1 * M.species.chem_strength_pain @@ -539,6 +579,8 @@ scannable = 1 metabolism = 0.02 mrate_static = TRUE + supply_conversion_value = REFINERYEXPORT_VALUE_MASSINDUSTRY + industrial_use = REFINERYEXPORT_REASON_SPECIALDRUG /datum/reagent/oxycodone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) var/chem_effective = 1 * M.species.chem_strength_pain @@ -566,6 +608,8 @@ metabolism = REM * 0.05 overdose = REAGENTS_OVERDOSE scannable = 1 + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_DRUG /datum/reagent/synaptizine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) var/chem_effective = 1 * M.species.chem_strength_heal @@ -595,6 +639,8 @@ color = "#FF3300" overdose = REAGENTS_OVERDOSE * 0.5 overdose_mod = 0.25 + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_COMSTIM /datum/reagent/hyperzine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_TAJARA) @@ -626,6 +672,8 @@ metabolism = REM * 0.25 overdose = REAGENTS_OVERDOSE scannable = 1 + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_SPECIALDRUG /datum/reagent/alkysine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) @@ -649,6 +697,8 @@ color = "#C8A5DC" overdose = REAGENTS_OVERDOSE scannable = 1 + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_SPECIALDRUG /datum/reagent/imidazoline/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.eye_blurry = max(M.eye_blurry - 5, 0) @@ -674,6 +724,8 @@ overdose = 10 overdose_mod = 1.5 scannable = 1 + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_SPECIALDRUG /datum/reagent/peridaxon/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(ishuman(M)) @@ -707,6 +759,8 @@ overdose = REAGENTS_OVERDOSE * 0.5 overdose_mod = 1.5 scannable = 1 + supply_conversion_value = REFINERYEXPORT_VALUE_MASSINDUSTRY + industrial_use = REFINERYEXPORT_REASON_SPECIALDRUG /datum/reagent/osteodaxon/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) @@ -740,6 +794,8 @@ overdose_mod = 1.5 scannable = 1 var/repair_strength = 6 + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_SPECIALDRUG /datum/reagent/myelamine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) @@ -787,6 +843,8 @@ overdose = 10 overdose_mod = 1.75 scannable = 1 + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_SPECIALDRUG /datum/reagent/respirodaxon/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) var/repair_strength = 1 * M.species.chem_strength_heal @@ -819,6 +877,8 @@ overdose = 10 overdose_mod = 1.75 scannable = 1 + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_SPECIALDRUG /datum/reagent/gastirodaxon/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) var/repair_strength = 1 * M.species.chem_strength_heal @@ -851,6 +911,8 @@ overdose = 10 overdose_mod = 1.75 scannable = 1 + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_SPECIALDRUG /datum/reagent/hepanephrodaxon/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) var/repair_strength = 1 * M.species.chem_strength_heal @@ -885,6 +947,8 @@ overdose = 10 overdose_mod = 1.75 scannable = 1 + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_SPECIALDRUG /datum/reagent/cordradaxon/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) var/repair_strength = 1 * M.species.chem_strength_heal @@ -914,6 +978,8 @@ overdose_mod = 1.5 scannable = 1 metabolism = REM * 0.06 + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_SPECIALDRUG /datum/reagent/immunosuprizine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) var/strength_mod = 1 // * M.species.chem_strength_heal //Just removing the chem strength adjustment. It'd require division, which is best avoided. @@ -969,6 +1035,8 @@ overdose = 20 overdose_mod = 1.5 scannable = 1 + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_SPECIALDRUG /datum/reagent/skrellimmuno/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) var/strength_mod = 0.5 * M.species.chem_strength_heal @@ -1009,6 +1077,8 @@ reagent_state = SOLID color = "#004000" overdose = REAGENTS_OVERDOSE + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_CLONEDRUG /datum/reagent/ryetalyn/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) //Ryetalyn is for genetics damage curing not resetting mutations, breaks traitgenes @@ -1025,6 +1095,8 @@ reagent_state = SOLID color = "#605048" overdose = REAGENTS_OVERDOSE + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_RECDRUG /datum/reagent/ethylredoxrazine/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) @@ -1060,6 +1132,8 @@ metabolism = REM * 0.25 overdose = REAGENTS_OVERDOSE scannable = 1 + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_SPECIALDRUG /datum/reagent/hyronalin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) @@ -1078,6 +1152,8 @@ overdose = REAGENTS_OVERDOSE overdose_mod = 1.25 scannable = 1 + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_CLONEDRUG /datum/reagent/arithrazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) @@ -1100,6 +1176,8 @@ overdose = REAGENTS_OVERDOSE scannable = 1 data = 0 + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_DRUG /datum/reagent/spaceacillin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) ..() @@ -1129,6 +1207,8 @@ overdose_mod = 1.5 scannable = 1 data = 0 + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_DRUG /datum/reagent/corophizine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) ..() @@ -1198,6 +1278,8 @@ scannable = 1 data = 0 can_overdose_touch = TRUE + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_DRUG /datum/reagent/spacomycaze/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.add_chemical_effect(CE_PAINKILLER, 10 * M.species.chem_strength_pain) @@ -1242,6 +1324,8 @@ reagent_state = LIQUID color = "#C8A5DC" touch_met = 5 + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_CLEAN /datum/reagent/sterilizine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_SLIME) @@ -1293,6 +1377,8 @@ color = "#C8A5DC" overdose = REAGENTS_OVERDOSE scannable = 1 + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_CLONEDRUG /datum/reagent/leporazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) @@ -1316,6 +1402,8 @@ overdose = REAGENTS_OVERDOSE overdose_mod = 2 scannable = 1 + supply_conversion_value = REFINERYEXPORT_VALUE_MASSINDUSTRY + industrial_use = REFINERYEXPORT_REASON_CLONEDRUG /datum/reagent/rezadone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) @@ -1365,6 +1453,8 @@ scannable = 1 affects_robots = TRUE wiki_flag = WIKI_SPOILER + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_DRUG /datum/reagent/healing_nanites/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.heal_organ_damage(2 * removed, 2 * removed) @@ -1382,6 +1472,8 @@ metabolism = REM * 0.002 overdose = REAGENTS_OVERDOSE scannable = 1 + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_FOOD /datum/reagent/earthsblood name = REAGENT_EARTHSBLOOD @@ -1391,6 +1483,8 @@ reagent_state = LIQUID color = "#ffb500" overdose = REAGENTS_OVERDOSE * 0.50 + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_DRUG /datum/reagent/earthsblood/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) @@ -1414,6 +1508,8 @@ overdose = 15 overdose_mod = 1.2 scannable = 1 + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_DRUG /datum/reagent/acid/artificial_sustenance/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) // You need me... diff --git a/code/modules/reagents/reagents/medicine_vr.dm b/code/modules/reagents/reagents/medicine_vr.dm index 3bff5ac5158..507e74374e3 100644 --- a/code/modules/reagents/reagents/medicine_vr.dm +++ b/code/modules/reagents/reagents/medicine_vr.dm @@ -6,6 +6,8 @@ reagent_state = LIQUID color = "#d5e2e5" scannable = 1 + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_DRUG /datum/reagent/adranol/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) @@ -28,6 +30,8 @@ overdose = 20 //High OD. This is to make numbing bites have somewhat of a downside if you get bit too much. Have to go to medical for dialysis. scannable = 0 //Let's not have medical mechs able to make an extremely strong organic painkiller wiki_flag = WIKI_SPOILER + supply_conversion_value = REFINERYEXPORT_VALUE_RARE + industrial_use = REFINERYEXPORT_REASON_DRUG /datum/reagent/numbing_enzyme/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.add_chemical_effect(CE_PAINKILLER, 200) @@ -70,6 +74,8 @@ color = "#750404" overdose = REAGENTS_OVERDOSE * 0.5 scannable = 1 + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_DRUG /datum/reagent/vermicetol/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) var/chem_effective = 1 @@ -89,6 +95,9 @@ overdose = 5 scannable = 0 + supply_conversion_value = REFINERYEXPORT_VALUE_RARE + industrial_use = REFINERYEXPORT_REASON_DRUG + /datum/reagent/sleevingcure/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.remove_a_modifier_of_type(/datum/modifier/resleeving_sickness) M.remove_a_modifier_of_type(/datum/modifier/faux_resleeving_sickness) @@ -105,6 +114,8 @@ metabolism = REM * 0.25//20 ticks to do things per unit injected. This means injecting 30u will give you 10 minutes to do what you need. overdose = REAGENTS_OVERDOSE scannable = 1 + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_DRUG /datum/reagent/prussian_blue/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) @@ -120,6 +131,8 @@ reagent_state = LIQUID color = "#47AD6D" overdose = REAGENTS_OVERDOSE + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_DIET /datum/reagent/lipozilase/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.adjust_nutrition(-20 * removed) @@ -134,6 +147,8 @@ reagent_state = LIQUID color = "#61731C" overdose = REAGENTS_OVERDOSE + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_DIET /datum/reagent/lipostipo/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.adjust_nutrition(-20 * removed) @@ -200,6 +215,8 @@ "dragon" = /mob/living/simple_mob/vore/bigdragon/friendly, "leopardmander" = /mob/living/simple_mob/vore/leopardmander ) + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED // bonus + industrial_use = REFINERYEXPORT_REASON_WEAPONS /datum/reagent/polymorph/affect_blood(var/mob/living/carbon/target, var/removed) var/mob/living/M = target @@ -268,6 +285,8 @@ reagent_state = LIQUID color = "#ffffff" scannable = 1 + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_COSMETIC /datum/reagent/glamour/affect_blood(var/mob/living/carbon/target, var/removed) add_verb(target, /mob/living/carbon/human/proc/enter_cocoon) diff --git a/code/modules/reagents/reagents/modifiers.dm b/code/modules/reagents/reagents/modifiers.dm index 5b8f0614cbc..948e19d79e2 100644 --- a/code/modules/reagents/reagents/modifiers.dm +++ b/code/modules/reagents/reagents/modifiers.dm @@ -15,6 +15,9 @@ var/modifier_duration = 3 SECONDS // How long, per unit dose, will this last? // 2 SECONDS is the resolution of life code, and the modifier will expire before chemical processing tries to re-add it + supply_conversion_value = REFINERYEXPORT_VALUE_MASSINDUSTRY + industrial_use = REFINERYEXPORT_REASON_WEAPONS + /datum/reagent/modapplying/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) return @@ -31,6 +34,9 @@ modifier_to_add = /datum/modifier/cryogelled modifier_duration = 3 SECONDS + supply_conversion_value = REFINERYEXPORT_VALUE_MASSINDUSTRY + industrial_use = REFINERYEXPORT_REASON_CLONEDRUG + /datum/reagent/modapplying/cryofluid/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) ..(M, alien, removed) M.bodytemperature -= removed * 20 @@ -70,3 +76,6 @@ modifier_to_add = /datum/modifier/clone_stabilizer modifier_duration = 30 SECONDS + + supply_conversion_value = REFINERYEXPORT_VALUE_MASSINDUSTRY + industrial_use = REFINERYEXPORT_REASON_PHORON diff --git a/code/modules/reagents/reagents/other.dm b/code/modules/reagents/reagents/other.dm index 4dbe88683d6..d47c8ca92d3 100644 --- a/code/modules/reagents/reagents/other.dm +++ b/code/modules/reagents/reagents/other.dm @@ -8,6 +8,8 @@ reagent_state = LIQUID color = "#888888" overdose = 10 + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_COSMETIC /datum/reagent/crayon_dust/red name = REAGENT_CRAYONDUSTRED @@ -57,6 +59,8 @@ reagent_state = LIQUID color = "#888888" overdose = 10 + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_COSMETIC /datum/reagent/marker_ink/black name = REAGENT_MARKERINKBLACK @@ -112,6 +116,8 @@ color = "#808080" overdose = REAGENTS_OVERDOSE * 0.5 color_weight = 20 + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_COSMETIC /datum/reagent/paint/touch_turf(var/turf/T) ..() @@ -178,6 +184,9 @@ glass_desc = "It's magic. We don't have to explain it." wiki_flag = WIKI_SPOILER + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = "how did you get this?" + /datum/reagent/adminordrazine/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) affect_blood(M, alien, removed) @@ -239,6 +248,8 @@ taste_description = "metal" reagent_state = SOLID color = "#F7C430" + supply_conversion_value = 2 SHEET_TO_REAGENT_EQUIVILENT // has sheet value + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/silver name = REAGENT_SILVER @@ -247,6 +258,8 @@ taste_description = "metal" reagent_state = SOLID color = "#D0D0D0" + supply_conversion_value = 1 SHEET_TO_REAGENT_EQUIVILENT // has sheet value + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/platinum name = REAGENT_PLATINUM @@ -255,6 +268,8 @@ taste_description = "metal" reagent_state = SOLID color = "#777777" + supply_conversion_value = 5 SHEET_TO_REAGENT_EQUIVILENT // has sheet value + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/uranium name = REAGENT_URANIUM @@ -263,6 +278,8 @@ taste_description = "metal" reagent_state = SOLID color = "#B8B8C0" + supply_conversion_value = 2 SHEET_TO_REAGENT_EQUIVILENT // has sheet value + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/uranium/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) affect_ingest(M, alien, removed) @@ -283,16 +300,22 @@ name = REAGENT_DEUTERIUM id = REAGENT_ID_DEUTERIUM description = "A isotope of hydrogen. It has one extra neutron, and shares all chemical characteristics with hydrogen." + supply_conversion_value = REFINERYEXPORT_VALUE_RARE + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/hydrogen/tritium name = REAGENT_TRITIUM id = REAGENT_ID_TRITIUM description = "A radioactive isotope of hydrogen. It has two extra neutrons, and shares all other chemical characteristics with hydrogen." + supply_conversion_value = REFINERYEXPORT_VALUE_RARE + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/lithium/lithium6 name = REAGENT_LITHIUM6 id = REAGENT_ID_LITHIUM6 description = "An isotope of lithium. It has 3 neutrons, but shares all chemical characteristics with regular lithium." + supply_conversion_value = REFINERYEXPORT_VALUE_RARE + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/helium/helium3 name = REAGENT_HELIUM3 @@ -301,12 +324,16 @@ taste_mult = 0 reagent_state = GAS color = "#808080" + supply_conversion_value = REFINERYEXPORT_VALUE_RARE + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/boron/boron11 name = REAGENT_BORON11 id = REAGENT_ID_BORON11 description = "An isotope of boron. It has 6 neutrons." taste_description = "metallic" // Apparently noone on the internet knows what boron tastes like. Or at least they won't share + supply_conversion_value = REFINERYEXPORT_VALUE_RARE + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/supermatter name = REAGENT_SUPERMATTER @@ -318,6 +345,8 @@ description = "The immense power of a supermatter crystal, in liquid form. You're not entirely sure how that's possible, but it's probably best handled with care." taste_description = "taffy" // 0. The supermatter is tasty, tasty taffy. wiki_flag = WIKI_SPOILER + supply_conversion_value = REFINERYEXPORT_VALUE_MASSINDUSTRY + industrial_use = REFINERYEXPORT_REASON_MATSCI // Same as if you boop it wrong. It touches you, you die /datum/reagent/supermatter/affect_touch(mob/living/carbon/M, alien, removed) @@ -341,6 +370,8 @@ reagent_state = LIQUID color = "#C8A5DC" mrate_static = TRUE + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_MEDSCI /datum/reagent/adrenaline/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) @@ -361,6 +392,9 @@ glass_desc = "An ashen-obsidian-water mix, this solution will alter certain sections of the brain's rationality." wiki_flag = WIKI_SPOILER + supply_conversion_value = REFINERYEXPORT_VALUE_NO + industrial_use = REFINERYEXPORT_REASON_RAW + /datum/reagent/water/holywater/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) ..() if(ishuman(M)) // Any location @@ -381,6 +415,8 @@ taste_mult = 2 reagent_state = GAS color = "#404030" + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_RAW /datum/reagent/diethylamine name = REAGENT_DIETHYLAMINE @@ -389,6 +425,8 @@ taste_description = REAGENT_ID_IRON reagent_state = LIQUID color = "#604030" + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/lye name = REAGENT_LYE @@ -397,6 +435,8 @@ taste_description = "acid" reagent_state = LIQUID color = "#FFFFD6" // very very light yellow" + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/fluorosurfactant // Foam precursor name = REAGENT_FLUOROSURFACTANT @@ -405,6 +445,8 @@ taste_description = "metal" reagent_state = LIQUID color = "#9E6B38" + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/foaming_agent // Metal foaming agent. This is lithium hydride. Add other recipes (e.g. LiH + H2O -> LiOH + H2) eventually. name = REAGENT_FOAMINGAGENT @@ -413,6 +455,8 @@ taste_description = "metal" reagent_state = SOLID color = "#664B63" + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/thermite name = REAGENT_THERMITE @@ -422,6 +466,8 @@ reagent_state = SOLID color = "#673910" touch_met = 50 + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/thermite/touch_turf(var/turf/T) ..() @@ -449,6 +495,8 @@ reagent_state = LIQUID color = "#A5F0EE" touch_met = 50 + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_CLEAN /datum/reagent/space_cleaner/touch_mob(var/mob/M) ..() @@ -536,6 +584,8 @@ taste_description = "slime" reagent_state = LIQUID color = "#009CA8" + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_LUBE /datum/reagent/lube/touch_turf(var/turf/simulated/T) ..() @@ -551,6 +601,8 @@ taste_description = "plastic" reagent_state = LIQUID color = "#C7FFFF" + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/silicate/touch_obj(var/obj/O) ..() @@ -567,6 +619,8 @@ taste_description = "sweetness" reagent_state = LIQUID color = "#808080" + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/nitroglycerin name = REAGENT_NITROGLYCERIN @@ -575,6 +629,8 @@ taste_description = "oil" reagent_state = LIQUID color = "#808080" + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/coolant name = REAGENT_COOLANT @@ -586,6 +642,8 @@ color = "#C8A5DC" affects_robots = TRUE + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_INDUSTRY /datum/reagent/coolant/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(M.isSynthetic() && ishuman(M)) @@ -609,6 +667,8 @@ description = "An extremely powerful bonding agent." taste_description = "a special education class" color = "#FFFFCC" + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/woodpulp name = REAGENT_WOODPULP @@ -617,6 +677,8 @@ taste_description = "wood" reagent_state = LIQUID color = "#B97A57" + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/luminol name = REAGENT_LUMINOL @@ -625,6 +687,8 @@ taste_description = "metal" reagent_state = LIQUID color = "#F2F3F4" + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/luminol/touch_obj(var/obj/O) ..() @@ -641,6 +705,8 @@ taste_description = "salty meat" reagent_state = LIQUID color = "#DF9FBF" + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_CLONEDRUG /datum/reagent/mineralfluid name = REAGENT_MINERALIZEDFLUID @@ -649,6 +715,8 @@ taste_description = "salt" reagent_state = LIQUID color = "#ff205255" + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_MATSCI // The opposite to healing nanites, exists to make unidentified hypos implied to have nanites not be 100% safe. /datum/reagent/defective_nanites @@ -661,6 +729,8 @@ metabolism = REM * 3 // Broken nanomachines go a bit slower. scannable = 1 wiki_flag = WIKI_SPOILER + supply_conversion_value = REFINERYEXPORT_VALUE_NO + industrial_use = REFINERYEXPORT_REASON_BIOHAZARD /datum/reagent/defective_nanites/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.take_organ_damage(2 * removed, 2 * removed) @@ -676,6 +746,8 @@ reagent_state = LIQUID color = "#62764E" nutriment_factor = 15 + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_FOOD /datum/reagent/carpet name = REAGENT_LIQUIDCARPET @@ -684,6 +756,12 @@ reagent_state = LIQUID color = "#b51d05" taste_description = "carpet" + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_PRECURSOR + +/datum/reagent/carpet + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/carpet/black name = REAGENT_LIQUIDCARPETB @@ -748,3 +826,5 @@ taste_description = "a mixture of thick, sweet, salty, salty and spicy flavours that all blend together to not be very nice at all" reagent_state = LIQUID color = "#e8e2b0" + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_PRECURSOR diff --git a/code/modules/reagents/reagents/other_vr.dm b/code/modules/reagents/reagents/other_vr.dm index c804d5fecbe..5969c240b6a 100644 --- a/code/modules/reagents/reagents/other_vr.dm +++ b/code/modules/reagents/reagents/other_vr.dm @@ -4,6 +4,8 @@ description = "A corruptive toxin produced by slimes. Turns the subject of the chemical into a Promethean." reagent_state = LIQUID color = "#13BC5E" + supply_conversion_value = REFINERYEXPORT_VALUE_MASSINDUSTRY + industrial_use = REFINERYEXPORT_REASON_MATSCI /datum/reagent/advmutationtoxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(!(M.allow_spontaneous_tf)) @@ -41,6 +43,9 @@ affects_robots = TRUE wiki_flag = WIKI_SPOILER + supply_conversion_value = REFINERYEXPORT_VALUE_RARE + industrial_use = REFINERYEXPORT_REASON_MATSCI + /datum/reagent/nif_repair_nanites/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(ishuman(M)) var/mob/living/carbon/human/H = M @@ -57,6 +62,8 @@ reagent_state = LIQUID color = "#A6FAFF" taste_description = "the inside of a fire extinguisher" + supply_conversion_value = REFINERYEXPORT_VALUE_UNWANTED + industrial_use = REFINERYEXPORT_REASON_INDUSTRY /datum/reagent/firefighting_foam/touch_turf(var/turf/T, reac_volume) if(reac_volume >= 1) @@ -105,6 +112,8 @@ scannable = 0 metabolism = REM * 0.5 affects_robots = TRUE + supply_conversion_value = REFINERYEXPORT_VALUE_UNWANTED + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/liquid_protean/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien != IS_DIONA) @@ -132,6 +141,8 @@ color = "#E4EC2F" metabolism = 2.50 var/power = 9 + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/grubshock/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.take_organ_damage(0, removed * power * 0.2) diff --git a/code/modules/reagents/reagents/toxins.dm b/code/modules/reagents/reagents/toxins.dm index 7d7b3611388..c4f94be461f 100644 --- a/code/modules/reagents/reagents/toxins.dm +++ b/code/modules/reagents/reagents/toxins.dm @@ -12,6 +12,8 @@ filtered_organs = list(O_LIVER, O_KIDNEYS) var/strength = 4 // How much damage it deals per unit var/skin_danger = 0.2 // The multiplier for how effective the toxin is when making skin contact. + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/toxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) var/poison_strength = strength * M.species.chem_strength_tox @@ -36,6 +38,8 @@ reagent_state = LIQUID color = "#CF3600" strength = 5 + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/toxin/amatoxin name = REAGENT_AMATOXIN @@ -45,6 +49,8 @@ reagent_state = LIQUID color = "#792300" strength = 10 + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/toxin/amatoxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) // Trojan horse. Waits until most of the toxin has gone through the body before dealing the bulk of it in one big strike. @@ -59,6 +65,8 @@ reagent_state = LIQUID color = "#003333" strength = 10 + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/toxin/carpotoxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) ..() @@ -74,6 +82,8 @@ strength = 8 skin_danger = 0.4 wiki_flag = WIKI_SPOILER + supply_conversion_value = REFINERYEXPORT_VALUE_NO + industrial_use = REFINERYEXPORT_REASON_BIOHAZARD /datum/reagent/toxin/neurotoxic_protein/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_CHIMERA) @@ -95,6 +105,8 @@ description = "An exceptionally flammable molecule formed from deuterium synthesis." strength = 80 var/fire_mult = 30 + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/toxin/hydrophoron/touch_mob(var/mob/living/L, var/amount) ..() @@ -131,6 +143,8 @@ description = "Elemental Lead." color = "#273956" strength = 4 + supply_conversion_value = 0.5 SHEET_TO_REAGENT_EQUIVILENT // has sheet value + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/toxin/spidertoxin name = REAGENT_SPIDERTOXIN @@ -138,6 +152,8 @@ description = "A liquifying toxin produced by giant spiders." color = "#2CE893" strength = 5 + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_MEDSCI /datum/reagent/toxin/warningtoxin name = REAGENT_WARNINGTOXIN @@ -164,6 +180,8 @@ strength = 30 touch_met = 5 skin_danger = 1 + supply_conversion_value = 5 SHEET_TO_REAGENT_EQUIVILENT // has sheet value + industrial_use = REFINERYEXPORT_REASON_PHORON /datum/reagent/toxin/phoron/touch_mob(var/mob/living/L, var/amount) ..() @@ -204,6 +222,8 @@ color = "#CF3600" strength = 15 metabolism = REM * 0.5 + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/toxin/cyanide/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) ..() @@ -218,6 +238,8 @@ reagent_state = SOLID strength = 5 wiki_flag = WIKI_SPOILER + supply_conversion_value = REFINERYEXPORT_VALUE_NO + industrial_use = REFINERYEXPORT_REASON_BIOHAZARD /datum/reagent/toxin/mold/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) ..() @@ -233,6 +255,8 @@ strength = 5 filtered_organs = list(O_SPLEEN) wiki_flag = WIKI_SPOILER + supply_conversion_value = REFINERYEXPORT_VALUE_NO + industrial_use = REFINERYEXPORT_REASON_BIOHAZARD /datum/reagent/toxin/expired_medicine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) ..() @@ -254,6 +278,8 @@ overdose = 10 overdose_mod = 0.5 strength = 3 + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_BIOHAZARD /datum/reagent/toxin/stimm/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_TAJARA) @@ -284,6 +310,8 @@ strength = 0 overdose = REAGENTS_OVERDOSE filtered_organs = list(O_SPLEEN, O_KIDNEYS) + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_MEDSCI /datum/reagent/toxin/potassium_chloride/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) ..() @@ -310,6 +338,8 @@ strength = 10 overdose = 20 filtered_organs = list(O_SPLEEN, O_KIDNEYS) + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_MEDSCI /datum/reagent/toxin/potassium_chlorophoride/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) ..() @@ -333,6 +363,8 @@ metabolism = REM strength = 3 mrate_static = TRUE + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_MEDSCI /datum/reagent/toxin/zombiepowder/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) ..() @@ -359,6 +391,8 @@ metabolism = REM * 0.75 strength = 2 mrate_static = TRUE + supply_conversion_value = REFINERYEXPORT_VALUE_MASSINDUSTRY + industrial_use = REFINERYEXPORT_REASON_MEDSCI /datum/reagent/toxin/lichpowder/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) ..() @@ -388,6 +422,8 @@ reagent_state = LIQUID strength = 0.5 // It's not THAT poisonous. color = "#664330" + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_FOOD /datum/reagent/toxin/fertilizer/eznutrient name = REAGENT_EZNUTRIENT @@ -426,6 +462,8 @@ reagent_state = LIQUID color = "#49002E" strength = 4 + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/toxin/plantbgone/touch_turf(var/turf/T) ..() @@ -462,6 +500,8 @@ color = "#C6E2FF" strength = 2 overdose = 20 + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_PRECURSOR /datum/reagent/toxin/sifslurry/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) // Symbiotic bacteria. @@ -492,6 +532,8 @@ color = "#8E18A9" power = 10 meltdose = 4 + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_INDUSTRY /datum/reagent/acid/digestive name = REAGENT_STOMACID @@ -503,6 +545,8 @@ power = 2 meltdose = 30 wiki_flag = WIKI_SPOILER + supply_conversion_value = REFINERYEXPORT_VALUE_NO + industrial_use = REFINERYEXPORT_REASON_BIOHAZARD /datum/reagent/acid/diet_digestive name = REAGENT_DIETSTOMACID @@ -514,6 +558,8 @@ power = 0.4 meltdose = 150 wiki_flag = WIKI_SPOILER + supply_conversion_value = REFINERYEXPORT_VALUE_NO + industrial_use = REFINERYEXPORT_REASON_BIOHAZARD /datum/reagent/thermite/venom name = REAGENT_THERMITEV @@ -524,6 +570,8 @@ color = "#673910" touch_met = 50 wiki_flag = WIKI_SPOILER + supply_conversion_value = REFINERYEXPORT_VALUE_UNWANTED + industrial_use = REFINERYEXPORT_REASON_BIOHAZARD /datum/reagent/thermite/venom/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.adjustFireLoss(3 * removed) @@ -546,6 +594,8 @@ color = "#B31008" filtered_organs = list(O_SPLEEN) wiki_flag = WIKI_SPOILER + supply_conversion_value = REFINERYEXPORT_VALUE_UNWANTED + industrial_use = REFINERYEXPORT_REASON_BIOHAZARD /datum/reagent/condensedcapsaicin/venom/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) @@ -569,6 +619,8 @@ reagent_state = LIQUID color = "#C8A5DC" overdose = REAGENTS_OVERDOSE + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_MEDSCI /datum/reagent/lexorin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) @@ -592,6 +644,8 @@ taste_mult = 0.9 reagent_state = LIQUID color = "#13BC5E" + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_MEDSCI /datum/reagent/mutagen/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) if(prob(33)) @@ -658,6 +712,8 @@ reagent_state = LIQUID color = "#801E28" wiki_flag = WIKI_SPOILER + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_MATSCI /datum/reagent/slimejelly/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) @@ -685,6 +741,8 @@ metabolism = REM * 0.5 ingest_met = REM * 1.5 overdose = REAGENTS_OVERDOSE + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_MEDSCI /datum/reagent/soporific/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) @@ -733,6 +791,8 @@ ingest_met = REM * 1.5 overdose = REAGENTS_OVERDOSE * 0.5 overdose_mod = 2 //For that good, lethal feeling // Reduced with overdose changes. Slightly stronger than before + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_MEDSCI /datum/reagent/chloralhydrate/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) @@ -797,6 +857,8 @@ metabolism = REM * 0.25 overdose = REAGENTS_OVERDOSE wiki_flag = WIKI_SPOILER + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_MEDSCI /datum/reagent/serotrotium/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) @@ -811,6 +873,8 @@ description = "A chemical compound that promotes concentrated production of the serotonin neurotransmitter in humans. This appears to be a biologically produced form, resulting in a specifically toxic nature." taste_description = "chalky bitterness" filtered_organs = list(O_SPLEEN) + supply_conversion_value = REFINERYEXPORT_VALUE_UNWANTED + industrial_use = REFINERYEXPORT_REASON_BIOHAZARD /datum/reagent/serotrotium/venom/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) @@ -830,6 +894,8 @@ color = "#000055" metabolism = REM * 0.5 overdose = REAGENTS_OVERDOSE + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_MEDSCI /datum/reagent/cryptobiolin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) @@ -853,6 +919,8 @@ color = "#C8A5DC" overdose = REAGENTS_OVERDOSE filtered_organs = list(O_SPLEEN) + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_WEAPONS /datum/reagent/impedrezene/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) @@ -874,6 +942,8 @@ color = "#B31008" metabolism = REM * 4 //0.8 per second...This is an 'immediate effect' drug that you hit someone with and they have effects for a prolonged period after. overdose = REAGENTS_OVERDOSE + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_WEAPONS /datum/reagent/mindbreaker/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) @@ -900,6 +970,8 @@ reagent_state = LIQUID color = "#13BC5E" wiki_flag = WIKI_SPOILER + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_MATSCI /datum/reagent/slimetoxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(M.isSynthetic()) @@ -927,6 +999,8 @@ reagent_state = LIQUID color = "#FF69B4" wiki_flag = WIKI_SPOILER + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_MATSCI /datum/reagent/aslimetoxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(M.isSynthetic()) @@ -961,6 +1035,8 @@ metabolism = REM * 4 // Nanomachines. Fast. affects_robots = TRUE wiki_flag = WIKI_SPOILER + supply_conversion_value = REFINERYEXPORT_VALUE_NO + industrial_use = REFINERYEXPORT_REASON_BIOHAZARD /datum/reagent/shredding_nanites/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.adjustBruteLoss(4 * removed) @@ -976,6 +1052,8 @@ metabolism = REM * 4 affects_robots = TRUE wiki_flag = WIKI_SPOILER + supply_conversion_value = REFINERYEXPORT_VALUE_NO + industrial_use = REFINERYEXPORT_REASON_BIOHAZARD /datum/reagent/irradiated_nanites/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) SSradiation.radiate(get_turf(M), 20) // Irradiate people around you. @@ -992,6 +1070,8 @@ filtered_organs = list(O_SPLEEN) affects_robots = TRUE wiki_flag = WIKI_SPOILER + supply_conversion_value = REFINERYEXPORT_VALUE_NO + industrial_use = REFINERYEXPORT_REASON_BIOHAZARD /datum/reagent/neurophage_nanites/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.adjustBrainLoss(2 * removed) // Their job is to give you a bad time. @@ -1005,6 +1085,8 @@ color = "#1E4600" taste_mult = 0 wiki_flag = WIKI_SPOILER + supply_conversion_value = REFINERYEXPORT_VALUE_NO + industrial_use = REFINERYEXPORT_REASON_BIOHAZARD /datum/reagent/salmonella/on_mob_life(mob/living/carbon/M) M.ForceContractDisease(new /datum/disease/food_poisoning(0)) diff --git a/code/modules/reagents/reagents/virology.dm b/code/modules/reagents/reagents/virology.dm index a90b3a414ff..cfe06297dc1 100644 --- a/code/modules/reagents/reagents/virology.dm +++ b/code/modules/reagents/reagents/virology.dm @@ -4,6 +4,8 @@ description = "Liquid vaccine against some type of virus." color = "#C81040" taste_description = "antibodies" + supply_conversion_value = REFINERYEXPORT_VALUE_COMMON + industrial_use = REFINERYEXPORT_REASON_MEDSCI /datum/reagent/vaccine/affect_blood(mob/living/carbon/M, alien, removed) if(islist(data)) diff --git a/code/modules/reagents/reagents/vore_vr.dm b/code/modules/reagents/reagents/vore_vr.dm index 0c95d35e53b..f3470c6ae1f 100644 --- a/code/modules/reagents/reagents/vore_vr.dm +++ b/code/modules/reagents/reagents/vore_vr.dm @@ -11,6 +11,8 @@ color = "#FFFF00" // rgb: 255, 255, 0 metabolism = 0.01 mrate_static = TRUE + supply_conversion_value = REFINERYEXPORT_VALUE_GODTIER + industrial_use = REFINERYEXPORT_REASON_MEDSCI /datum/reagent/macrocillin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) var/new_size = clamp((M.size_multiplier + 0.01), RESIZE_MINIMUM_DORMS, RESIZE_MAXIMUM_DORMS) @@ -25,6 +27,8 @@ color = "#800080" metabolism = 0.01 mrate_static = TRUE + supply_conversion_value = REFINERYEXPORT_VALUE_GODTIER + industrial_use = REFINERYEXPORT_REASON_MEDSCI /datum/reagent/microcillin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) var/new_size = clamp((M.size_multiplier - 0.01), RESIZE_MINIMUM_DORMS, RESIZE_MAXIMUM_DORMS) @@ -40,6 +44,8 @@ color = "#00FFFF" metabolism = 0.01 //One unit will be just enough to bring someone from 200% to 100% mrate_static = TRUE + supply_conversion_value = REFINERYEXPORT_VALUE_GODTIER + industrial_use = REFINERYEXPORT_REASON_MEDSCI /datum/reagent/normalcillin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(M.size_multiplier > RESIZE_NORMAL) @@ -56,6 +62,8 @@ reagent_state = LIQUID color = "#1E90FF" overdose = REAGENTS_OVERDOSE + supply_conversion_value = REFINERYEXPORT_VALUE_PEAK + industrial_use = REFINERYEXPORT_REASON_MEDSCI /datum/reagent/sizeoxadone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.make_dizzy(1) @@ -73,6 +81,8 @@ reagent_state = LIQUID color = "#0E900E" overdose = REAGENTS_OVERDOSE + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_WEAPONS /datum/reagent/ickypak/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.make_dizzy(1) @@ -95,6 +105,8 @@ reagent_state = LIQUID color = "#EF77E5" overdose = REAGENTS_OVERDOSE + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_MEDSCI /datum/reagent/unsorbitol/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.make_dizzy(1) @@ -125,6 +137,8 @@ description = "A base medical concoction, capable of rapidly altering genetic and physical structure of the body. Requires extra processing to allow for a targeted transformation." reagent_state = LIQUID color = "#AAAAAA" + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_MEDSCI /datum/reagent/androrovir name = REAGENT_ANDROROVIR @@ -132,6 +146,8 @@ description = "A medical concoction, capable of rapidly altering genetic and physical structure of the body. This one seems to realign the target's gender to be male." reagent_state = LIQUID color = "#00BBFF" + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_MEDSCI /datum/reagent/androrovir/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(!(M.allow_spontaneous_tf)) @@ -153,6 +169,8 @@ description = "A medical concoction, capable of rapidly altering genetic and physical structure of the body. This one seems to realign the target's gender to be female." reagent_state = LIQUID color = "#FF00AA" + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_MEDSCI /datum/reagent/gynorovir/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(!(M.allow_spontaneous_tf)) @@ -174,6 +192,8 @@ description = "A medical concoction, capable of rapidly altering genetic and physical structure of the body. This one seems to realign the target's gender to be mixed." reagent_state = LIQUID color = "#6600FF" + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_MEDSCI /datum/reagent/androgynorovir/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(!(M.allow_spontaneous_tf)) @@ -227,6 +247,8 @@ metabolism = REM * 0.25 overdose = REAGENTS_OVERDOSE scannable = 0 //YOU ARE NOT SCANNING THE FUNNY PARALYSIS TOXIN. NO. BAD. STAY AWAY. + supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED + industrial_use = REFINERYEXPORT_REASON_WEAPONS /datum/reagent/paralysis_toxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(M.weakened < 50) //Let's not leave them PERMA stuck, after all. @@ -243,6 +265,8 @@ mrate_static = TRUE overdose = 100 //There is no OD. You already are taking the worst of it. scannable = 0 //Let's not have medical mechs able to make an extremely strong 'I hit you you fall down in agony' chem. + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_WEAPONS /datum/reagent/pain_enzyme/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.add_chemical_effect(CE_PAINKILLER, -200) diff --git a/code/modules/refinery/core/industrial_reagent_filter.dm b/code/modules/refinery/core/industrial_reagent_filter.dm new file mode 100644 index 00000000000..93a05338d5f --- /dev/null +++ b/code/modules/refinery/core/industrial_reagent_filter.dm @@ -0,0 +1,133 @@ +/obj/machinery/reagent_refinery/filter + name = "Industrial Chemical Filter" + desc = "Identifies and extracts specific chemicals." + icon_state = "filter_l" + density = TRUE + anchored = TRUE + use_power = USE_POWER_IDLE + idle_power_usage = 5 + active_power_usage = 50 + circuit = /obj/item/circuitboard/industrial_reagent_pump + VAR_PROTECTED/filter_side = -1 // L + VAR_PRIVATE/filter_reagent_id = "" + + possible_transfer_amounts = list(0,1,2,5,10,15,20,25,30,40,60) + default_max_vol = 60 // smoll to match pipes + +/obj/machinery/reagent_refinery/filter/alt + filter_side = 1 // R + icon_state = "filter_r" + +/obj/machinery/reagent_refinery/filter/Initialize(mapload) + . = ..() + default_apply_parts() + // Update neighbours and self for state + update_neighbours() + update_icon() + AddElement(/datum/element/climbable) + +/obj/machinery/reagent_refinery/filter/process() + if(!anchored) + return + + power_change() + if(stat & (NOPOWER|BROKEN)) + return + + // extract and filter side products + if(filter_reagent_id == "") + return // MUST BE SET + if(amount_per_transfer_from_this <= 0) + return + if(filter_reagent_id != "-1" || filter_reagent_id == "-2") // disabled check, and "all" check + var/check_dir = 0 + if(filter_side == 1) + check_dir = turn(src.dir, 270) + else + check_dir = turn(src.dir, 90) + var/obj/machinery/reagent_refinery/filter_target = locate(/obj/machinery/reagent_refinery) in get_step(get_turf(src),check_dir) + if(filter_target && reagents.total_volume > 0) + transfer_tank( reagents, filter_target, check_dir, filter_reagent_id == "-2" ? "" : filter_reagent_id) + // dump reagents to next refinery machine if all of the target reagent has been filtered out + if(filter_reagent_id != "-2") // "all" filter option pushes it all out the side path + var/obj/machinery/reagent_refinery/target = locate(/obj/machinery/reagent_refinery) in get_step(get_turf(src),dir) + if(target && reagents.total_volume > 0) + transfer_tank( reagents, target, dir) + +/obj/machinery/reagent_refinery/filter/update_icon() + cut_overlays() + icon_state = "filter_[filter_side == 1 ? "r" : "l"]" + + if(reagents && reagents.total_volume > 0) + var/image/filling = image(icon, loc, "[icon_state]_r",dir = dir) + filling.color = reagents.get_color() + add_overlay(filling) + +/obj/machinery/reagent_refinery/filter/attack_hand(mob/user) + set_filter() + +/obj/machinery/reagent_refinery/filter/proc/get_filter_side() + return filter_side + +/obj/machinery/reagent_refinery/filter/verb/set_filter() + PRIVATE_PROC(TRUE) + set name = "Set Filter Chemical" + set category = "Object" + set src in view(1) + + if (usr.stat || usr.restrained()) + return + + // Get a list of reagents currently inside! + var/list/tgui_list = list("Disabled" = "","Bypass" = "-1","All" = "-2") + for(var/datum/reagent/R in reagents.reagent_list) + if(R) + tgui_list[R.name] = R.id + + var/filter = "disabled" + if(filter_reagent_id == "-1") + filter = "filtering out nothing" + else if(filter_reagent_id == "-2") + filter = "filtering out everything" + else if(filter_reagent_id != "") + var/datum/reagent/R = SSchemistry.chemical_reagents[filter_reagent_id] + filter = "filtering [R.name]" + var/select = tgui_input_list(usr, "Select chemical to filter. It is currently [filter].", "Chemical Select", tgui_list) + + if (usr.stat || usr.restrained()) + return + + // Select if possible + if(select && select != "") + filter_reagent_id = tgui_list[select] + +/obj/machinery/reagent_refinery/filter/verb/flip_filter() + PRIVATE_PROC(TRUE) + set name = "Flip Filter Direction" + set category = "Object" + set src in view(1) + + if (usr.stat || usr.restrained() || anchored) + return + + filter_side *= -1 + update_icon() + +/obj/machinery/reagent_refinery/filter/handle_transfer(var/atom/origin_machine, var/datum/reagents/RT, var/source_forward_dir, var/filter_id = "") + // pumps, furnaces and filters can only be FED in a straight line + if(source_forward_dir != dir) + return 0 + . = ..(origin_machine, RT, source_forward_dir, filter_id) + +/obj/machinery/reagent_refinery/filter/examine(mob/user, infix, suffix) + . = ..() + var/filter = "disabled" + if(filter_reagent_id == "-1") + filter = "filtering out nothing" + else if(filter_reagent_id == "-2") + filter = "filtering out everything" + else if(filter_reagent_id != "") + var/datum/reagent/R = SSchemistry.chemical_reagents[filter_reagent_id] + filter = "filtering [R.name]" + . += "The meter shows [reagents.total_volume]u / [reagents.maximum_volume]u. It is currently [filter]. At a rate of [amount_per_transfer_from_this]u." + tutorial(REFINERY_TUTORIAL_INPUT|REFINERY_TUTORIAL_FILTER, .) diff --git a/code/modules/refinery/core/industrial_reagent_furnace.dm b/code/modules/refinery/core/industrial_reagent_furnace.dm new file mode 100644 index 00000000000..e16ad034769 --- /dev/null +++ b/code/modules/refinery/core/industrial_reagent_furnace.dm @@ -0,0 +1,211 @@ +/obj/machinery/reagent_refinery/furnace + name = "Industrial Chemical Furnace" + desc = "Extracts specific chemicals, compressing and heating them until they solidify." + icon_state = "furnace_l" + density = TRUE + anchored = TRUE + use_power = USE_POWER_IDLE + idle_power_usage = 5 + active_power_usage = 500 + circuit = /obj/item/circuitboard/industrial_reagent_furnace + VAR_PROTECTED/filter_side = -1 // L + VAR_PRIVATE/filter_reagent_id = "" + + default_max_vol = 60 + VAR_PRIVATE/obj/item/reagent_containers/beaker = null // Safer than retooling all of reagent code to support a second reagent var inside this one object + +/obj/machinery/reagent_refinery/furnace/alt + filter_side = 1 // R + icon_state = "furnace_r" + +/obj/machinery/reagent_refinery/furnace/Initialize(mapload) + . = ..() + default_apply_parts() + beaker = new /obj/item/reagent_containers/glass/beaker/bluespace(src) // Get it all out as fast as possible + // Can't be set on these + src.verbs -= /obj/machinery/reagent_refinery/verb/set_APTFT + // Update neighbours and self for state + update_neighbours() + update_icon() + AddElement(/datum/element/climbable) + +/obj/machinery/reagent_refinery/furnace/Destroy() + . = ..() + qdel_null(beaker) + +/obj/machinery/reagent_refinery/furnace/process() + if(!anchored) + return + + power_change() + if(stat & (NOPOWER|BROKEN)) + return + + // extract and filter side products + if(filter_reagent_id == "") + return // MUST BE SET + if(amount_per_transfer_from_this <= 0) + return + if(filter_reagent_id != "-1") // disabled check, and "all" check + var/check_dir = 0 + if(filter_side == 1) + check_dir = turn(src.dir, 270) + else + check_dir = turn(src.dir, 90) + var/turf/spawn_t = get_step(get_turf(src),check_dir) + + // Suck out the reagent we're looking for into temporary holding + if(reagents.total_volume > 0) + for(var/datum/reagent/R in reagents.reagent_list) + if(R && R.id == filter_reagent_id) + reagents.trans_id_to(beaker, R.id, R.volume) + + // while loop is sane here because the beaker should always be cleaned when changing filter type, + // and it should never end up mixed with more than 1 type of reagent + // For sanity, and if admemes break something, I will do a clearing anyway.... + if(beaker.reagents.reagent_list.len > 1) + beaker.reagents.clear_reagents() // Highlander rules + var/played_sound = FALSE + while(beaker.reagents.total_volume >= REAGENTS_PER_SHEET) // at least enough reagents to bother checking + var/datum/reagent/R = beaker.reagents.reagent_list[1] + var/mat_id = GLOB.reagent_sheets[R.id] + beaker.reagents.remove_reagent(R.id,REAGENTS_PER_SHEET) + switch(mat_id) + if(REFINERY_SINTERING_SMOKE) + // Smoke em out sometimes + if(prob(30)) + if(!played_sound) + playsound(src, 'sound/items/electronic_assembly_emptying.ogg', 50, 1) + playsound(src, 'sound/effects/smoke.ogg', 20, 1) + played_sound = TRUE + visible_message(span_notice("\The [src] vomits a gout of smoke!")) + var/datum/effect/effect/system/smoke_spread/bad/smoke = new /datum/effect/effect/system/smoke_spread/bad + smoke.attach(src) + smoke.set_up(10, 0, get_turf(src), 300) + smoke.start() + if(REFINERY_SINTERING_EXPLODE) + // Detonate + if(!played_sound) + visible_message(span_danger("\The [src] catches fire and violently explodes!")) + played_sound = TRUE + explosion(loc, 0, 1, 2, 4) + visible_message("\The [src.name] detonates!") + if(REFINERY_SINTERING_SPIDERS) + // Spawns some spiders + if(!played_sound) + playsound(src, 'sound/items/fulext_deploy.wav', 40, 1) + played_sound = TRUE + var/i = rand(1,3) + while(i-- > 0) + new /obj/effect/spider/spiderling/non_growing(spawn_t) + if(prob(20)) + i = rand(1,2) + while(i-- > 0) + new /obj/effect/spider/spiderling/varied(spawn_t) + else + var/datum/material/printing = get_material_by_name(mat_id) + if(printing) + // Place a sheet + if(!played_sound) + playsound(src, 'sound/items/electronic_assembly_emptying.ogg', 50, 1) + played_sound = TRUE + var/obj/item/stack/material/S = printing.place_sheet(src, 1) // One at a time + S.forceMove(spawn_t) // autostack + if(!istype(S)) + warning("[src] tried to eject material '[printing]', which didn't generate a proper stack when asked!") + // dump reagents to next refinery machine if all of the target reagent has been filtered out + var/obj/machinery/reagent_refinery/target = locate(/obj/machinery/reagent_refinery) in get_step(get_turf(src),dir) + if(target && reagents.total_volume > 0) + transfer_tank( reagents, target, dir) + +/obj/machinery/reagent_refinery/furnace/update_icon() + cut_overlays() + icon_state = "furnace_[filter_side == 1 ? "r" : "l"]" + + if(reagents && reagents.total_volume > 0) + var/image/filling = image(icon, loc, "[icon_state]_r",dir = dir) + filling.color = reagents.get_color() + add_overlay(filling) + else if(beaker && beaker.reagents && beaker.reagents.total_volume > 0) + var/image/filling = image(icon, loc, "[icon_state]_r",dir = dir) + filling.color = beaker.reagents.get_color() + add_overlay(filling) + +/obj/machinery/reagent_refinery/furnace/attack_hand(mob/user) + set_filter() + +/obj/machinery/reagent_refinery/furnace/verb/set_filter() + PRIVATE_PROC(TRUE) + set name = "Set Sintering Chemical" + set category = "Object" + set src in view(1) + + if (usr.stat || usr.restrained()) + return + + // Get a list of reagents currently inside! + var/list/tgui_list = list("Disabled" = "","Bypass" = "-1") + for(var/datum/reagent/R in reagents.reagent_list) + if(R) + var/mat_id = GLOB.reagent_sheets[R.id] + if(!mat_id) // No reaction + continue + var/id_string = "[R.name] - ???" + switch(mat_id) + if(REFINERY_SINTERING_SMOKE) + id_string = "[R.name] - DANGER" + if(REFINERY_SINTERING_EXPLODE) + id_string = "[R.name] - DANGER" + if(REFINERY_SINTERING_SPIDERS) + id_string = "[R.name] - DANGER" + else + var/datum/material/C = get_material_by_name(mat_id) + if(C) + id_string = "[R.name] - [C.display_name] [C.sheet_plural_name]" + tgui_list[id_string] = R.id + + var/filter = "disabled" + if(filter_reagent_id == "-1") + filter = "sintering out nothing" + else if(filter_reagent_id != "") + var/datum/reagent/R = SSchemistry.chemical_reagents[filter_reagent_id] + filter = "sintering [R.name]" + var/select = tgui_input_list(usr, "Select chemical to sinter. It is currently [filter].", "Chemical Select", tgui_list) + + if (usr.stat || usr.restrained()) + return + + // Select if possible + if(select && select != "") + filter_reagent_id = tgui_list[select] + beaker.reagents.clear_reagents() + update_icon() + +/obj/machinery/reagent_refinery/furnace/verb/flip_furnace() + set name = "Flip Furnace Direction" + set category = "Object" + set src in view(1) + + if (usr.stat || usr.restrained() || anchored) + return + + filter_side *= -1 + update_icon() + +/obj/machinery/reagent_refinery/furnace/handle_transfer(var/atom/origin_machine, var/datum/reagents/RT, var/source_forward_dir, var/filter_id = "") + // pumps, furnaces and filters can only be FED in a straight line + if(source_forward_dir != dir) + return 0 + . = ..(origin_machine, RT, source_forward_dir, filter_id) + +/obj/machinery/reagent_refinery/furnace/examine(mob/user, infix, suffix) + . = ..() + var/filter = "disabled" + if(filter_reagent_id == "-1") + filter = "sintering out nothing" + else if(filter_reagent_id != "") + var/datum/reagent/R = SSchemistry.chemical_reagents[filter_reagent_id] + filter = "sintering [R.name]" + . += "The meter shows [reagents.total_volume]u / [reagents.maximum_volume]u. It is currently [filter]." + . += "The sintering mold is [ (beaker.reagents.total_volume / REAGENTS_PER_SHEET) * 100 ]% full." + tutorial(REFINERY_TUTORIAL_INPUT, .) diff --git a/code/modules/refinery/core/industrial_reagent_grinder.dm b/code/modules/refinery/core/industrial_reagent_grinder.dm new file mode 100644 index 00000000000..032bd251def --- /dev/null +++ b/code/modules/refinery/core/industrial_reagent_grinder.dm @@ -0,0 +1,136 @@ +/obj/machinery/reagent_refinery/grinder + name = "Industrial Chemical Grinder" + desc = "Grinds anything and everything into chemical slurry." + icon_state = "grinder_off" + density = TRUE + anchored = TRUE + use_power = USE_POWER_IDLE + idle_power_usage = 5 + active_power_usage = 300 + circuit = /obj/item/circuitboard/industrial_reagent_grinder + VAR_PRIVATE/limit = 50 + VAR_PRIVATE/list/holdingitems = list() + +/obj/machinery/reagent_refinery/grinder/Initialize(mapload) + . = ..() + default_apply_parts() + // Can't be set on these + src.verbs -= /obj/machinery/reagent_refinery/verb/set_APTFT + // Update neighbours and self for state + update_neighbours() + update_icon() + +/obj/machinery/reagent_refinery/grinder/Destroy() + for(var/obj/O in holdingitems) + O.forceMove(get_turf(src)) + holdingitems.Cut() + . = ..() + +/obj/machinery/reagent_refinery/grinder/attackby(var/obj/item/O as obj, var/mob/user as mob) + . = ..() + if(.) + return + + // Insert grindables if not handled by parent proc + if(holdingitems && holdingitems.len >= limit) + to_chat(user, "The machine cannot hold anymore items.") + return TRUE + + // Botany/Chemistry gameplay + if(istype(O,/obj/item/storage/bag)) + var/obj/item/storage/bag/bag = O + var/failed = 1 + for(var/obj/item/G in O.contents) + if(!G.reagents || !G.reagents.total_volume) + continue + failed = 0 + bag.remove_from_storage(G, src) + holdingitems += G + if(holdingitems && holdingitems.len >= limit) + break + + if(failed) + to_chat(user, "Nothing in \the [O] is usable.") + return 1 + + if(!O.contents.len) + to_chat(user, "You empty \the [O] into \the [src].") + else + to_chat(user, "You fill \the [src] from \the [O].") + return FALSE + + // Borgos! + if(istype(O,/obj/item/gripper)) + var/obj/item/gripper/B = O //B, for Borg. + if(!B.wrapped) + to_chat(user, "\The [B] is not holding anything.") + return FALSE + else + var/B_held = B.wrapped + to_chat(user, "You use \the [B] to load \the [src] with \the [B_held].") + return FALSE + + // Needs to be sheet, ore, or grindable reagent containing things + if(!GLOB.sheet_reagents[O.type] && !GLOB.ore_reagents[O.type] && (!O.reagents || !O.reagents.total_volume)) + to_chat(user, "\The [O] is not suitable for blending.") + return FALSE + + user.drop_from_inventory(O,src) + holdingitems += O + update_icon() + return TRUE + +/obj/machinery/reagent_refinery/grinder/process() + if(!anchored) + return + + power_change() + if(stat & (NOPOWER|BROKEN)) + return + + if(holdingitems.len > 0 && grind_items_to_reagents(holdingitems,reagents)) + //Lazy coder sound design moment. THE SEQUEL + playsound(src, 'sound/items/poster_being_created.ogg', 50, 1) + playsound(src, 'sound/items/electronic_assembly_emptying.ogg', 50, 1) + playsound(src, 'sound/effects/metalscrape2.ogg', 50, 1) + if(holdingitems.len == 0) + update_icon() + + refinery_transfer() + +/obj/machinery/reagent_refinery/grinder/update_icon() + cut_overlays() + var/image/pipe = image(icon, icon_state = "grinder_cons", dir = dir) + add_overlay(pipe) + if(stat & (NOPOWER|BROKEN) || !anchored) + icon_state = "grinder_off" + else + icon_state = "grinder_on" + var/image/dot = image(icon, icon_state = "grinder_dot_[holdingitems.len ? "on" : "off" ]") + add_overlay(dot) + +/obj/machinery/reagent_refinery/grinder/Bumped(atom/movable/AM as mob|obj) + . = ..() + if(!anchored) + return + if(!AM || QDELETED(AM)) + return + if(holdingitems.len >= limit) + return + if(ismob(AM)) // No mob bumping YET + return + if(!GLOB.sheet_reagents[AM.type] && !GLOB.ore_reagents[AM.type] && (!AM.reagents || !AM.reagents.total_volume)) + return + + AM.forceMove(src) + holdingitems += AM + +/obj/machinery/reagent_refinery/grinder/examine(mob/user, infix, suffix) + . = ..() + . += "The intake cache shows [holdingitems.len] / [limit] grindable items." + . += "The meter shows [reagents.total_volume]u / [reagents.maximum_volume]u. It is pumping chemicals at a rate of [amount_per_transfer_from_this]u." + tutorial(REFINERY_TUTORIAL_NOINPUT, .) + +/obj/machinery/reagent_refinery/grinder/handle_transfer(var/atom/origin_machine, var/datum/reagents/RT, var/source_forward_dir, var/filter_id = "") + // Grinder forbids input + return 0 diff --git a/code/modules/refinery/core/industrial_reagent_hub.dm b/code/modules/refinery/core/industrial_reagent_hub.dm new file mode 100644 index 00000000000..e5539c9cc59 --- /dev/null +++ b/code/modules/refinery/core/industrial_reagent_hub.dm @@ -0,0 +1,85 @@ +/obj/machinery/reagent_refinery/hub + name = "Industrial Chemical Hub" + desc = "A platform for loading and unloading cargo tug tankers." + icon_state = "hub" + density = FALSE + anchored = TRUE + use_power = USE_POWER_OFF // Does not require power for pipes + idle_power_usage = 0 + active_power_usage = 0 + circuit = /obj/item/circuitboard/industrial_reagent_hub + default_max_vol = 0 + VAR_PRIVATE/wait_delay = 4 SECONDS + +/obj/machinery/reagent_refinery/hub/Initialize(mapload) + . = ..() + default_apply_parts() + // Update neighbours and self for state + update_neighbours() + update_icon() + +/obj/machinery/reagent_refinery/hub/process() + if(!anchored) + return + + if(stat & (BROKEN)) + return + + if (amount_per_transfer_from_this <= 0) + return + + var/obj/machinery/reagent_refinery/target = locate(/obj/machinery/reagent_refinery) in get_step(loc,dir) + if(target && target.dir != GLOB.reverse_dir[dir]) + var/obj/vehicle/train/trolley_tank/tanker = locate(/obj/vehicle/train/trolley_tank) in loc + if(tanker && tanker.reagents.total_volume > 0 && world.time > tanker.l_move_time + wait_delay) + // dump reagents to next refinery machine + transfer_tank( tanker.reagents, target, dir) + +/obj/machinery/reagent_refinery/hub/update_icon() + cut_overlays() + var/turf/T = get_step(get_turf(src),dir) + var/obj/machinery/other = locate(/obj/machinery/reagent_refinery) in T + var/intake = FALSE + if(other && other.anchored)// Waste processors do not connect to anything as outgoing + if(!istype(other,/obj/machinery/reagent_refinery/waste_processor)) + // weird handling for side connections... Otherwise, anything pointing into use gets connected back! + if(istype(other,/obj/machinery/reagent_refinery/filter)) + var/obj/machinery/reagent_refinery/filter/filt = other + var/check_dir = 0 + if(filt.get_filter_side() == 1) + check_dir = turn(filt.dir, 270) + else + check_dir = turn(filt.dir, 90) + if(check_dir == GLOB.reverse_dir[dir]) + intake = TRUE + if(other.dir == GLOB.reverse_dir[dir]) + intake = TRUE + // Get main dir pipe + if(intake) + var/image/pipe = image(icon, icon_state = "hub_intakes", dir = dir) + add_overlay(pipe) + else + var/image/pipe = image(icon, icon_state = "hub_cons", dir = dir) + add_overlay(pipe) + +/obj/machinery/reagent_refinery/hub/handle_transfer(var/atom/origin_machine, var/datum/reagents/RT, var/source_forward_dir, var/filter_id = "") + if(istype(origin_machine,/obj/machinery/reagent_refinery/hub)) // Hubs cannot send into other hubs + return 0 + if(dir != GLOB.reverse_dir[source_forward_dir] ) // The hub must be facing into its source to accept input, unlike others + return 0 + var/obj/vehicle/train/trolley_tank/tanker = locate(/obj/vehicle/train/trolley_tank) in get_turf(src) + if(!tanker) + return 0 + if(world.time < tanker.l_move_time + wait_delay) // await cooldown to avoid spamming moving tanks + return 0 + // Don't call parent, we're transfering into the holding tank instead + if(filter_id == "") + return RT.trans_to_obj(tanker, amount_per_transfer_from_this) + else + // Split out reagent... + return RT.trans_id_to(tanker, filter_id, amount_per_transfer_from_this) + +/obj/machinery/reagent_refinery/hub/examine(mob/user, infix, suffix) + . = ..() + . += "It is pumping chemicals at a rate of [amount_per_transfer_from_this]u." + tutorial(REFINERY_TUTORIAL_HUB|REFINERY_TUTORIAL_NOPOWER, .) diff --git a/code/modules/refinery/core/industrial_reagent_machines.dm b/code/modules/refinery/core/industrial_reagent_machines.dm new file mode 100644 index 00000000000..5da9e471bd7 --- /dev/null +++ b/code/modules/refinery/core/industrial_reagent_machines.dm @@ -0,0 +1,170 @@ +/obj/machinery/reagent_refinery + icon = 'icons/obj/machines/refinery_machines.dmi' + VAR_PROTECTED/default_max_vol = 120 + VAR_PROTECTED/amount_per_transfer_from_this = 120 + VAR_PROTECTED/possible_transfer_amounts = REFINERY_DEFAULT_TRANSFER_AMOUNTS + VAR_PROTECTED/reagent_type = /datum/reagents + +/obj/machinery/reagent_refinery/Initialize(mapload) + . = ..() + // reagent control + if(default_max_vol > 0) + create_reagents(default_max_vol, reagent_type) + // Update neighbours and self for state + update_neighbours() + update_icon() + +/obj/machinery/reagent_refinery/Destroy() + reagent_flush() + . = ..() + +/obj/machinery/reagent_refinery/dismantle() + reagent_flush() + . = ..() + +/obj/machinery/reagent_refinery/set_dir(newdir) + . = ..() + update_icon() + +/obj/machinery/reagent_refinery/on_reagent_change(changetype) + update_icon() + +/// Splashes reagents all over the floor, called from destroy and dismantle. +/obj/machinery/reagent_refinery/proc/reagent_flush() + if(reagents && reagents.total_volume > 30) + visible_message(span_danger("\The [src] splashes everywhere as it is disassembled!")) + reagents.splash_area(get_turf(src),2) + +/obj/machinery/reagent_refinery/attackby(var/obj/item/O as obj, var/mob/user as mob) + if (istype(O, /obj/item/multitool)) // Solar grubs + return ..() + if(O.has_tool_quality(TOOL_WRENCH)) + if(!anchored) + for(var/obj/machinery/reagent_refinery/R in loc.contents) + if(R != src) + to_chat(usr,span_warning("You cannot anchor \the [src] until \The [R] is moved out of the way!")) + return + playsound(src, O.usesound, 75, 1) + anchored = !anchored + user.visible_message("[user.name] [anchored ? "secures" : "unsecures"] the bolts holding [src.name] to the floor.", \ + "You [anchored ? "secure" : "unsecure"] the bolts holding [src] to the floor.", \ + "You hear a ratchet.") + update_neighbours() + update_icon() + return + if(reagents && (istype(O,/obj/item/reagent_containers/glass) || \ + istype(O,/obj/item/reagent_containers/food/drinks/glass2) || \ + istype(O,/obj/item/reagent_containers/food/drinks/shaker))) + // Transfer FROM internal beaker to this. + if (reagents.total_volume <= 0) + to_chat(usr,"\The [src] is empty. There is nothing to drain into \the [O].") + return + // Fill up the whole volume if we can, DUMP IT OUT + var/obj/item/reagent_containers/C = O + reagents.trans_to_obj(C, reagents.total_volume) + playsound(src, 'sound/machines/reagent_dispense.ogg', 25, 1) + to_chat(usr,"You drain \the [src] into \the [C].") + return + if(default_deconstruction_screwdriver(user, O)) + return + if(default_deconstruction_crowbar(user, O)) + return + . = ..() + +/// Updates the icons of all neighbour machines, used when connecting. +/obj/machinery/reagent_refinery/proc/update_neighbours() + // Update icons and neighbour icons to avoid loss of sanity + for(var/direction in GLOB.cardinal) + var/turf/T = get_step(get_turf(src),direction) + var/obj/machinery/other = locate(/obj/machinery/reagent_refinery) in T + if(other && other.anchored) + other.update_icon() + +/// Changes the transfer rate of reagents from this machine to the next +/obj/machinery/reagent_refinery/verb/set_APTFT() //set amount_per_transfer_from_this + PROTECTED_PROC(TRUE) + set name = "Set transfer amount" + set category = "Object" + set src in view(1) + var/N = tgui_input_list(usr, "Amount per transfer from this:","[src]", possible_transfer_amounts) + if(N && Adjacent(usr)) + amount_per_transfer_from_this = N + update_icon() + +/// Transfers reagents from us to the next machine. Calls handle_transfer() on any target machines to check if they can accept reagents. +/obj/machinery/reagent_refinery/proc/transfer_tank( var/datum/reagents/RT, var/obj/machinery/reagent_refinery/target, var/source_forward_dir, var/filter_id = "") + PROTECTED_PROC(TRUE) + if(RT.total_volume <= 0 || !anchored || !target.anchored) + return 0 + if(active_power_usage > 0 && !can_use_power_oneoff(active_power_usage)) + return 0 + if(!istype(target,/obj/machinery/reagent_refinery)) // cannot transfer into grinders anyway, so it's fine to do it this way. + return 0 + var/transfered = target.handle_transfer(src,RT,source_forward_dir,filter_id) + if(transfered > 0 && active_power_usage > 0) + use_power_oneoff(active_power_usage) + return transfered + +/// Handles reagent recieving from transfer_tank(), returns how much reagent was transfered if successful. Overriden to prevent access from certain sides or for filtering. +/obj/machinery/reagent_refinery/proc/handle_transfer(var/atom/origin_machine, var/datum/reagents/RT, var/source_forward_dir, var/filter_id = "") // Handle transfers in an override, instead of one monster function that typechecks like transfer_tank() used to be + // Transfer to target in amounts every process tick! + if(filter_id == "") + var/amount = RT.trans_to_obj(src, amount_per_transfer_from_this) + return amount + // Split out reagent... + return RT.trans_id_to(src, filter_id, amount_per_transfer_from_this, TRUE) + +/obj/machinery/reagent_refinery/proc/refinery_transfer() + if(amount_per_transfer_from_this <= 0 || reagents.total_volume <= 0) + return 0 + + // dump reagents to next refinery machine + var/obj/machinery/reagent_refinery/target = locate(/obj/machinery/reagent_refinery) in get_step(get_turf(src),dir) + if(!target) + return 0 + + return transfer_tank( reagents, target, dir) + +/obj/machinery/reagent_refinery/verb/rotate_clockwise() + set name = "Rotate Machine Clockwise" + set category = "Object" + set src in view(1) + + if (usr.stat || usr.restrained() || anchored) + return + + src.set_dir(turn(src.dir, 270)) + update_icon() + +/obj/machinery/reagent_refinery/verb/rotate_counterclockwise() + set name = "Rotate Machine Counterclockwise" + set category = "Object" + set src in view(1) + + if (usr.stat || usr.restrained() || anchored) + return + + src.set_dir(turn(src.dir, 90)) + update_icon() + +/obj/machinery/reagent_refinery/proc/tutorial(var/flags,var/list/examine_list) + // Specialty + if(flags & REFINERY_TUTORIAL_HUB) + examine_list += "A trolly tanker can be drained or filled depending on if this machine is attached to the input or output of another machine. " + // Input handling + if(flags & REFINERY_TUTORIAL_NOINPUT) + examine_list += "This machine does not accept any inputs, and only outputs. " + if(flags & REFINERY_TUTORIAL_ALLIN) + examine_list += "This machine accepts input from all sides. " + if(flags & REFINERY_TUTORIAL_SINGLEOUTPUT) + examine_list += "This machine accepts inputs on all sides, except for its output. " + if(flags & REFINERY_TUTORIAL_NOOUTPUT) + examine_list += "This machine does not have any outputs. " + // Pipe markings + if(flags & REFINERY_TUTORIAL_INPUT) + examine_list += "The red pipe marks the input. " + if(flags & REFINERY_TUTORIAL_FILTER) + examine_list += "The purple pipe marks the filtered output. " + // No power needed + if(flags & REFINERY_TUTORIAL_NOPOWER) + examine_list += "Does not require power. " diff --git a/code/modules/refinery/core/industrial_reagent_pipe.dm b/code/modules/refinery/core/industrial_reagent_pipe.dm new file mode 100644 index 00000000000..5af43dbe4a0 --- /dev/null +++ b/code/modules/refinery/core/industrial_reagent_pipe.dm @@ -0,0 +1,67 @@ +/obj/machinery/reagent_refinery/pipe + name = "Industrial Chemical Pipe" + desc = "A large pipe made for transporting industrial chemicals. It has a low-power passive pump. The red marks show where the flow is coming from. Does not require power." + icon_state = "pipe" + density = TRUE + anchored = TRUE + use_power = USE_POWER_OFF // Does not require power for pipes + idle_power_usage = 0 + active_power_usage = 0 + circuit = /obj/item/circuitboard/industrial_reagent_pipe + default_max_vol = 60 // smoll + +/obj/machinery/reagent_refinery/pipe/Initialize(mapload) + . = ..() + default_apply_parts() + // Can't be set on these + src.verbs -= /obj/machinery/reagent_refinery/verb/set_APTFT + // Update neighbours and self for state + update_neighbours() + update_icon() + AddElement(/datum/element/climbable) + +/obj/machinery/reagent_refinery/pipe/process() + if(!anchored) + return + + if(stat & (BROKEN)) + return + + refinery_transfer() + +/obj/machinery/reagent_refinery/pipe/update_icon() + cut_overlays() + if(anchored) + for(var/direction in GLOB.cardinal) + var/turf/T = get_step(get_turf(src),direction) + var/obj/machinery/other = locate(/obj/machinery/reagent_refinery) in T + if(other && other.anchored) + // Waste processors do not connect to anything as outgoing + if(istype(other,/obj/machinery/reagent_refinery/waste_processor)) + continue + // weird handling for side connections... Otherwise, anything pointing into use gets connected back! + if(istype(other,/obj/machinery/reagent_refinery/filter)) + var/obj/machinery/reagent_refinery/filter/filt = other + var/check_dir = 0 + if(filt.get_filter_side() == 1) + check_dir = turn(filt.dir, 270) + else + check_dir = turn(filt.dir, 90) + if(check_dir == GLOB.reverse_dir[direction] && dir != direction) + var/image/intake = image(icon, icon_state = "pipe_intakes", dir = direction) + add_overlay(intake) + continue + if(other.dir == GLOB.reverse_dir[direction] && dir != direction) + var/image/intake = image(icon, icon_state = "pipe_intakes", dir = direction) + add_overlay(intake) + +/obj/machinery/reagent_refinery/pipe/handle_transfer(var/atom/origin_machine, var/datum/reagents/RT, var/source_forward_dir, var/filter_id = "") + // no back/forth, filters don't use just their forward, they send the side too! + if(dir == GLOB.reverse_dir[source_forward_dir]) + return 0 + . = ..(origin_machine, RT, source_forward_dir, filter_id) + +/obj/machinery/reagent_refinery/pipe/examine(mob/user, infix, suffix) + . = ..() + . += "The meter shows [reagents.total_volume]u / [reagents.maximum_volume]u." + tutorial(REFINERY_TUTORIAL_SINGLEOUTPUT|REFINERY_TUTORIAL_NOPOWER, .) diff --git a/code/modules/refinery/core/industrial_reagent_pump.dm b/code/modules/refinery/core/industrial_reagent_pump.dm new file mode 100644 index 00000000000..612ff9a4cbb --- /dev/null +++ b/code/modules/refinery/core/industrial_reagent_pump.dm @@ -0,0 +1,55 @@ +/obj/machinery/reagent_refinery/pump + name = "Industrial Chemical Pump" + desc = "Transports large amounts of chemicals between machines, it also has connections for various types of hoses." + icon_state = "pump" + density = TRUE + anchored = TRUE + use_power = USE_POWER_IDLE + idle_power_usage = 0 + active_power_usage = 50 + circuit = /obj/item/circuitboard/industrial_reagent_pump + +/obj/machinery/reagent_refinery/pump/Initialize(mapload) + . = ..() + default_apply_parts() + // Update neighbours and self for state + update_neighbours() + update_icon() + + AddComponent(/datum/component/hose_connector/input) + AddComponent(/datum/component/hose_connector/input) + AddComponent(/datum/component/hose_connector/input) + AddComponent(/datum/component/hose_connector/output) + + AddElement(/datum/element/climbable) + +/obj/machinery/reagent_refinery/pump/process() + if(!anchored) + return + + power_change() + if(stat & (NOPOWER|BROKEN)) + return + + refinery_transfer() + +/obj/machinery/reagent_refinery/pump/update_icon() + cut_overlays() + if(reagents && reagents.total_volume >= 5) + var/image/filling = image(icon, loc, "pump_r",dir = dir) + filling.color = reagents.get_color() + add_overlay(filling) + +/obj/machinery/reagent_refinery/pump/attack_hand(mob/user) + set_APTFT() + +/obj/machinery/reagent_refinery/pump/handle_transfer(var/atom/origin_machine, var/datum/reagents/RT, var/source_forward_dir, var/filter_id = "") + // pumps, furnaces and filters can only be FED in a straight line + if(source_forward_dir != dir) + return 0 + . = ..(origin_machine, RT, source_forward_dir, filter_id) + +/obj/machinery/reagent_refinery/pump/examine(mob/user, infix, suffix) + . = ..() + . += "The meter shows [reagents.total_volume]u / [reagents.maximum_volume]u. It is pumping chemicals at a rate of [amount_per_transfer_from_this]u." + tutorial(REFINERY_TUTORIAL_INPUT, .) diff --git a/code/modules/refinery/core/industrial_reagent_reactor.dm b/code/modules/refinery/core/industrial_reagent_reactor.dm new file mode 100644 index 00000000000..ebb2502bb35 --- /dev/null +++ b/code/modules/refinery/core/industrial_reagent_reactor.dm @@ -0,0 +1,155 @@ +#define REACTOR_MODE_INTAKE 0 +#define REACTOR_MODE_OUTPUT 1 + +/obj/machinery/reagent_refinery/reactor + name = "Industrial Chemical Reactor" + desc = "A reinforced chamber for high temperature distillation. Can be connected to a pipe network to change the interior atmosphere. It outputs chemicals on a timer, to allow for distillation." + icon_state = "reactor" + density = TRUE + anchored = TRUE + use_power = USE_POWER_IDLE + idle_power_usage = 0 + active_power_usage = 500 + circuit = /obj/item/circuitboard/industrial_reagent_reactor + default_max_vol = REAGENT_VAT_VOLUME + reagent_type = /datum/reagents/distilling + + VAR_PRIVATE/obj/machinery/portable_atmospherics/canister/internal_tank + VAR_PRIVATE/toggle_mode = REACTOR_MODE_INTAKE + VAR_PRIVATE/next_mode_toggle = 0 + + VAR_PRIVATE/dis_time = 30 + VAR_PRIVATE/drain_time = 10 + +/obj/machinery/reagent_refinery/reactor/Initialize(mapload) + . = ..() + default_apply_parts() + internal_tank = new /obj/machinery/portable_atmospherics/canister/empty() + update_gas_network() + next_mode_toggle = world.time + dis_time SECONDS + // Update neighbours and self for state + update_neighbours() + update_icon() + AddElement(/datum/element/climbable) + +/obj/machinery/reagent_refinery/reactor/Destroy() + . = ..() + qdel_null(internal_tank) + +/obj/machinery/reagent_refinery/reactor/process() + if(!anchored) + return + + power_change() + if(stat & (NOPOWER|BROKEN)) + return + + if(next_mode_toggle < world.time) + if(toggle_mode == REACTOR_MODE_INTAKE) + if(reagents && reagents.total_volume > 0 && amount_per_transfer_from_this > 0) + toggle_mode = REACTOR_MODE_OUTPUT // Only drain if anything in it! + next_mode_toggle = world.time + drain_time SECONDS + else + toggle_mode = REACTOR_MODE_INTAKE + next_mode_toggle = world.time + dis_time SECONDS + update_icon() + + if(amount_per_transfer_from_this <= 0 || reagents.total_volume <= 0) + return + + if(toggle_mode == REACTOR_MODE_INTAKE) + // perform reactions + reagents.handle_reactions() + else + // dump reagents to next refinery machine + var/obj/machinery/reagent_refinery/target = locate(/obj/machinery/reagent_refinery) in get_step(loc,dir) + if(target) + transfer_tank( reagents, target, dir) + +/obj/machinery/reagent_refinery/reactor/update_icon() + cut_overlays() + // Get main dir pipe + var/image/pipe = image(icon, icon_state = "reactor_cons", dir = dir) + add_overlay(pipe) + if(anchored) + if(!(stat & (NOPOWER|BROKEN))) + var/image/dot = image(icon, icon_state = "vat_dot_[ toggle_mode > REACTOR_MODE_INTAKE ? "on" : "off" ]") // Show refinery output mode + add_overlay(dot) + for(var/direction in GLOB.cardinal) + var/turf/T = get_step(get_turf(src),direction) + var/obj/machinery/other = locate(/obj/machinery/reagent_refinery) in T + if(other && other.anchored) + // Waste processors do not connect to anything as outgoing + if(istype(other,/obj/machinery/reagent_refinery/waste_processor)) + continue + // weird handling for side connections... Otherwise, anything pointing into use gets connected back! + if(istype(other,/obj/machinery/reagent_refinery/filter)) + var/obj/machinery/reagent_refinery/filter/filt = other + var/check_dir = 0 + if(filt.get_filter_side() == 1) + check_dir = turn(filt.dir, 270) + else + check_dir = turn(filt.dir, 90) + if(check_dir == GLOB.reverse_dir[direction] && dir != direction) + var/image/intake = image(icon, icon_state = "reactor_intakes", dir = direction) + add_overlay(intake) + continue + if(other.dir == GLOB.reverse_dir[direction] && dir != direction) + var/image/intake = image(icon, icon_state = "reactor_intakes", dir = direction) + add_overlay(intake) + +/obj/machinery/reagent_refinery/reactor/handle_transfer(var/atom/origin_machine, var/datum/reagents/RT, var/source_forward_dir, var/filter_id = "") + // no back/forth, filters don't use just their forward, they send the side too! + if(dir == GLOB.reverse_dir[source_forward_dir]) + return 0 + // locked until distilling mode + if(toggle_mode == REACTOR_MODE_OUTPUT) + return 0 + . = ..(origin_machine, RT, source_forward_dir, filter_id) + +/obj/machinery/reagent_refinery/reactor/examine(mob/user, infix, suffix) + . = ..() + . += "The meter shows [reagents.total_volume]u / [reagents.maximum_volume]u. It is pumping chemicals at a rate of [amount_per_transfer_from_this]u." + var/datum/gas_mixture/GM = internal_tank.return_air() + . += "The internal temperature is [GM.temperature]k at [GM.return_pressure()]kpa. It is currently in a [toggle_mode ? "pumping cycle, outputting stored chemicals" : "distilling cycle, accepting input chemicals"]." + tutorial(REFINERY_TUTORIAL_SINGLEOUTPUT, .) + +/obj/machinery/reagent_refinery/reactor/attackby(var/obj/item/O as obj, var/mob/user as mob) + . = ..() + if(O.has_tool_quality(TOOL_WRENCH)) + update_gas_network() // Handles anchoring + toggle_mode = REACTOR_MODE_INTAKE + next_mode_toggle = world.time + dis_time SECONDS + +/obj/machinery/reagent_refinery/reactor/proc/update_gas_network() + if(!internal_tank) + return + // think of this as we JUST anchored/deanchored + var/obj/machinery/atmospherics/portables_connector/pad = locate() in get_turf(src) + if(pad && !pad.connected_device) + if(anchored) + // Perform the connection, forcibly... we're ignoring adjacency checks with this + internal_tank.connected_port = pad + pad.connected_device = internal_tank + pad.on = 1 //Activate port updates + // Actually enforce the air sharing + var/datum/pipe_network/network = pad.return_network(internal_tank) + if(network && !network.gases.Find(internal_tank.air_contents)) + network.gases += internal_tank.air_contents + network.update = 1 + // Sfx + playsound(src, 'sound/mecha/gasconnected.ogg', 50, 1) + else + internal_tank.disconnect() + playsound(src, 'sound/mecha/gasdisconnected.ogg', 50, 1) + else if(internal_tank.connected_port) + internal_tank.disconnect() // How did we get here? qdelled pad? + playsound(src, 'sound/mecha/gasdisconnected.ogg', 50, 1) + +/obj/machinery/reagent_refinery/reactor/return_air() + if(internal_tank) + return internal_tank.return_air() + . = ..() + +#undef REACTOR_MODE_INTAKE +#undef REACTOR_MODE_OUTPUT diff --git a/code/modules/refinery/core/industrial_reagent_vat.dm b/code/modules/refinery/core/industrial_reagent_vat.dm new file mode 100644 index 00000000000..814571f0b11 --- /dev/null +++ b/code/modules/refinery/core/industrial_reagent_vat.dm @@ -0,0 +1,109 @@ +/obj/machinery/reagent_refinery/vat + name = "Industrial Chemical Vat" + desc = "A large mixing vat for huge quantities of chemicals. Don't fall in!" + icon_state = "vat" + density = TRUE + anchored = TRUE + use_power = USE_POWER_IDLE + idle_power_usage = 0 + active_power_usage = 50 + circuit = /obj/item/circuitboard/industrial_reagent_vat + // Chemical bath funtimes! + can_buckle = TRUE + buckle_lying = TRUE + default_max_vol = REAGENT_VAT_VOLUME + +/obj/machinery/reagent_refinery/vat/Initialize(mapload) + . = ..() + default_apply_parts() + // Can't be set on these + src.verbs -= /obj/machinery/reagent_refinery/verb/set_APTFT + +/obj/machinery/reagent_refinery/vat/process() + if(buckled_mobs && buckled_mobs.len && reagents.total_volume > 0) + for(var/mob/living/L in buckled_mobs) + reagents.trans_to(L, 1) // Soak in the juices + + if(!anchored) + return + + power_change() + if(stat & (NOPOWER|BROKEN)) + return + + refinery_transfer() + +/obj/machinery/reagent_refinery/vat/update_icon() + cut_overlays() + // GOOBY! + if(reagents && reagents.total_volume >= 5) + var/percent = (reagents.total_volume / reagents.maximum_volume) * 100 + switch(percent) + if(5 to 20) percent = 2 + if(20 to 40) percent = 4 + if(40 to 60) percent = 6 + if(60 to 80) percent = 8 + if(80 to INFINITY) percent = 10 + var/image/filling = image(icon, loc, "vat_r_[percent]",dir = dir) + filling.color = reagents.get_color() + add_overlay(filling) + // Get main dir pipe + var/image/pipe = image(icon, icon_state = "vat_cons", dir = dir) + add_overlay(pipe) + if(anchored) + if(!(stat & (NOPOWER|BROKEN))) + var/image/dot = image(icon, icon_state = "vat_dot_[ amount_per_transfer_from_this > 0 ? "on" : "off" ]") + add_overlay(dot) + for(var/direction in GLOB.cardinal) + var/turf/T = get_step(get_turf(src),direction) + var/obj/machinery/other = locate(/obj/machinery/reagent_refinery) in T + if(other && other.anchored) + // Waste processors do not connect to anything as outgoing + if(istype(other,/obj/machinery/reagent_refinery/waste_processor)) + continue + // weird handling for side connections... Otherwise, anything pointing into use gets connected back! + if(istype(other,/obj/machinery/reagent_refinery/filter)) + var/obj/machinery/reagent_refinery/filter/filt = other + var/check_dir = 0 + if(filt.get_filter_side() == 1) + check_dir = turn(filt.dir, 270) + else + check_dir = turn(filt.dir, 90) + if(check_dir == GLOB.reverse_dir[direction] && dir != direction) + var/image/intake = image(icon, icon_state = "vat_intakes", dir = direction) + add_overlay(intake) + continue + if(other.dir == GLOB.reverse_dir[direction] && dir != direction) + var/image/intake = image(icon, icon_state = "vat_intakes", dir = direction) + add_overlay(intake) + +/obj/machinery/reagent_refinery/vat/examine(mob/user, infix, suffix) + . = ..() + . += "The meter shows [reagents.total_volume]u / [reagents.maximum_volume]u. It is pumping chemicals at a rate of [amount_per_transfer_from_this]u." + tutorial(REFINERY_TUTORIAL_SINGLEOUTPUT, .) + +/obj/machinery/reagent_refinery/vat/handle_transfer(var/atom/origin_machine, var/datum/reagents/RT, var/source_forward_dir, var/filter_id = "") + // no back/forth, filters don't use just their forward, they send the side too! + if(dir == GLOB.reverse_dir[source_forward_dir]) + return 0 + . = ..(origin_machine, RT, source_forward_dir, filter_id) + +/obj/machinery/reagent_refinery/vat/MouseDrop_T(var/atom/movable/C, mob/user as mob) + if(user.buckled || user.stat || user.restrained() || !Adjacent(user) || !user.Adjacent(C) || !istype(C) || (user == C && !user.canmove)) + return + if(istype(C,/obj/vehicle/train/trolley_tank)) + // Drain it! + C.reagents.trans_to_holder( src.reagents, src.reagents.maximum_volume) + visible_message("\The [user] drains \the [C] into \the [src].") + update_icon() + return + if(istype(C,/obj/item/reagent_containers/glass) || \ + istype(C,/obj/item/reagent_containers/food/drinks/glass2) || \ + istype(C,/obj/item/reagent_containers/food/drinks/shaker) || \ + istype(C,/obj/item/reagent_containers/chem_canister)) + // Drain it! + C.reagents.trans_to_holder( src.reagents, src.reagents.maximum_volume) + visible_message("\The [user] dumps \the [C] into \the [src].") + update_icon() + return + . = ..() diff --git a/code/modules/refinery/core/industrial_reagent_waste.dm b/code/modules/refinery/core/industrial_reagent_waste.dm new file mode 100644 index 00000000000..ed67d58afab --- /dev/null +++ b/code/modules/refinery/core/industrial_reagent_waste.dm @@ -0,0 +1,88 @@ +/obj/machinery/reagent_refinery/waste_processor + name = "Industrial Chemical Waste Processor" + desc = "A large chemical processing chamber. Chemicals inside are energized into plasma and collected as raw energy! Unfortunately the process is only 17% efficient, a net loss of power." + icon_state = "waste" + density = TRUE + anchored = TRUE + use_power = USE_POWER_IDLE + idle_power_usage = 0 + active_power_usage = 200 + circuit = /obj/item/circuitboard/industrial_reagent_waste_processor + default_max_vol = CARGOTANKER_VOLUME + +/obj/machinery/reagent_refinery/waste_processor/Initialize(mapload) + . = ..() + default_apply_parts() + // Can't be set on these + src.verbs -= /obj/machinery/reagent_refinery/verb/set_APTFT + AddElement(/datum/element/climbable) + +/obj/machinery/reagent_refinery/waste_processor/process() + if(!anchored) + return + + power_change() + if(stat & (NOPOWER|BROKEN)) + return + + if (reagents.total_volume <= 0) + return + + if (prob((reagents.total_volume / reagents.maximum_volume) * 100)) + flick("waste_burn",src) + use_power_oneoff(active_power_usage) + reagents.clear_reagents() + +/obj/machinery/reagent_refinery/waste_processor/update_icon() + cut_overlays() + if(anchored) + for(var/direction in GLOB.cardinal) + var/turf/T = get_step(get_turf(src),direction) + var/obj/machinery/other = locate(/obj/machinery/reagent_refinery) in T + if(other && other.anchored) + // Waste processors do not connect to anything as outgoing + if(istype(other,/obj/machinery/reagent_refinery/waste_processor)) + continue + // weird handling for side connections... Otherwise, anything pointing into use gets connected back! + if(istype(other,/obj/machinery/reagent_refinery/filter)) + var/obj/machinery/reagent_refinery/filter/filt = other + var/check_dir = 0 + if(filt.get_filter_side() == 1) + check_dir = turn(filt.dir, 270) + else + check_dir = turn(filt.dir, 90) + if(check_dir == GLOB.reverse_dir[direction]) + var/image/intake = image(icon, icon_state = "waste_intakes", dir = direction) + add_overlay(intake) + continue + if(other.dir == GLOB.reverse_dir[direction]) + var/image/intake = image(icon, icon_state = "waste_intakes", dir = direction) + add_overlay(intake) + +/obj/machinery/reagent_refinery/waste_processor/handle_transfer(var/atom/origin_machine, var/datum/reagents/RT, var/source_forward_dir, var/filter_id = "") + // Waste tanks accept from all sides + . = ..(origin_machine, RT, source_forward_dir, filter_id) + +/obj/machinery/reagent_refinery/waste_processor/examine(mob/user, infix, suffix) + . = ..() + . += "The meter shows [reagents.total_volume]u / [reagents.maximum_volume]u. It is pumping chemicals at a rate of [amount_per_transfer_from_this]u." + tutorial(REFINERY_TUTORIAL_ALLIN, .) + +/obj/machinery/reagent_refinery/waste_processor/MouseDrop_T(var/atom/movable/C, mob/user as mob) + if(user.buckled || user.stat || user.restrained() || !Adjacent(user) || !user.Adjacent(C) || !istype(C) || (user == C && !user.canmove)) + return + if(istype(C,/obj/vehicle/train/trolley_tank)) + // Drain it! + C.reagents.trans_to_holder( src.reagents, src.reagents.maximum_volume) + visible_message("\The [user] drains \the [C] into \the [src].") + update_icon() + return + if(istype(C,/obj/item/reagent_containers/glass) || \ + istype(C,/obj/item/reagent_containers/food/drinks/glass2) || \ + istype(C,/obj/item/reagent_containers/food/drinks/shaker)) + // Drain it! + C.reagents.trans_to_holder( src.reagents, src.reagents.maximum_volume) + visible_message("\The [user] dumps \the [C] into \the [src].") + update_icon() + return + . = ..() diff --git a/code/modules/refinery/equipment/chemcontainer.dm b/code/modules/refinery/equipment/chemcontainer.dm new file mode 100644 index 00000000000..04ed0d3d54a --- /dev/null +++ b/code/modules/refinery/equipment/chemcontainer.dm @@ -0,0 +1,165 @@ +/obj/item/reagent_containers/chem_canister + name = "chemical canister" + desc = "Used to refill chemical dispensers. Uses special chemical safety technology to prevent tampering. It will attempt to fully dispense its contents into any container it is connected to." + + icon = 'icons/obj/chemical.dmi' + icon_state = "container" + + drop_sound = 'sound/items/drop/gascan.ogg' + pickup_sound = 'sound/items/pickup/gascan.ogg' + + w_class = ITEMSIZE_COST_LARGE + + flags = NOREACT + + volume = CARTRIDGE_VOLUME_LARGE + amount_per_transfer_from_this = CARTRIDGE_VOLUME_LARGE + possible_transfer_amounts = list(CARTRIDGE_VOLUME_LARGE) + unacidable = TRUE + + VAR_PROTECTED/loaded_reagent = null + VAR_PRIVATE/label = "" + +/obj/item/reagent_containers/chem_canister/Initialize(mapload) + . = ..() + if(loaded_reagent) + var/datum/reagent/R = SSchemistry.chemical_reagents[loaded_reagent] + if(R) // Sanity check the reagent + set_canister(R.name,R.id) + reagents.add_reagent(R.id, volume) + // Can't be set on these + src.verbs -= /obj/item/reagent_containers/verb/set_APTFT + update_icon() + +/obj/item/reagent_containers/chem_canister/examine(mob/user) + . = ..() + if(reagents.total_volume <= 0) + . += "It is empty." + else + . += "It contains [reagents.total_volume] units of liquid." + +/obj/item/reagent_containers/chem_canister/proc/set_canister(var/labl,var/reagent_id) + setLabel(labl) + loaded_reagent = reagent_id + +/obj/item/reagent_containers/chem_canister/proc/setLabel(L) + PRIVATE_PROC(TRUE) + if(L) + label = L + name = "[initial(name)] - '[L]'" + else + label = "" + name = initial(name) + +/obj/item/reagent_containers/chem_canister/afterattack(obj/target, mob/user , flag) + if (!flag) + return + + else if(istype(target, /obj/machinery/chemical_dispenser)) //A dispenser. Refill a matching reagent container in it! + target.add_fingerprint(user) + + if(!reagents.total_volume) + to_chat(user, span_warning("\The [src] is empty.")) + return + + var/found_any = FALSE + var/obj/machinery/chemical_dispenser/DISP = target + for(var/key in DISP.cartridges) + var/obj/item/reagent_containers/chem_disp_cartridge/C = DISP.cartridges[key] + if(C && C.label == label) // This allows it to be player configured + found_any = TRUE + if(C.reagents.total_volume >= C.reagents.maximum_volume) + continue + reagents.trans_to_obj(C, amount_per_transfer_from_this) + update_icon() + SStgui.update_uis(DISP) + to_chat(user, span_notice("You fill \the [target] with '\the [src].")) + return + + if(found_any) + to_chat(user, span_notice("The [label] is already full.")) + else + to_chat(user, span_notice("\The [target] has no [label] cartridges to fill.")) + + if(target.is_open_container() && target.reagents) //Something like a glass. Player probably wants to transfer TO it. + + if(!reagents.total_volume) + to_chat(user, span_warning("\The [src] is empty.")) + return + + if(target.reagents.total_volume >= target.reagents.maximum_volume) + to_chat(user, span_warning("\The [target] is full.")) + return + + var/trans = src.reagents.trans_to_obj(target, amount_per_transfer_from_this) + to_chat(user, span_notice("You transfer [trans] units of the solution to \the [target].")) + update_icon() + + else + return ..() + +/obj/item/reagent_containers/chem_canister/on_reagent_change(changetype) + update_icon() + +/obj/item/reagent_containers/chem_canister/update_icon() + . = ..() + cut_overlays() + if(reagents && reagents.total_volume > 0) + var/percent = (reagents.total_volume / reagents.maximum_volume) * 100 + switch(percent) + if(0 to 25) percent = 25 + if(25 to 50) percent = 50 + if(50 to 75) percent = 75 + if(75 to INFINITY) percent = 100 + var/image/chems = image(icon, icon_state = "[icon_state]_c[percent]", dir = NORTH) + chems.color = reagents.get_color() + add_overlay(chems) + + +// Preloads +/obj/item/reagent_containers/chem_canister/water + loaded_reagent = REAGENT_ID_WATER +/obj/item/reagent_containers/chem_canister/sugar + loaded_reagent = REAGENT_ID_SUGAR +/obj/item/reagent_containers/chem_canister/hydrogen + loaded_reagent = REAGENT_ID_HYDROGEN +/obj/item/reagent_containers/chem_canister/lithium + loaded_reagent = REAGENT_ID_LITHIUM +/obj/item/reagent_containers/chem_canister/carbon + loaded_reagent = REAGENT_ID_CARBON +/obj/item/reagent_containers/chem_canister/nitrogen + loaded_reagent = REAGENT_ID_NITROGEN +/obj/item/reagent_containers/chem_canister/oxygen + loaded_reagent = REAGENT_ID_OXYGEN +/obj/item/reagent_containers/chem_canister/fluorine + loaded_reagent = REAGENT_ID_FLUORINE +/obj/item/reagent_containers/chem_canister/sodium + loaded_reagent = REAGENT_ID_SODIUM +/obj/item/reagent_containers/chem_canister/aluminum + loaded_reagent = REAGENT_ID_ALUMINIUM +/obj/item/reagent_containers/chem_canister/silicon + loaded_reagent = REAGENT_ID_SILICON +/obj/item/reagent_containers/chem_canister/phosphorus + loaded_reagent = REAGENT_ID_PHOSPHORUS +/obj/item/reagent_containers/chem_canister/sulfur + loaded_reagent = REAGENT_ID_SULFUR +/obj/item/reagent_containers/chem_canister/chlorine + loaded_reagent = REAGENT_ID_CHLORINE +/obj/item/reagent_containers/chem_canister/potassium + loaded_reagent = REAGENT_ID_POTASSIUM +/obj/item/reagent_containers/chem_canister/iron + loaded_reagent = REAGENT_ID_IRON +/obj/item/reagent_containers/chem_canister/copper + loaded_reagent = REAGENT_ID_COPPER +/obj/item/reagent_containers/chem_canister/mercury + loaded_reagent = REAGENT_ID_MERCURY +/obj/item/reagent_containers/chem_canister/radium + loaded_reagent = REAGENT_ID_RADIUM +/obj/item/reagent_containers/chem_canister/ethanol + loaded_reagent = REAGENT_ID_ETHANOL +/obj/item/reagent_containers/chem_canister/sacid + loaded_reagent = REAGENT_ID_SACID +/obj/item/reagent_containers/chem_canister/tungsten + loaded_reagent = REAGENT_ID_TUNGSTEN +/obj/item/reagent_containers/chem_canister/calcium + loaded_reagent = REAGENT_ID_CALCIUM diff --git a/code/modules/refinery/equipment/pumprelay.dm b/code/modules/refinery/equipment/pumprelay.dm new file mode 100644 index 00000000000..ed42ad84fba --- /dev/null +++ b/code/modules/refinery/equipment/pumprelay.dm @@ -0,0 +1,62 @@ +/obj/machinery/pump_relay + name = "Pump Relay" + desc = "Pumps chemicals long distances using plastic hoses. It has multiple inputs to allow the creation of complex pump networks. Does not require power." + icon = 'icons/obj/machines/refinery_machines.dmi' + icon_state = "pumprelay" + density = TRUE + anchored = TRUE + circuit = /obj/item/circuitboard/industrial_reagent_pump + +/obj/machinery/pump_relay/Initialize(mapload) + . = ..() + create_reagents(200) + default_apply_parts() + + AddComponent(/datum/component/hose_connector/input) + AddComponent(/datum/component/hose_connector/input) + AddComponent(/datum/component/hose_connector/output) + +/obj/machinery/pump_relay/attackby(var/obj/item/O as obj, var/mob/user as mob) + if(default_deconstruction_screwdriver(user, O)) + return + if(default_deconstruction_crowbar(user, O)) + return + if(default_part_replacement(user, O)) + return + if(default_unfasten_wrench(user, O, 20)) + return + + ..() + +/obj/machinery/pump_relay/on_reagent_change(changetype) + . = ..() + if(prob(2)) + visible_message(span_infoplain("\The [src] gurgles as it pumps fluid.")) + +/obj/machinery/pump_relay/on_reagent_change(changetype) + update_icon() + +/obj/machinery/pump_relay/update_icon() + . = ..() + cut_overlays() + // GOOBY! + if(reagents && reagents.total_volume >= 5) + var/percent = (reagents.total_volume / reagents.maximum_volume) * 100 + switch(percent) + if(5 to 10) percent = 1 + if(10 to 20) percent = 2 + if(20 to 30) percent = 3 + if(30 to 40) percent = 4 + if(40 to 50) percent = 5 + if(50 to 60) percent = 6 + if(60 to 70) percent = 7 + if(70 to 80) percent = 8 + if(80 to 90) percent = 9 + if(90 to INFINITY) percent = 10 + var/image/filling = image(icon, loc, "pumprelay_r_[percent]",dir = dir) + filling.color = reagents.get_color() + add_overlay(filling) + +/obj/machinery/pump_relay/examine(mob/user, infix, suffix) + . = ..() + . += "The meter shows [reagents.total_volume]u / [reagents.maximum_volume]u." diff --git a/code/modules/refinery/equipment/smart_centrifuge.dm b/code/modules/refinery/equipment/smart_centrifuge.dm new file mode 100644 index 00000000000..7383e258e77 --- /dev/null +++ b/code/modules/refinery/equipment/smart_centrifuge.dm @@ -0,0 +1,117 @@ +/obj/machinery/smart_centrifuge + name = "smart centrifuge" + desc = "Isolates various compounds and stores them in chemical cartridges." + icon = 'icons/obj/hydroponics_machines_vr.dmi' + icon_state = "sextractor" + density = TRUE + anchored = TRUE + circuit = /obj/item/circuitboard/smart_centrifuge + + var/working = FALSE + +/obj/machinery/smart_centrifuge/Initialize(mapload) + . = ..() + create_reagents(CARGOTANKER_VOLUME) + flags |= OPENCONTAINER + default_apply_parts() + +/obj/machinery/smart_centrifuge/attackby(var/obj/item/O as obj, var/mob/user as mob) + if(in_use) + to_chat(user, "\The [src] is still spinning.") + return + if(default_deconstruction_screwdriver(user, O)) + update_icon() + return + + if(default_deconstruction_crowbar(user, O)) + return + + if(default_unfasten_wrench(user, O, 20)) + return + + return ..() + +/obj/machinery/smart_centrifuge/attack_hand(mob/user) + spin_reagents(user,FALSE) + +/obj/machinery/smart_centrifuge/verb/isolate_reagents() + set name = "Isolate Reagents Automatically" + set category = "Object" + set src in view(1) + spin_reagents(usr,FALSE,FALSE) + +/obj/machinery/smart_centrifuge/verb/isolate_reagents_bottle() + set name = "Isolate Reagents To Bottles" + set category = "Object" + set src in view(1) + spin_reagents(usr,TRUE,FALSE) + +/obj/machinery/smart_centrifuge/verb/isolate_reagents_canisters() + set name = "Isolate Reagents To Canisters" + set category = "Object" + set src in view(1) + spin_reagents(usr,FALSE,TRUE) + +/obj/machinery/smart_centrifuge/proc/spin_reagents(mob/user, var/force_bottle, var/force_canister) + if(working) + to_chat(user, "\The [src] is still spinning.") + return + else if(reagents.reagent_list.len == 0) + to_chat(user, "\The [src] is empty.") + return + else + playsound(src, 'sound/machines/buttonbeep.ogg', 50, 1) + playsound(src, 'sound/machines/airpumpidle.ogg', 100, 1) + to_chat(user, "You activate \the [src].") + working = TRUE + flags ^= OPENCONTAINER + addtimer(CALLBACK(src, PROC_REF(internal_reagent_seperate),force_canister,force_bottle), 10 SECONDS, TIMER_DELETE_ME) + +/obj/machinery/smart_centrifuge/proc/internal_reagent_seperate(var/force_canister,var/force_bottle) + if(reagents.reagent_list.len <= 0) + visible_message("\The [src] finishes processing.") + playsound(src, 'sound/machines/biogenerator_end.ogg', 50, 1) + playsound(src, 'sound/machines/buttonbeep.ogg', 50, 1) + working = FALSE + flags |= OPENCONTAINER + return + + // Seperate out reagents + for(var/datum/reagent/RL in reagents.reagent_list) + // Handle special bottle types + if(!RL.volume) + continue + var/obj/item/reagent_containers/CD + if(force_canister || (RL.volume >= 500 && !force_bottle)) + CD = new /obj/item/reagent_containers/chem_canister(src) + var/obj/item/reagent_containers/chem_canister/CHEM = CD + CHEM.set_canister(RL.name,RL.id) + else + CD = new /obj/item/reagent_containers/glass/bottle(src) + CD.name = "[RL.name] bottle" + CD.icon_state = "bottle-1" + // Transfer if possible + playsound(src, 'sound/machines/reagent_dispense.ogg', 25, 1) + reagents.trans_id_to( CD, RL.id, min(RL.volume,CD.reagents.maximum_volume), TRUE) + CD.update_icon() + CD.forceMove(loc) // Drop it outside + CD.pixel_x = rand(-7, 7) // random position + CD.pixel_y = rand(-7, 7) + break + addtimer(CALLBACK(src, PROC_REF(internal_reagent_seperate),force_canister,force_bottle), 1 SECOND, TIMER_DELETE_ME) + +/obj/machinery/smart_centrifuge/MouseDrop_T(var/atom/movable/C, mob/user as mob) + if(user.buckled || user.stat || user.restrained() || !Adjacent(user) || !user.Adjacent(C) || !istype(C) || (user == C && !user.canmove)) + return + if(istype(C,/obj/vehicle/train/trolley_tank)) + // Drain it! + C.reagents.trans_to_holder( src.reagents, src.reagents.maximum_volume) + visible_message("\The [user] drains \the [C] into \the [src].") + return + . = ..() + +/obj/machinery/smart_centrifuge/examine(mob/user, infix, suffix) + . = ..() + . += "The meter shows [reagents.total_volume]u / [reagents.maximum_volume]u." + for(var/datum/reagent/RL in reagents.reagent_list) + . += "[RL.name]: [RL.volume]u." diff --git a/code/modules/research/tg/designs/boards/refinery.dm b/code/modules/research/tg/designs/boards/refinery.dm new file mode 100644 index 00000000000..3655598dc43 --- /dev/null +++ b/code/modules/research/tg/designs/boards/refinery.dm @@ -0,0 +1,119 @@ +/datum/design_techweb/board/industrial_reagent_filter + name = "Industrial Reagent Filter" + id = "industrial_reagent_filter" + // req_tech = list(TECH_DATA = 1) + build_path = /obj/item/circuitboard/industrial_reagent_filter + category = list( + RND_CATEGORY_MACHINE + RND_SUBCATEGORY_MACHINE_ENGINEERING + ) + departmental_flags = DEPARTMENT_BITFLAG_ENGINEERING + +/datum/design_techweb/board/industrial_reagent_furnace + name = "Industrial Reagent Furnace" + id = "industrial_reagent_furnace" + // req_tech = list(TECH_DATA = 1) + build_path = /obj/item/circuitboard/industrial_reagent_furnace + category = list( + RND_CATEGORY_MACHINE + RND_SUBCATEGORY_MACHINE_ENGINEERING + ) + departmental_flags = DEPARTMENT_BITFLAG_ENGINEERING + +/datum/design_techweb/board/industrial_reagent_grinder + name = "Industrial Reagent Grinder" + id = "industrial_reagent_grinder" + // req_tech = list(TECH_DATA = 1) + build_path = /obj/item/circuitboard/industrial_reagent_grinder + category = list( + RND_CATEGORY_MACHINE + RND_SUBCATEGORY_MACHINE_ENGINEERING + ) + departmental_flags = DEPARTMENT_BITFLAG_ENGINEERING + +/datum/design_techweb/board/industrial_reagent_hub + name = "Industrial Reagent Hub" + id = "industrial_reagent_hub" + // req_tech = list(TECH_DATA = 1) + build_path = /obj/item/circuitboard/industrial_reagent_hub + category = list( + RND_CATEGORY_MACHINE + RND_SUBCATEGORY_MACHINE_ENGINEERING + ) + departmental_flags = DEPARTMENT_BITFLAG_ENGINEERING + +/datum/design_techweb/board/industrial_reagent_pipe + name = "Industrial Reagent Pipe" + id = "industrial_reagent_pipe" + // req_tech = list(TECH_DATA = 1) + build_path = /obj/item/circuitboard/industrial_reagent_pipe + category = list( + RND_CATEGORY_MACHINE + RND_SUBCATEGORY_MACHINE_ENGINEERING + ) + departmental_flags = DEPARTMENT_BITFLAG_ENGINEERING + +/datum/design_techweb/board/industrial_reagent_pump + name = "Industrial Reagent Pump" + id = "industrial_reagent_pump" + // req_tech = list(TECH_DATA = 1) + build_path = /obj/item/circuitboard/industrial_reagent_pump + category = list( + RND_CATEGORY_MACHINE + RND_SUBCATEGORY_MACHINE_ENGINEERING + ) + departmental_flags = DEPARTMENT_BITFLAG_ENGINEERING + +/datum/design_techweb/board/industrial_reagent_reactor + name = "Industrial Reagent Reactor" + id = "industrial_reagent_reactor" + // req_tech = list(TECH_DATA = 1) + build_path = /obj/item/circuitboard/industrial_reagent_reactor + category = list( + RND_CATEGORY_MACHINE + RND_SUBCATEGORY_MACHINE_ENGINEERING + ) + departmental_flags = DEPARTMENT_BITFLAG_ENGINEERING + +/datum/design_techweb/board/industrial_reagent_vat + name = "Industrial Reagent Vat" + id = "industrial_reagent_vat" + // req_tech = list(TECH_DATA = 1) + build_path = /obj/item/circuitboard/industrial_reagent_vat + category = list( + RND_CATEGORY_MACHINE + RND_SUBCATEGORY_MACHINE_ENGINEERING + ) + departmental_flags = DEPARTMENT_BITFLAG_ENGINEERING + +/datum/design_techweb/board/industrial_reagent_waste_processor + name = "Industrial Reagent Waste Processor" + id = "industrial_reagent_waste_processor" + // req_tech = list(TECH_DATA = 1) + build_path = /obj/item/circuitboard/industrial_reagent_waste_processor + category = list( + RND_CATEGORY_MACHINE + RND_SUBCATEGORY_MACHINE_ENGINEERING + ) + departmental_flags = DEPARTMENT_BITFLAG_ENGINEERING + +/datum/design_techweb/board/smart_centrifuge + name = "Smart Centrifuge" + id = "smart_centrifuge" + // req_tech = list(TECH_MAGNET = 2, TECH_DATA = 1, TECH_MATERIAL = 2) + build_path = /obj/item/circuitboard/smart_centrifuge + category = list( + RND_CATEGORY_MACHINE + RND_SUBCATEGORY_MACHINE_ENGINEERING + ) + departmental_flags = DEPARTMENT_BITFLAG_ENGINEERING + +/datum/design_techweb/board/pump_relay + name = "Pump Relay" + id = "pump_relay" + // req_tech = list(TECH_DATA = 1) + build_path = /obj/item/circuitboard/pump_relay + category = list( + RND_CATEGORY_MACHINE + RND_SUBCATEGORY_MACHINE_ENGINEERING + ) + departmental_flags = DEPARTMENT_BITFLAG_ENGINEERING + +/datum/design_techweb/board/fluid_pump + name = "Fluid Pump" + id = "fluid_pump" + // req_tech = list(TECH_DATA = 1) + build_path = /obj/item/circuitboard/fluidpump + category = list( + RND_CATEGORY_MACHINE + RND_SUBCATEGORY_MACHINE_ENGINEERING + ) + departmental_flags = DEPARTMENT_BITFLAG_ENGINEERING diff --git a/code/modules/research/tg/techwebs/nodes/engi_nodes.dm b/code/modules/research/tg/techwebs/nodes/engi_nodes.dm index bffea7fa649..529f34213a6 100644 --- a/code/modules/research/tg/techwebs/nodes/engi_nodes.dm +++ b/code/modules/research/tg/techwebs/nodes/engi_nodes.dm @@ -306,3 +306,25 @@ ) research_costs = list(TECHWEB_POINT_TYPE_GENERIC = TECHWEB_TIER_4_POINTS) announce_channels = list(CHANNEL_ENGINEERING, CHANNEL_SECURITY, CHANNEL_SCIENCE, CHANNEL_MEDICAL) + +/datum/techweb_node/chemical_refinery + id = TECHWEB_NODE_CHEM_REFINERY + display_name = "Chemical Refining" + description = "Reacting and distilling reagents into more complex and useful forms." + prereq_ids = list(TECHWEB_NODE_CHEM_SYNTHESIS) + design_ids = list( + "industrial_reagent_filter", + "industrial_reagent_furnace", + "industrial_reagent_grinder", + "industrial_reagent_hub", + "industrial_reagent_pipe", + "industrial_reagent_pump", + "industrial_reagent_reactor", + "industrial_reagent_vat", + "industrial_reagent_waste_processor", + "smart_centrifuge", + "pump_relay", + "fluid_pump" + ) + research_costs = list(TECHWEB_POINT_TYPE_GENERIC = TECHWEB_TIER_2_POINTS) + announce_channels = list(CHANNEL_ENGINEERING,CHANNEL_MEDICAL) diff --git a/code/modules/vehicles/cargo_train.dm b/code/modules/vehicles/cargo_train.dm index f4e1cca47f9..1107ac4a985 100644 --- a/code/modules/vehicles/cargo_train.dm +++ b/code/modules/vehicles/cargo_train.dm @@ -354,7 +354,7 @@ //if we are attaching a trolley to an engine we don't care what direction // it is in and it should probably be attached with the engine in the lead - if(istype(T, /obj/vehicle/train/trolley)) + if(istype(T, /obj/vehicle/train/trolley) || istype(T, /obj/vehicle/train/trolley_tank)) T.attach_to(src, user) else var/T_dir = get_dir(src, T) //figure out where T is wrt src @@ -410,3 +410,130 @@ ..() update_icon() // VOREStation Edit End - Overlay stuff for the chair-like effect + +//------------------------------------------------------- +// Cargo tugs for reagent transport from chemical refinery +//------------------------------------------------------- +/obj/vehicle/train/trolley_tank + name = "cargo train tanker" + desc = "A large, tank made for transporting liquids." + icon = 'icons/obj/vehicles_vr.dmi' + icon_state = "cargo_tank" + anchored = FALSE + flags = OPENCONTAINER + paint_color = "#efdd16" + +/obj/vehicle/train/trolley_tank/Initialize(mapload) + . = ..() + create_reagents(CARGOTANKER_VOLUME) + update_icon() + AddComponent(/datum/component/hose_connector/input) + AddComponent(/datum/component/hose_connector/output) + AddElement(/datum/element/climbable) + AddElement(/datum/element/sellable/trolley_tank) + +/obj/vehicle/train/trolley_tank/insert_cell(var/obj/item/cell/C, var/mob/living/carbon/human/H) + return + +/obj/vehicle/train/trolley_tank/Bump(atom/Obstacle) + if(!lead) + return //so people can't knock others over by pushing a trolley around + ..() + +/obj/vehicle/train/trolley_tank/MouseDrop_T(var/atom/movable/C, mob/user as mob) + if(C == user) + SEND_SIGNAL(src, COMSIG_CLIMBABLE_START_CLIMB, user) + return + + if(istype(C,/obj/item/reagent_containers/glass)) + var/obj/item/reagent_containers/glass/G = C + G.reagents.trans_to(src,G.reagents.total_volume) + to_chat(usr,"You empty \the [G] into the \the [src].") + return + + if(istype(C,/obj/vehicle/train)) // Only allow latching + . = ..() + +/obj/vehicle/train/trolley_tank/load(var/atom/movable/C, var/mob/living/user) + return FALSE // Cannot load anything onto this + +/obj/vehicle/train/trolley_tank/RunOver(var/mob/living/M) + ..() + attack_log += text("\[[time_stamp()]\] [span_red("ran over [M.name] ([M.ckey])")]") + +/obj/vehicle/train/trolley_tank/attackby(obj/item/W, mob/user) + + if(istype(W,/obj/item/reagent_containers/glass)) + var/obj/item/reagent_containers/glass/G = W + if(reagents.total_volume <= 0) + to_chat(usr,"\The [src] is empty.") + return + if(G.reagents.total_volume >= G.reagents.maximum_volume) + to_chat(usr,"\The [G] is full.") + return + playsound(src, 'sound/machines/reagent_dispense.ogg', 25, 1) + to_chat(usr,"You drain \the [src] into the \the [G].") + reagents.trans_to_holder( G.reagents, G.reagents.maximum_volume) + update_icon() + return + + if(istype(W, /obj/item/multitool)) + var/new_paint = input(usr, "Please select paint color.", "Paint Color", paint_color) as color|null + if(new_paint) + paint_color = new_paint + update_icon() + return + + if(istype(W, /obj/item/pen)) + var/t = tgui_input_text(user, "What would you like the label to be?", text("[]", src.name), null, MAX_NAME_LEN) + if (user.get_active_hand() != W) + return + if((!in_range(src, user) && src.loc != user)) + return + t = sanitizeSafe(t, MAX_NAME_LEN) + if(t) + src.name = "[initial(name)] - '[t]'" + else + src.name = initial(name) + return + + . = ..() + +/obj/vehicle/train/trolley_tank/update_car(var/train_length, var/active_engines) + src.train_length = train_length + src.active_engines = active_engines + + if(!lead && !tow) + anchored = FALSE + else + anchored = TRUE + +/obj/vehicle/train/trolley_tank/examine(mob/user, infix, suffix) + . = ..() + . += "The meter shows [reagents.total_volume]u / [reagents.maximum_volume]u." + +/obj/vehicle/train/trolley_tank/update_icon() + . = ..() + cut_overlays() + if(reagents && reagents.total_volume > 0) + var/percent = (reagents.total_volume / reagents.maximum_volume) * 100 + switch(percent) + if(5 to 10) percent = 10 + if(10 to 20) percent = 20 + if(20 to 30) percent = 30 + if(30 to 40) percent = 40 + if(40 to 50) percent = 50 + if(50 to 60) percent = 60 + if(60 to 70) percent = 70 + if(70 to 80) percent = 80 + if(80 to 90) percent = 90 + if(90 to INFINITY) percent = 100 + var/image/chems = image(icon, icon_state = "[icon_state]_r_[percent]", dir = NORTH) + chems.color = reagents.get_color() + add_overlay(chems) + var/image/Bodypaint = image(icon, icon_state = "[icon_state]_c", dir = NORTH) + Bodypaint.color = paint_color + add_overlay(Bodypaint) + +/obj/vehicle/train/trolley_tank/on_reagent_change(changetype) + update_icon() diff --git a/code/modules/vehicles/train.dm b/code/modules/vehicles/train.dm index 8132d6fce7b..25020b5970b 100644 --- a/code/modules/vehicles/train.dm +++ b/code/modules/vehicles/train.dm @@ -110,9 +110,8 @@ return if(istype(C,/obj/vehicle/train)) latch(C, user) - else - if(!load(C, user)) - to_chat(user, span_red("You were unable to load [C] on [src].")) + else if(!load(C, user)) + to_chat(user, span_red("You were unable to load [C] on [src].")) /obj/vehicle/train/attack_hand(mob/user as mob) if(user.stat || user.restrained() || !Adjacent(user)) diff --git a/code/unit_tests/reagent_tests.dm b/code/unit_tests/reagent_tests.dm index dd0f72789f9..b7552c6a616 100644 --- a/code/unit_tests/reagent_tests.dm +++ b/code/unit_tests/reagent_tests.dm @@ -39,6 +39,14 @@ failed = TRUE collection_id[R.id] = R.type + if(!R.supply_conversion_value) + log_unit_test("[Rpath]: Reagents - reagent ID \"[R.id]\" does not have supply_conversion_value set.") + failed = TRUE + + if(!R.industrial_use || !R.industrial_use == "") + log_unit_test("[Rpath]: Reagents - reagent ID \"[R.id]\" does not have industrial_use set.") + failed = TRUE + if(R.description == REAGENT_DESC_DEVELOPER_WARNING) log_unit_test("[Rpath]: Reagents - reagent description unset.") failed = TRUE @@ -202,9 +210,7 @@ fake_beaker.reagents.maximum_volume = 5000 else if(istype(CR, /decl/chemical_reaction/distilling)) // distilling - var/decl/chemical_reaction/distilling/DR = CR - var/obj/machinery/portable_atmospherics/powered/reagent_distillery/D = new() - D.current_temp = DR.temp_range[1] + var/obj/distilling_tester/D = new() qdel_swap(fake_beaker, D) fake_beaker.reagents.maximum_volume = 5000 else @@ -230,24 +236,44 @@ return TRUE /datum/unit_test/chemical_reactions_shall_not_conflict/proc/perform_reaction(var/decl/chemical_reaction/CR, var/list/inhib = list()) - // clear for inhibitor searches - fake_beaker.reagents.clear_reagents() - result_reactions.Cut() - var/scale = 1 if(CR.result_amount < 1) scale = 1 / CR.result_amount // Create at least 1 unit - if(inhib.len) // taken from argument and not reaction! Put in FIRST! - for(var/RR in inhib) - fake_beaker.reagents.add_reagent(RR, inhib[RR] * scale) - if(CR.catalysts) // Required for reaction - for(var/RR in CR.catalysts) - fake_beaker.reagents.add_reagent(RR, CR.catalysts[RR] * scale) - if(CR.required_reagents) - for(var/RR in CR.required_reagents) - fake_beaker.reagents.add_reagent(RR, CR.required_reagents[RR] * scale) + // Weird loop here, but this is used to test both instant and distilling reactions + // Instants will meet the while() condition on the first loop and go to the next stuff + // but distilling will repeat over and over until the temperature test is finished! + var/temp_test = 0 + do + // clear for inhibitor searches + fake_beaker.reagents.clear_reagents() + result_reactions.Cut() + if(inhib.len) // taken from argument and not reaction! Put in FIRST! + for(var/RR in inhib) + fake_beaker.reagents.add_reagent(RR, inhib[RR] * scale) + if(CR.catalysts) // Required for reaction + for(var/RR in CR.catalysts) + fake_beaker.reagents.add_reagent(RR, CR.catalysts[RR] * scale) + if(CR.required_reagents) + for(var/RR in CR.required_reagents) + fake_beaker.reagents.add_reagent(RR, CR.required_reagents[RR] * scale) + + if(!istype(CR, /decl/chemical_reaction/distilling)) + break // Skip the next section if we're not distilling + + // Check distillation at 10 points along its temperature range! + // This is so multiple reactions with the same requirements, but different temps, can be tested. + temp_test += 0.1 + var/obj/distilling_tester/DD = fake_beaker + DD.test_distilling(CR,temp_test) + + if(fake_beaker.reagents.has_reagent(CR.result)) + return FALSE // Distilling success + + while(temp_test > 1) + + // Check beaker to see if we reached our goal! if(fake_beaker.reagents.has_reagent(CR.result)) return FALSE // INSTANT SUCCESS! @@ -313,3 +339,40 @@ else pass("All grindable sheet or ore entries had valid lists and reagents.") return TRUE + + + +// Used to test distillations without hacking the other machinery's code up +/obj/distilling_tester + icon = 'icons/obj/weapons.dmi' + icon_state = "cartridge" + var/datum/gas_mixture/GM = new() + var/current_temp = 0 + +/obj/distilling_tester/Initialize(mapload) + create_reagents(5000,/datum/reagents/distilling) + . = ..() + +/obj/distilling_tester/return_air() + return GM + +/obj/distilling_tester/proc/test_distilling(var/decl/chemical_reaction/distilling/D, var/temp_prog) + qdel_swap(GM,new()) + if(D.require_xgm_gas) + GM.gas[D.require_xgm_gas] = 100 + else + if(D.rejects_xgm_gas == GAS_N2) + GM.gas[GAS_O2] = 100 + else + GM.gas[GAS_N2] = 100 + if(D.minimum_xgm_pressure) + GM.temperature = (D.minimum_xgm_pressure * CELL_VOLUME) / (GM.gas[D.require_xgm_gas] * R_IDEAL_GAS_EQUATION) + + // Try this 10 times, We need to know if something is blocking at multiple temps. + // If it passes unit test, it might still be awful to make though, gotta find the right gas mix! + current_temp = LERP( D.temp_range[1], D.temp_range[2], temp_prog) + reagents.handle_reactions() + +/obj/distilling_tester/Destroy(force, ...) + qdel_null(GM) + . = ..() diff --git a/icons/obj/chemical.dmi b/icons/obj/chemical.dmi index 1ea17855596..c6d4673aab2 100644 Binary files a/icons/obj/chemical.dmi and b/icons/obj/chemical.dmi differ diff --git a/icons/obj/library.dmi b/icons/obj/library.dmi index 2a6076147aa..4a3d33d3d51 100644 Binary files a/icons/obj/library.dmi and b/icons/obj/library.dmi differ diff --git a/icons/obj/machines/refinery_machines.dmi b/icons/obj/machines/refinery_machines.dmi new file mode 100644 index 00000000000..8382161a54d Binary files /dev/null and b/icons/obj/machines/refinery_machines.dmi differ diff --git a/icons/obj/stock_parts_refinery.dmi b/icons/obj/stock_parts_refinery.dmi new file mode 100644 index 00000000000..500a25afcb2 Binary files /dev/null and b/icons/obj/stock_parts_refinery.dmi differ diff --git a/icons/obj/vehicles_vr.dmi b/icons/obj/vehicles_vr.dmi index f0e99b2ccb6..bca90cfb522 100644 Binary files a/icons/obj/vehicles_vr.dmi and b/icons/obj/vehicles_vr.dmi differ diff --git a/maps/expedition_vr/aerostat/_aerostat.dm b/maps/expedition_vr/aerostat/_aerostat.dm index 2173d9ae9b8..cf52918005e 100644 --- a/maps/expedition_vr/aerostat/_aerostat.dm +++ b/maps/expedition_vr/aerostat/_aerostat.dm @@ -43,13 +43,13 @@ T.resources[ORE_MHYDROGEN] = 0 T.resources[ORE_VERDANTIUM] = 0 T.resources[ORE_LEAD] = 0 - //T.resources[ORE_COPPER] = rand(RESOURCE_MID_MIN, RESOURCE_HIGH_MAX) - //T.resources[ORE_TIN] = rand(RESOURCE_LOW_MIN, RESOURCE_MID_MAX) - //T.resources[ORE_BAUXITE] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) + T.resources[ORE_COPPER] = rand(RESOURCE_MID_MIN, RESOURCE_HIGH_MAX) + T.resources[ORE_TIN] = rand(RESOURCE_LOW_MIN, RESOURCE_MID_MAX) + T.resources[ORE_BAUXITE] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) T.resources[ORE_RUTILE] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) - //T.resources[ORE_VOPAL] = 0 - //T.resources[ORE_QUARTZ] = 0 - //T.resources[ORE_PAINITE] = 0 + T.resources[ORE_VOPAL] = 0 + T.resources[ORE_QUARTZ] = 0 + T.resources[ORE_PAINITE] = 0 else if(current_cell < deep_val) // Rare metals. T.resources[ORE_GOLD] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) T.resources[ORE_SILVER] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) @@ -62,13 +62,13 @@ T.resources[ORE_DIAMOND] = 0 T.resources[ORE_HEMATITE] = 0 T.resources[ORE_MARBLE] = 0 - //T.resources[ORE_COPPER] = 0 - //T.resources[ORE_TIN] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) - //T.resources[ORE_BAUXITE] = 0 + T.resources[ORE_COPPER] = 0 + T.resources[ORE_TIN] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) + T.resources[ORE_BAUXITE] = 0 T.resources[ORE_RUTILE] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) - //T.resources[ORE_VOPAL] = 0 - //T.resources[ORE_QUARTZ] = 0 - //T.resources[ORE_PAINITE] = 0 + T.resources[ORE_VOPAL] = 0 + T.resources[ORE_QUARTZ] = 0 + T.resources[ORE_PAINITE] = 0 else // Deep metals. T.resources[ORE_URANIUM] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) T.resources[ORE_DIAMOND] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) @@ -81,13 +81,13 @@ T.resources[ORE_HEMATITE] = 0 T.resources[ORE_GOLD] = 0 T.resources[ORE_SILVER] = 0 - //T.resources[ORE_COPPER] = 0 - //T.resources[ORE_TIN] = 0 - //T.resources[ORE_BAUXITE] = 0 + T.resources[ORE_COPPER] = 0 + T.resources[ORE_TIN] = 0 + T.resources[ORE_BAUXITE] = 0 T.resources[ORE_RUTILE] = rand(RESOURCE_HIGH_MIN, RESOURCE_HIGH_MAX) - //T.resources[ORE_VOPAL] = 0 - //T.resources[ORE_QUARTZ] = 0 - //T.resources[ORE_PAINITE] = 0 + T.resources[ORE_VOPAL] = 0 + T.resources[ORE_QUARTZ] = 0 + T.resources[ORE_PAINITE] = 0 return // -- Turfs -- // diff --git a/maps/expedition_vr/aerostat/_aerostat_science_outpost.dm b/maps/expedition_vr/aerostat/_aerostat_science_outpost.dm index 9fe158bb9d9..e256fb32045 100644 --- a/maps/expedition_vr/aerostat/_aerostat_science_outpost.dm +++ b/maps/expedition_vr/aerostat/_aerostat_science_outpost.dm @@ -60,7 +60,12 @@ ORE_SILVER = 8, ORE_PHORON = 18, ORE_LEAD = 2, - ORE_VERDANTIUM = 1)) + ORE_VERDANTIUM = 1, + ORE_TIN = 3, + ORE_COPPER = 2, + ORE_BAUXITE = 9, + ORE_QUARTZ = 5, + ORE_PAINITE = 1)) else mineral_name = pickweight(list( ORE_MARBLE = 2, @@ -71,7 +76,10 @@ ORE_GOLD = 3, ORE_SILVER = 3, ORE_PHORON = 25, - ORE_LEAD = 1)) + ORE_LEAD = 1, + ORE_TIN = 12, + ORE_COPPER = 9, + ORE_QUARTZ = 12)) if(mineral_name && (mineral_name in GLOB.ore_data)) mineral = GLOB.ore_data[mineral_name] diff --git a/maps/groundbase/groundbase_mining.dm b/maps/groundbase/groundbase_mining.dm index e78f0ad07cd..d11a65c34ec 100644 --- a/maps/groundbase/groundbase_mining.dm +++ b/maps/groundbase/groundbase_mining.dm @@ -14,7 +14,12 @@ ORE_SILVER = 8, ORE_PHORON = 18, ORE_LEAD = 2, - ORE_VERDANTIUM = 1)) + ORE_VERDANTIUM = 1, + ORE_TIN = 3, + ORE_COPPER = 2, + ORE_BAUXITE = 9, + ORE_QUARTZ = 5, + ORE_PAINITE = 1)) else mineral_name = pickweight(list( ORE_MARBLE = 2, @@ -25,7 +30,9 @@ ORE_GOLD = 3, ORE_SILVER = 3, ORE_PHORON = 25, - ORE_LEAD = 1)) + ORE_LEAD = 1, + ORE_TIN = 12, + ORE_COPPER = 9)) if(mineral_name && (mineral_name in GLOB.ore_data)) mineral = GLOB.ore_data[mineral_name] diff --git a/maps/om_adventure/grasscave.dm b/maps/om_adventure/grasscave.dm index 5a50f5d4e7a..7e5d1ac352f 100644 --- a/maps/om_adventure/grasscave.dm +++ b/maps/om_adventure/grasscave.dm @@ -74,7 +74,13 @@ ORE_SILVER = 8, ORE_PHORON = 18, ORE_LEAD = 5, - ORE_VERDANTIUM = 5)) + ORE_VERDANTIUM = 5, + ORE_TIN = 3, + ORE_COPPER = 2, + ORE_BAUXITE = 9, + ORE_QUARTZ = 5, + ORE_PAINITE = 1 + )) else mineral_name = pickweight(list( ORE_MARBLE = 2, @@ -85,7 +91,10 @@ ORE_GOLD = 3, ORE_SILVER = 3, ORE_PHORON = 25, - ORE_LEAD = 1)) + ORE_LEAD = 1, + ORE_TIN = 12, + ORE_COPPER = 9, + ORE_QUARTZ = 12)) if(mineral_name && (mineral_name in GLOB.ore_data)) mineral = GLOB.ore_data[mineral_name] diff --git a/maps/stellar_delight/stellar_delight_turfs.dm b/maps/stellar_delight/stellar_delight_turfs.dm index 6cc9c7f882f..754d11d6e00 100644 --- a/maps/stellar_delight/stellar_delight_turfs.dm +++ b/maps/stellar_delight/stellar_delight_turfs.dm @@ -14,7 +14,11 @@ ORE_SILVER = 15, ORE_LEAD = 5, ORE_VERDANTIUM = 2, - ORE_RUTILE = 10)) + ORE_TIN = 3, + ORE_COPPER = 2, + ORE_BAUXITE = 9, + ORE_QUARTZ = 5, + ORE_PAINITE = 1)) else mineral_name = pickweight(list( ORE_MARBLE = 5, @@ -27,7 +31,11 @@ ORE_SILVER = 7, ORE_LEAD = 4, ORE_VERDANTIUM = 1, - ORE_RUTILE = 10)) + ORE_RUTILE = 10, + ORE_LEAD = 1, + ORE_TIN = 12, + ORE_COPPER = 9, + ORE_QUARTZ = 12)) if(mineral_name && (mineral_name in GLOB.ore_data)) mineral = GLOB.ore_data[mineral_name] UpdateMineral() diff --git a/maps/submaps/space_rocks/space_rocks.dm b/maps/submaps/space_rocks/space_rocks.dm index 5fb5f9c641d..c0beb295c30 100644 --- a/maps/submaps/space_rocks/space_rocks.dm +++ b/maps/submaps/space_rocks/space_rocks.dm @@ -16,7 +16,12 @@ ORE_SILVER = 8, ORE_PHORON = 18, ORE_LEAD = 2, - ORE_VERDANTIUM = 1)) + ORE_VERDANTIUM = 1, + ORE_TIN = 3, + ORE_COPPER = 2, + ORE_BAUXITE = 9, + ORE_QUARTZ = 5, + ORE_PAINITE = 1)) else mineral_name = pickweight(list( ORE_MARBLE = 2, @@ -27,7 +32,10 @@ ORE_GOLD = 3, ORE_SILVER = 3, ORE_PHORON = 25, - ORE_LEAD = 1)) + ORE_LEAD = 1, + ORE_TIN = 12, + ORE_COPPER = 9, + ORE_QUARTZ = 12)) if(mineral_name && (mineral_name in GLOB.ore_data)) mineral = GLOB.ore_data[mineral_name] diff --git a/maps/tether/submaps/underdark_pois/underdark_things.dm b/maps/tether/submaps/underdark_pois/underdark_things.dm index 012c1827622..54c4903b8a6 100644 --- a/maps/tether/submaps/underdark_pois/underdark_things.dm +++ b/maps/tether/submaps/underdark_pois/underdark_things.dm @@ -92,6 +92,17 @@ VIRGO3B_TURF_CREATE(/turf/simulated/mineral/floor/ignore_oregen) VIRGO3B_TURF_CREATE(/turf/simulated/mineral/ignore_cavegen) VIRGO3B_TURF_CREATE(/turf/simulated/mineral/floor/ignore_cavegen) +//GasCracks, despite the pathnames these give them atmos that let you place them anywhere on 3B +VIRGO3B_TURF_CREATE(/turf/simulated/floor/gas_crack) +VIRGO3B_TURF_CREATE(/turf/simulated/floor/gas_crack/oxygen) +VIRGO3B_TURF_CREATE(/turf/simulated/floor/gas_crack/nitrogen) +VIRGO3B_TURF_CREATE(/turf/simulated/floor/gas_crack/carbon) +VIRGO3B_TURF_CREATE(/turf/simulated/floor/gas_crack/nitro) +VIRGO3B_TURF_CREATE(/turf/simulated/floor/gas_crack/phoron) +VIRGO3B_TURF_CREATE(/turf/simulated/floor/gas_crack/air) +VIRGO3B_TURF_CREATE(/turf/simulated/floor/gas_crack/terrible) +VIRGO3B_TURF_CREATE(/turf/simulated/floor/gas_crack/random) + //Vault2 VIRGO3B_TURF_CREATE(/turf/simulated/floor/tiled/freezer) diff --git a/maps/tether/tether_turfs.dm b/maps/tether/tether_turfs.dm index be7d5b7dc4b..d839e9ca833 100644 --- a/maps/tether/tether_turfs.dm +++ b/maps/tether/tether_turfs.dm @@ -49,7 +49,11 @@ ORE_SILVER = 8, ORE_PHORON = 18, ORE_LEAD = 2, - ORE_VERDANTIUM = 1)) + ORE_TIN = 3, + ORE_COPPER = 2, + ORE_BAUXITE = 9, + ORE_QUARTZ = 5, + ORE_PAINITE = 1)) else mineral_name = pickweight(list( ORE_MARBLE = 2, @@ -60,7 +64,9 @@ ORE_GOLD = 3, ORE_SILVER = 3, ORE_PHORON = 25, - ORE_LEAD = 1)) + ORE_LEAD = 1, + ORE_TIN = 12, + ORE_COPPER = 9)) if(mineral_name && (mineral_name in GLOB.ore_data)) mineral = GLOB.ore_data[mineral_name] UpdateMineral() diff --git a/vorestation.dme b/vorestation.dme index d4ec4cbf436..85008fc5d54 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -135,6 +135,7 @@ #include "code\__defines\qdel.dm" #include "code\__defines\radio.dm" #include "code\__defines\recipe.dm" +#include "code\__defines\refinery.dm" #include "code\__defines\request_console.dm" #include "code\__defines\research.dm" #include "code\__defines\robot.dm" @@ -255,6 +256,7 @@ #include "code\_helpers\mobs.dm" #include "code\_helpers\nameof.dm" #include "code\_helpers\names.dm" +#include "code\_helpers\refinery.dm" #include "code\_helpers\sanitize_values.dm" #include "code\_helpers\screen_objs.dm" #include "code\_helpers\shell.dm" @@ -1899,6 +1901,7 @@ #include "code\game\turfs\flooring\flooring_decals_vr.dm" #include "code\game\turfs\flooring\flooring_premade.dm" #include "code\game\turfs\flooring\flooring_vr.dm" +#include "code\game\turfs\flooring\gas_cracks.dm" #include "code\game\turfs\flooring\seasonal.dm" #include "code\game\turfs\flooring\shuttle_vr.dm" #include "code\game\turfs\initialization\init.dm" @@ -4107,6 +4110,7 @@ #include "code\modules\reagents\machinery\dispenser\supply.dm" #include "code\modules\reagents\reactions\_reactions.dm" #include "code\modules\reagents\reactions\distilling\distilling.dm" +#include "code\modules\reagents\reactions\distilling\gas_condensing.dm" #include "code\modules\reagents\reactions\fusion\fusion.dm" #include "code\modules\reagents\reactions\instant\drinks.dm" #include "code\modules\reagents\reactions\instant\drinks_vr.dm" @@ -4155,6 +4159,19 @@ #include "code\modules\recycling\disposal_vr.dm" #include "code\modules\recycling\recycling.dm" #include "code\modules\recycling\sortingmachinery.dm" +#include "code\modules\refinery\core\industrial_reagent_filter.dm" +#include "code\modules\refinery\core\industrial_reagent_furnace.dm" +#include "code\modules\refinery\core\industrial_reagent_grinder.dm" +#include "code\modules\refinery\core\industrial_reagent_hub.dm" +#include "code\modules\refinery\core\industrial_reagent_machines.dm" +#include "code\modules\refinery\core\industrial_reagent_pipe.dm" +#include "code\modules\refinery\core\industrial_reagent_pump.dm" +#include "code\modules\refinery\core\industrial_reagent_reactor.dm" +#include "code\modules\refinery\core\industrial_reagent_vat.dm" +#include "code\modules\refinery\core\industrial_reagent_waste.dm" +#include "code\modules\refinery\equipment\chemcontainer.dm" +#include "code\modules\refinery\equipment\pumprelay.dm" +#include "code\modules\refinery\equipment\smart_centrifuge.dm" #include "code\modules\research\message_server.dm" #include "code\modules\research\part_replacer.dm" #include "code\modules\research\tg\designs.dm" @@ -4189,6 +4206,7 @@ #include "code\modules\research\tg\designs\boards\kitchen.dm" #include "code\modules\research\tg\designs\boards\medical.dm" #include "code\modules\research\tg\designs\boards\misc.dm" +#include "code\modules\research\tg\designs\boards\refinery.dm" #include "code\modules\research\tg\designs\boards\science.dm" #include "code\modules\research\tg\designs\boards\telecomms.dm" #include "code\modules\research\tg\experisci\handheld_scanner.dm"