diff --git a/code/__defines/research/techweb_nodes.dm b/code/__defines/research/techweb_nodes.dm index 7b4be28fb4..333fa50229 100644 --- a/code/__defines/research/techweb_nodes.dm +++ b/code/__defines/research/techweb_nodes.dm @@ -42,6 +42,7 @@ #define TECHWEB_NODE_ELECTRIC_WEAPONS "electric_weapons" #define TECHWEB_NODE_ENERGY_MANIPULATION "energy_manipulation" #define TECHWEB_NODE_CHEM_REFINERY "chem_refinery" +#define TECHWEB_NODE_CHEM_ISOLATION "chem_isolation" #define TECHWEB_NODE_EXODRONE "exodrone" #define TECHWEB_NODE_EXOTIC_AMMO "exotic_ammo" #define TECHWEB_NODE_EXP_TOOLS "exp_tools" diff --git a/code/game/objects/items/weapons/circuitboards/frame.dm b/code/game/objects/items/weapons/circuitboards/frame.dm index fd09021baa..5968bb3b27 100644 --- a/code/game/objects/items/weapons/circuitboards/frame.dm +++ b/code/game/objects/items/weapons/circuitboards/frame.dm @@ -292,19 +292,6 @@ /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") diff --git a/code/game/objects/items/weapons/circuitboards/machinery/reagents.dm b/code/game/objects/items/weapons/circuitboards/machinery/reagents.dm new file mode 100644 index 0000000000..91be14db56 --- /dev/null +++ b/code/game/objects/items/weapons/circuitboards/machinery/reagents.dm @@ -0,0 +1,24 @@ +#ifndef T_BOARD +#error T_BOARD macro is not defined but we need it! +#endif + +// Chem analyzer pro +/obj/item/circuitboard/chemical_analyzer + name = T_BOARD("chem analyzer PRO") + build_path = /obj/machinery/chemical_analyzer + board_type = new /datum/frame/frame_types/machine + origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINEERING = 1) + req_components = list(/obj/item/stock_parts/scanning_module = 1, /obj/item/stock_parts/matter_bin = 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) diff --git a/code/modules/materials/materials/metals/steel.dm b/code/modules/materials/materials/metals/steel.dm index 359c0a04cd..fb2e7f1225 100644 --- a/code/modules/materials/materials/metals/steel.dm +++ b/code/modules/materials/materials/metals/steel.dm @@ -152,6 +152,7 @@ new /datum/stack_recipe("big floor lamp fixture frame", /obj/machinery/light_construct/bigfloorlamp, 3, recycle_material = "[name]"), new /datum/stack_recipe("apc frame", /obj/item/frame/apc, 2, recycle_material = "[name]"), new /datum/stack_recipe("desk bell", /obj/item/deskbell, 1, on_floor = 1, supplied_material = "[name]"), + new /datum/stack_recipe("bunsen burner", /obj/machinery/bunsen_burner, 1, time = 25, on_floor = 1, supplied_material = "[name]"), new /datum/stack_recipe("tanning rack", /obj/structure/tanning_rack, 3, one_per_turf = TRUE, time = 20, on_floor = TRUE, supplied_material = "[name]"), new /datum/stack_recipe("steel hull sheet", /obj/item/stack/material/steel/hull, 2, 1, 5, time = 20, one_per_turf = 0, on_floor = 1, recycle_material = "[name]") ) diff --git a/code/modules/reagents/holder/distilling.dm b/code/modules/reagents/holder/distilling.dm index ba593e1b6a..4bb44134e8 100644 --- a/code/modules/reagents/holder/distilling.dm +++ b/code/modules/reagents/holder/distilling.dm @@ -21,3 +21,4 @@ for(var/decl/chemical_reaction/C as anything in effect_reactions) C.post_reaction(src) update_total() + return TRUE diff --git a/code/modules/reagents/holder/holder.dm b/code/modules/reagents/holder/holder.dm index cc6cffc741..7777b10a69 100644 --- a/code/modules/reagents/holder/holder.dm +++ b/code/modules/reagents/holder/holder.dm @@ -105,6 +105,7 @@ SEND_SIGNAL(src, COMSIG_UNITTEST_DATA, list(C)) #endif update_total() + return TRUE /* Holder-to-chemical */ diff --git a/code/modules/reagents/machinery/bunsen_burner.dm b/code/modules/reagents/machinery/bunsen_burner.dm new file mode 100644 index 0000000000..2063288b05 --- /dev/null +++ b/code/modules/reagents/machinery/bunsen_burner.dm @@ -0,0 +1,161 @@ +/obj/machinery/bunsen_burner + name = "bunsen burner" + desc = "A small, self-heating device designed for bringing chemical mixtures to a boil." + description_info = "Place a beaker into it to begin heating. Reagents will be distilled over time as the mixture heats up. The bunsen burner is only capable of heating reagents up to 600c, and the atmoshere around it will affect what reactions are possible." + icon = 'icons/obj/device.dmi' + icon_state = "bunsen0" + var/current_temp = T0C + var/heating = FALSE + var/obj/item/reagent_containers/held_container + +/obj/machinery/bunsen_burner/Initialize(mapload) + . = ..() + create_reagents(1, /datum/reagents/distilling) // resizes based on the boiling container + +/obj/machinery/bunsen_burner/attackby(obj/item/W, mob/user) + add_fingerprint(user) + // Anchoring and disassembly + if(default_unfasten_wrench(user, W)) + if(!anchored) // no longer anchored + drop_held_container() + if(heating) + end_boil() + return + if(default_deconstruction_screwdriver(user, W)) + return + if(W.has_tool_quality(TOOL_CROWBAR) && panel_open && isturf(loc)) + if(do_after(user, 5 * W.toolspeed)) + // Breaking it down + drop_held_container() + to_chat(user, span_notice("You dissasemble \the [src]")) + new /obj/item/stack/material/steel(get_turf(src), 1) + qdel(src) + return + // Handle container + if(!istype(W, /obj/item/reagent_containers)) + to_chat(user, span_notice("You can't put \the [W] onto \the [src].")) + return + if(!anchored) + to_chat(user, span_notice("\The [src] must be secured down with a wrench.")) + return + if(held_container) + to_chat(user, span_notice("You must remove \the [held_container] before you can place another container on \the [src].")) + return + // A new hand touches the beacon + user.drop_item(src) + held_container = W + held_container.forceMove(src) + reagents.maximum_volume = held_container.reagents.maximum_volume // Update internal reagent distilling volume + to_chat(user, span_notice("You put \the [held_container] onto \the [src].")) + if(held_container.reagents.total_volume > 0) + start_boiling() + else + update_icon() + +/obj/machinery/bunsen_burner/attack_hand(mob/user) + if(..()) + return + add_fingerprint(user) + if(!held_container) + to_chat(user, span_notice("There is nothing on \the [src].")) + return + + // Take it off + to_chat(user, span_notice("You remove \the [held_container] from \the [src].")) + held_container.forceMove(get_turf(src)) + held_container.attack_hand(user) // Pick it up + held_container = null + + // Removed beaker, so kill processing + if(heating) + end_boil() + return + update_icon() + +/obj/machinery/bunsen_burner/proc/start_boiling() + if(!held_container) + return + if(heating) + return + + // Begin boiling + visible_message(span_notice("\The [src] starts to heat \the [held_container].")) + heating = TRUE + update_icon() + + // Reset gas on start + current_temp = T0C + var/datum/gas_mixture/GM = return_air() + if(GM) + current_temp = GM.temperature + +/obj/machinery/bunsen_burner/proc/drop_held_container() + if(!held_container) + return + held_container.forceMove(get_turf(src)) + held_container = null + +/obj/machinery/bunsen_burner/process() + if(!heating) + return + + if(held_container && !anchored) + drop_held_container() + end_boil() + return + + if(!LAZYLEN(held_container?.reagents?.reagent_list)) + end_boil() + return + + // Increase temp + var/previous_temp = current_temp + current_temp += 15 + + // Slosh and toss. We use an internal distilling container, react it in there, then pass it back. + held_container.reagents.trans_to_obj(src, held_container.reagents.total_volume) + if(reagents.handle_reactions()) + held_container.update_icon() + update_icon() + reagents.trans_to_obj(held_container, reagents.total_volume) + + // every 25 degree step, do a message to show we are working + if(FLOOR(previous_temp / 40, 1) != FLOOR(current_temp / 40, 1)) + // Open flame + var/turf/location = get_turf(src) + if(isturf(location)) + location.hotspot_expose(1000, 500, 1) + // Messages and temp limit + if(current_temp < T0C + 50) + visible_message(span_notice("\The [src] sloshes.")) + else if(current_temp < T0C + 100) + visible_message(span_notice("\The [src] hisses.")) + else if(current_temp < T0C + 200) + visible_message(span_notice("\The [src] boils.")) + else if(current_temp < T0C + 400) + visible_message(span_notice("\The [src] bubbles aggressively.")) + else if(current_temp < T0C + 600) + visible_message(span_notice("\The [src] rumbles intensely.")) + else + // finished boiling + end_boil() + +/obj/machinery/bunsen_burner/proc/end_boil() + heating = FALSE + visible_message(span_notice("\The [src] clicks.")) + update_icon() + +/obj/machinery/bunsen_burner/update_icon() + cut_overlays() + icon_state = "bunsen0" + if(held_container) + var/image/I = image("icon"=held_container) + add_overlay(I) + if(heating) + var/image/I = image(icon, icon_state = "bunsen1", layer = layer+0.1) + add_overlay(I) + +/obj/machinery/bunsen_burner/examine(mob/user, infix, suffix) + . = ..() + if(heating) + . += span_notice("It's current temperature is [current_temp - T0C]c") diff --git a/code/modules/reagents/machinery/chemalyzer.dm b/code/modules/reagents/machinery/chemalyzer.dm index 20b00ab1ff..8f6d1519f7 100644 --- a/code/modules/reagents/machinery/chemalyzer.dm +++ b/code/modules/reagents/machinery/chemalyzer.dm @@ -13,9 +13,14 @@ use_power = TRUE idle_power_usage = 20 clicksound = "button" + circuit = /obj/item/circuitboard/chemical_analyzer var/analyzing = FALSE var/list/found_reagents = list() +/obj/machinery/chemical_analyzer/Initialize(mapload) + . = ..() + default_apply_parts() + /obj/machinery/chemical_analyzer/update_icon() icon_state = "chem_analyzer[analyzing ? "-working":""]" diff --git a/code/modules/reagents/reactions/distilling/distilling.dm b/code/modules/reagents/reactions/distilling/distilling.dm index 1f2dbaa18b..d0a41a3ae7 100644 --- a/code/modules/reagents/reactions/distilling/distilling.dm +++ b/code/modules/reagents/reactions/distilling/distilling.dm @@ -328,10 +328,7 @@ id = "distill_reduce_tablesalt" result = REAGENT_ID_SODIUM required_reagents = list(REAGENT_ID_SODIUMCHLORIDE = 1) - result_amount = 1 + result_amount = 0.5 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/instant/instant.dm b/code/modules/reagents/reactions/instant/instant.dm index 1f9361d283..2b61ebd3ce 100644 --- a/code/modules/reagents/reactions/instant/instant.dm +++ b/code/modules/reagents/reactions/instant/instant.dm @@ -240,7 +240,7 @@ result = REAGENT_ID_DEXALIN required_reagents = list(REAGENT_ID_OXYGEN = 2, REAGENT_ID_PHORON = 0.1) catalysts = list(REAGENT_ID_PHORON = 1) - inhibitors = list(REAGENT_ID_WATER = 1) // Messes with cryox + inhibitors = list(REAGENT_ID_WATER = 1, REAGENT_ID_TIN = 1) // Messes with cryox, and oxygen distilling result_amount = 1 /decl/chemical_reaction/instant/dermaline diff --git a/code/modules/research/tg/designs/boards/medical.dm b/code/modules/research/tg/designs/boards/medical.dm index 1abf47556d..9f67427780 100644 --- a/code/modules/research/tg/designs/boards/medical.dm +++ b/code/modules/research/tg/designs/boards/medical.dm @@ -89,7 +89,7 @@ ) departmental_flags = DEPARTMENT_BITFLAG_MEDICAL | DEPARTMENT_BITFLAG_SCIENCE -/datum/design_techweb/board/rtg +/datum/design_techweb/board/vitals_monitor name = "vitals monitor circuit" id = "vitals" // req_tech = list(TECH_DATA = 3, TECH_BIO = 4, TECH_ENGINEERING = 2) @@ -98,3 +98,23 @@ RND_CATEGORY_MACHINE + RND_SUBCATEGORY_MACHINE_MEDICAL ) departmental_flags = DEPARTMENT_BITFLAG_MEDICAL | DEPARTMENT_BITFLAG_SCIENCE + +/datum/design_techweb/board/smart_centrifuge + name = "smart centrifuge circuit" + 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_MEDICAL + ) + departmental_flags = DEPARTMENT_BITFLAG_MEDICAL | DEPARTMENT_BITFLAG_ENGINEERING + +/datum/design_techweb/board/chem_analyzer + name = "chem analyzer PRO circuit" + id = "chem_analyzer" + // req_tech = list(TECH_MATERIAL = 1, TECH_ENGINEERING = 1) + build_path = /obj/item/circuitboard/chemical_analyzer + category = list( + RND_CATEGORY_MACHINE + RND_SUBCATEGORY_MACHINE_MEDICAL + ) + departmental_flags = DEPARTMENT_BITFLAG_MEDICAL | DEPARTMENT_BITFLAG_ENGINEERING diff --git a/code/modules/research/tg/designs/boards/refinery.dm b/code/modules/research/tg/designs/boards/refinery.dm index 4d3d4568eb..d41b6e7b59 100644 --- a/code/modules/research/tg/designs/boards/refinery.dm +++ b/code/modules/research/tg/designs/boards/refinery.dm @@ -98,16 +98,6 @@ ) 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" diff --git a/code/modules/research/tg/techwebs/nodes/engi_nodes.dm b/code/modules/research/tg/techwebs/nodes/engi_nodes.dm index 9545b77199..ed480a30df 100644 --- a/code/modules/research/tg/techwebs/nodes/engi_nodes.dm +++ b/code/modules/research/tg/techwebs/nodes/engi_nodes.dm @@ -330,7 +330,6 @@ "industrial_reagent_vat", "industrial_reagent_mixer", "industrial_reagent_waste_processor", - "smart_centrifuge", "pump_relay", "fluid_pump" ) diff --git a/code/modules/research/tg/techwebs/nodes/medbay_nodes.dm b/code/modules/research/tg/techwebs/nodes/medbay_nodes.dm index 1627f15edb..5ca0eccdf0 100644 --- a/code/modules/research/tg/techwebs/nodes/medbay_nodes.dm +++ b/code/modules/research/tg/techwebs/nodes/medbay_nodes.dm @@ -65,6 +65,18 @@ research_costs = list(TECHWEB_POINT_TYPE_GENERIC = TECHWEB_TIER_1_POINTS) announce_channels = list(CHANNEL_MEDICAL) +/datum/techweb_node/chemical_isolation + id = TECHWEB_NODE_CHEM_ISOLATION + display_name = "Chemical Identification" + description = "Scanning and identifying chemicals and their uses." + prereq_ids = list(TECHWEB_NODE_CHEM_SYNTHESIS) + design_ids = list( + "chem_analyzer", + "smart_centrifuge", + ) + research_costs = list(TECHWEB_POINT_TYPE_GENERIC = TECHWEB_TIER_2_POINTS) + announce_channels = list(CHANNEL_ENGINEERING,CHANNEL_MEDICAL) + /datum/techweb_node/medbay_equip_adv id = TECHWEB_NODE_MEDBAY_EQUIP_ADV display_name = "Advanced Medbay Equipment" diff --git a/icons/obj/device.dmi b/icons/obj/device.dmi index 3d4e02b561..9855dbcdc2 100644 Binary files a/icons/obj/device.dmi and b/icons/obj/device.dmi differ diff --git a/vorestation.dme b/vorestation.dme index a20aa82d8d..026afd7742 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -1646,6 +1646,7 @@ #include "code\game\objects\items\weapons\circuitboards\machinery\pandemic.dm" #include "code\game\objects\items\weapons\circuitboards\machinery\papershredder.dm" #include "code\game\objects\items\weapons\circuitboards\machinery\power.dm" +#include "code\game\objects\items\weapons\circuitboards\machinery\reagents.dm" #include "code\game\objects\items\weapons\circuitboards\machinery\recharge_station.dm" #include "code\game\objects\items\weapons\circuitboards\machinery\recycling.dm" #include "code\game\objects\items\weapons\circuitboards\machinery\research.dm" @@ -4143,6 +4144,7 @@ #include "code\modules\reagents\holder\holder.dm" #include "code\modules\reagents\holder\vorebelly.dm" #include "code\modules\reagents\machinery\alembic.dm" +#include "code\modules\reagents\machinery\bunsen_burner.dm" #include "code\modules\reagents\machinery\chem_master.dm" #include "code\modules\reagents\machinery\chemalyzer.dm" #include "code\modules\reagents\machinery\distillery.dm"