diff --git a/_maps/RandomRuins/SpaceRuins/oldstation.dmm b/_maps/RandomRuins/SpaceRuins/oldstation.dmm
index 9385abeda0..64664486dc 100644
--- a/_maps/RandomRuins/SpaceRuins/oldstation.dmm
+++ b/_maps/RandomRuins/SpaceRuins/oldstation.dmm
@@ -1840,12 +1840,12 @@
/turf/open/floor/plasteel/floorgrime,
/area/ruin/space/has_grav/ancientstation/deltacorridor)
"fu" = (
-/obj/machinery/rnd/protolathe,
+/obj/machinery/rnd/production/protolathe,
/obj/effect/decal/cleanable/dirt,
/turf/open/floor/plasteel/white,
/area/ruin/space/has_grav/ancientstation/rnd)
"fv" = (
-/obj/machinery/rnd/circuit_imprinter,
+/obj/machinery/rnd/production/circuit_imprinter,
/obj/effect/decal/cleanable/dirt,
/obj/item/reagent_containers/dropper,
/turf/open/floor/plasteel/white,
diff --git a/_maps/RandomZLevels/undergroundoutpost45.dmm b/_maps/RandomZLevels/undergroundoutpost45.dmm
index 15abcf4474..fb23a2c0b1 100644
--- a/_maps/RandomZLevels/undergroundoutpost45.dmm
+++ b/_maps/RandomZLevels/undergroundoutpost45.dmm
@@ -3397,7 +3397,7 @@
},
/area/awaymission/undergroundoutpost45/research)
"hD" = (
-/obj/machinery/rnd/protolathe,
+/obj/machinery/rnd/production/protolathe,
/obj/effect/turf_decal/stripes/line{
dir = 1
},
@@ -3670,7 +3670,7 @@
},
/area/awaymission/undergroundoutpost45/research)
"ii" = (
-/obj/machinery/rnd/circuit_imprinter,
+/obj/machinery/rnd/production/circuit_imprinter,
/turf/open/floor/plasteel{
heat_capacity = 1e+006
},
diff --git a/_maps/map_files/BoxStation/BoxStation.dmm b/_maps/map_files/BoxStation/BoxStation.dmm
index ecdbbb1ab3..a23b4ac9d4 100644
--- a/_maps/map_files/BoxStation/BoxStation.dmm
+++ b/_maps/map_files/BoxStation/BoxStation.dmm
@@ -22985,7 +22985,7 @@
/obj/machinery/light{
dir = 1
},
-/obj/machinery/rnd/circuit_imprinter,
+/obj/machinery/rnd/production/circuit_imprinter,
/turf/open/floor/plasteel/white,
/area/science/robotics/lab)
"bhy" = (
@@ -24779,7 +24779,7 @@
/obj/effect/turf_decal/stripes/line{
dir = 1
},
-/obj/machinery/rnd/protolathe/department/science,
+/obj/machinery/rnd/production/protolathe/department/science,
/turf/open/floor/plasteel,
/area/science/lab)
"blK" = (
@@ -25418,7 +25418,7 @@
/area/science/lab)
"bno" = (
/obj/item/reagent_containers/glass/beaker/sulphuric,
-/obj/machinery/rnd/circuit_imprinter/department/science,
+/obj/machinery/rnd/production/circuit_imprinter/department/science,
/turf/open/floor/plasteel,
/area/science/lab)
"bnp" = (
@@ -34427,8 +34427,8 @@
/turf/open/floor/plasteel/white,
/area/medical/sleeper)
"bIm" = (
-/obj/machinery/rnd/protolathe/department/medical,
/obj/machinery/light,
+/obj/machinery/rnd/production/techfab/department/medical,
/turf/open/floor/plasteel/white,
/area/medical/sleeper)
"bIn" = (
@@ -46159,7 +46159,7 @@
/area/engine/engineering)
"clS" = (
/obj/machinery/atmospherics/pipe/manifold/supply/hidden,
-/obj/machinery/rnd/protolathe/department/security,
+/obj/machinery/rnd/production/techfab/department/security,
/turf/open/floor/plasteel/red/side,
/area/security/main)
"clT" = (
@@ -47474,7 +47474,7 @@
c_tag = "Engineering Storage";
dir = 4
},
-/obj/machinery/rnd/protolathe/department/engineering,
+/obj/machinery/rnd/production/protolathe/department/engineering,
/turf/open/floor/plasteel,
/area/engine/engineering)
"cpW" = (
@@ -47630,7 +47630,7 @@
/obj/machinery/light{
dir = 8
},
-/obj/machinery/rnd/circuit_imprinter,
+/obj/machinery/rnd/production/circuit_imprinter,
/turf/open/floor/plasteel,
/area/engine/engineering)
"cqx" = (
@@ -53016,11 +53016,11 @@
/turf/open/floor/plasteel,
/area/science/circuit)
"jlm" = (
-/obj/machinery/rnd/protolathe/department/cargo,
+/obj/machinery/rnd/production/techfab/department/cargo,
/turf/open/floor/plasteel,
/area/quartermaster/office)
"jrE" = (
-/obj/machinery/rnd/protolathe/department/science,
+/obj/machinery/rnd/production/protolathe/department/science,
/obj/structure/sign/poster/official/random{
pixel_x = 32
},
@@ -54387,7 +54387,7 @@
/turf/open/floor/plating,
/area/maintenance/bar)
"vCb" = (
-/obj/machinery/rnd/protolathe/department/service,
+/obj/machinery/rnd/production/techfab/department/service,
/turf/open/floor/plasteel/hydrofloor,
/area/hallway/secondary/service)
"vCt" = (
diff --git a/_maps/map_files/Deltastation/DeltaStation2.dmm b/_maps/map_files/Deltastation/DeltaStation2.dmm
index 03e0d20c02..3bd62d448b 100644
--- a/_maps/map_files/Deltastation/DeltaStation2.dmm
+++ b/_maps/map_files/Deltastation/DeltaStation2.dmm
@@ -26463,7 +26463,7 @@
icon_state = "1-8"
},
/obj/effect/turf_decal/stripes/box,
-/obj/machinery/rnd/protolathe/department/security,
+/obj/machinery/rnd/production/techfab/department/security,
/turf/open/floor/plasteel/red/side{
dir = 1
},
@@ -61356,7 +61356,7 @@
/turf/open/floor/plating,
/area/engine/engineering)
"cAL" = (
-/obj/machinery/rnd/protolathe/department/engineering,
+/obj/machinery/rnd/production/protolathe/department/engineering,
/obj/effect/turf_decal/stripes/line{
dir = 9
},
@@ -69317,8 +69317,8 @@
/obj/machinery/light{
dir = 8
},
-/obj/machinery/rnd/protolathe/department/medical,
/obj/effect/turf_decal/stripes/box,
+/obj/machinery/rnd/production/techfab/department/medical,
/turf/open/floor/plasteel/neutral/side{
dir = 4
},
@@ -74893,7 +74893,7 @@
/obj/effect/turf_decal/stripes/line{
dir = 5
},
-/obj/machinery/rnd/protolathe/department/science,
+/obj/machinery/rnd/production/protolathe/department/science,
/turf/open/floor/plasteel,
/area/science/lab)
"dcL" = (
@@ -75547,7 +75547,7 @@
/obj/effect/turf_decal/stripes/line{
dir = 6
},
-/obj/machinery/rnd/circuit_imprinter/department/science,
+/obj/machinery/rnd/production/circuit_imprinter/department/science,
/turf/open/floor/plasteel,
/area/science/lab)
"dek" = (
@@ -77855,7 +77855,7 @@
/area/science/circuit)
"djq" = (
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
-/obj/machinery/rnd/protolathe/department/science,
+/obj/machinery/rnd/production/protolathe/department/science,
/obj/machinery/light{
dir = 1
},
@@ -88799,7 +88799,7 @@
/turf/open/floor/plasteel,
/area/science/robotics/lab)
"dGe" = (
-/obj/machinery/rnd/circuit_imprinter,
+/obj/machinery/rnd/production/circuit_imprinter,
/obj/item/reagent_containers/glass/beaker/sulphuric,
/obj/machinery/airalarm{
dir = 8;
@@ -100650,7 +100650,7 @@
/turf/open/floor/plasteel/caution,
/area/engine/engineering)
"ehw" = (
-/obj/machinery/rnd/circuit_imprinter,
+/obj/machinery/rnd/production/circuit_imprinter,
/obj/effect/turf_decal/stripes/line{
dir = 4
},
@@ -100671,8 +100671,8 @@
name = "Station Intercom";
pixel_x = -26
},
-/obj/machinery/rnd/protolathe/department/service,
/obj/effect/turf_decal/stripes/box,
+/obj/machinery/rnd/production/techfab/department/service,
/turf/open/floor/plasteel/neutral/corner{
dir = 1
},
@@ -100702,7 +100702,7 @@
/area/hallway/secondary/service)
"ehJ" = (
/obj/effect/turf_decal/stripes/box,
-/obj/machinery/rnd/protolathe/department/cargo,
+/obj/machinery/rnd/production/techfab/department/cargo,
/turf/open/floor/plasteel/brown,
/area/quartermaster/office)
"ehK" = (
diff --git a/_maps/map_files/MetaStation/MetaStation.dmm b/_maps/map_files/MetaStation/MetaStation.dmm
index e3643bc930..867f45a834 100644
--- a/_maps/map_files/MetaStation/MetaStation.dmm
+++ b/_maps/map_files/MetaStation/MetaStation.dmm
@@ -9091,7 +9091,7 @@
/turf/open/floor/plasteel/red/side,
/area/security/main)
"asL" = (
-/obj/machinery/rnd/protolathe/department/security,
+/obj/machinery/rnd/production/techfab/department/security,
/turf/open/floor/plasteel/red/side{
dir = 6
},
@@ -13366,7 +13366,7 @@
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
dir = 9
},
-/obj/machinery/rnd/circuit_imprinter,
+/obj/machinery/rnd/production/circuit_imprinter,
/obj/effect/turf_decal/delivery,
/turf/open/floor/plasteel,
/area/engine/engineering)
@@ -13375,7 +13375,7 @@
/obj/structure/cable/yellow{
icon_state = "1-8"
},
-/obj/machinery/rnd/protolathe/department/engineering,
+/obj/machinery/rnd/production/protolathe/department/engineering,
/obj/effect/turf_decal/delivery,
/turf/open/floor/plasteel,
/area/engine/engineering)
@@ -21708,7 +21708,7 @@
/obj/effect/turf_decal/stripes/line{
dir = 4
},
-/obj/machinery/rnd/protolathe/department/cargo,
+/obj/machinery/rnd/production/techfab/department/cargo,
/turf/open/floor/plasteel,
/area/quartermaster/storage)
"aUj" = (
@@ -51130,7 +51130,7 @@
},
/area/medical/storage)
"cdv" = (
-/obj/machinery/rnd/protolathe/department/medical,
+/obj/machinery/rnd/production/techfab/department/medical,
/turf/open/floor/plasteel/whiteblue/side{
dir = 5
},
@@ -53613,7 +53613,7 @@
/obj/effect/turf_decal/stripes/line{
dir = 1
},
-/obj/machinery/rnd/protolathe/department/science,
+/obj/machinery/rnd/production/protolathe/department/science,
/turf/open/floor/plasteel,
/area/science/lab)
"ciE" = (
@@ -54249,7 +54249,7 @@
"cjZ" = (
/obj/item/reagent_containers/glass/beaker/sulphuric,
/obj/effect/turf_decal/stripes/line,
-/obj/machinery/rnd/circuit_imprinter/department/science,
+/obj/machinery/rnd/production/circuit_imprinter/department/science,
/turf/open/floor/plasteel,
/area/science/lab)
"cka" = (
@@ -56384,7 +56384,7 @@
/obj/structure/disposalpipe/segment{
dir = 4
},
-/obj/machinery/rnd/protolathe/department/service,
+/obj/machinery/rnd/production/techfab/department/service,
/turf/open/floor/plasteel,
/area/hallway/secondary/service)
"cox" = (
@@ -65712,7 +65712,7 @@
/obj/machinery/light{
dir = 8
},
-/obj/machinery/rnd/circuit_imprinter,
+/obj/machinery/rnd/production/circuit_imprinter,
/obj/effect/turf_decal/bot,
/turf/open/floor/plasteel,
/area/science/robotics/lab)
@@ -77251,7 +77251,7 @@
/obj/machinery/atmospherics/pipe/simple/supply/hidden{
dir = 4
},
-/obj/machinery/rnd/protolathe/department/science,
+/obj/machinery/rnd/production/protolathe/department/science,
/turf/open/floor/plasteel/white,
/area/science/circuit)
"uYk" = (
diff --git a/_maps/map_files/OmegaStation/OmegaStation.dmm b/_maps/map_files/OmegaStation/OmegaStation.dmm
index 218bad8167..89be043c5d 100644
--- a/_maps/map_files/OmegaStation/OmegaStation.dmm
+++ b/_maps/map_files/OmegaStation/OmegaStation.dmm
@@ -4464,7 +4464,7 @@
/turf/open/floor/plating,
/area/security/brig)
"aiV" = (
-/obj/machinery/rnd/protolathe/department/security,
+/obj/machinery/rnd/production/techfab/department/security,
/turf/open/floor/plasteel/red/side{
dir = 8
},
@@ -6004,7 +6004,7 @@
/obj/structure/cable/white{
icon_state = "0-8"
},
-/obj/machinery/rnd/protolathe/department/cargo,
+/obj/machinery/rnd/production/techfab/department/cargo,
/turf/open/floor/plasteel/brown{
dir = 4
},
@@ -8288,8 +8288,8 @@
"apX" = (
/obj/machinery/atmospherics/pipe/manifold/supply/hidden,
/obj/effect/turf_decal/delivery,
-/obj/machinery/rnd/protolathe/department/service,
/obj/effect/turf_decal/stripes/box,
+/obj/machinery/rnd/production/techfab/department/service,
/turf/open/floor/plasteel,
/area/crew_quarters/bar/atrium)
"apY" = (
@@ -18864,7 +18864,7 @@
/obj/structure/cable/white{
icon_state = "1-4"
},
-/obj/machinery/rnd/circuit_imprinter,
+/obj/machinery/rnd/production/circuit_imprinter,
/obj/effect/turf_decal/bot,
/turf/open/floor/plasteel/yellow/side{
dir = 4
@@ -19261,7 +19261,7 @@
network = list("engine");
pixel_y = -32
},
-/obj/machinery/rnd/protolathe/department/engineering,
+/obj/machinery/rnd/production/protolathe/department/engineering,
/obj/effect/turf_decal/stripes/box,
/turf/open/floor/plasteel,
/area/engine/engineering)
@@ -22628,7 +22628,7 @@
/obj/effect/turf_decal/stripes/line{
dir = 5
},
-/obj/machinery/rnd/protolathe/department/science,
+/obj/machinery/rnd/production/protolathe/department/science,
/turf/open/floor/plasteel/vault/side{
dir = 4
},
@@ -23035,7 +23035,7 @@
/obj/effect/turf_decal/stripes/line{
dir = 6
},
-/obj/machinery/rnd/circuit_imprinter/department/science,
+/obj/machinery/rnd/production/circuit_imprinter/department/science,
/turf/open/floor/plasteel/vault/side{
dir = 4
},
@@ -25492,8 +25492,8 @@
dir = 5
},
/obj/effect/turf_decal/bot,
-/obj/machinery/rnd/protolathe/department/medical,
/obj/effect/turf_decal/stripes/box,
+/obj/machinery/rnd/production/techfab/department/medical,
/turf/open/floor/plasteel,
/area/medical/medbay/zone3)
"bav" = (
diff --git a/_maps/map_files/PubbyStation/PubbyStation.dmm b/_maps/map_files/PubbyStation/PubbyStation.dmm
index bdaca03db1..38973ea85e 100644
--- a/_maps/map_files/PubbyStation/PubbyStation.dmm
+++ b/_maps/map_files/PubbyStation/PubbyStation.dmm
@@ -25990,7 +25990,7 @@
/turf/open/floor/plasteel,
/area/science/research/lobby)
"bnO" = (
-/obj/machinery/rnd/circuit_imprinter,
+/obj/machinery/rnd/production/circuit_imprinter,
/obj/machinery/light{
dir = 8
},
@@ -28903,7 +28903,7 @@
/area/science/lab)
"bur" = (
/obj/effect/turf_decal/delivery,
-/obj/machinery/rnd/protolathe/department/science,
+/obj/machinery/rnd/production/protolathe/department/science,
/turf/open/floor/plasteel,
/area/science/lab)
"bus" = (
@@ -29426,7 +29426,7 @@
"bvy" = (
/obj/item/reagent_containers/glass/beaker/sulphuric,
/obj/effect/turf_decal/delivery,
-/obj/machinery/rnd/circuit_imprinter/department/science,
+/obj/machinery/rnd/production/circuit_imprinter/department/science,
/turf/open/floor/plasteel,
/area/science/lab)
"bvz" = (
@@ -33628,7 +33628,7 @@
/obj/structure/extinguisher_cabinet{
pixel_x = -26
},
-/obj/machinery/rnd/protolathe/department/medical,
+/obj/machinery/rnd/production/techfab/department/medical,
/turf/open/floor/plasteel/whiteblue/side{
dir = 1
},
@@ -50014,7 +50014,7 @@
/turf/open/floor/plasteel,
/area/quartermaster/storage)
"cCD" = (
-/obj/machinery/rnd/protolathe/department/service,
+/obj/machinery/rnd/production/techfab/department/service,
/turf/open/floor/plating,
/area/crew_quarters/kitchen)
"cCF" = (
@@ -50063,19 +50063,19 @@
/turf/open/floor/plating/airless,
/area/maintenance/department/chapel/monastery)
"cCS" = (
-/obj/machinery/rnd/protolathe/department/security,
+/obj/machinery/rnd/production/techfab/department/security,
/turf/open/floor/plasteel/dark,
/area/security/main)
"cCT" = (
-/obj/machinery/rnd/protolathe/department/cargo,
+/obj/machinery/rnd/production/techfab/department/cargo,
/turf/open/floor/plasteel,
/area/quartermaster/storage)
"cCU" = (
-/obj/machinery/rnd/circuit_imprinter,
+/obj/machinery/rnd/production/circuit_imprinter,
/turf/open/floor/plasteel,
/area/engine/engineering)
"cCV" = (
-/obj/machinery/rnd/protolathe/department/engineering,
+/obj/machinery/rnd/production/protolathe/department/engineering,
/turf/open/floor/plasteel,
/area/engine/engineering)
"cCW" = (
diff --git a/_maps/map_files/debug/runtimestation.dmm b/_maps/map_files/debug/runtimestation.dmm
index 3c5da1dcf9..f57bfbbb54 100644
--- a/_maps/map_files/debug/runtimestation.dmm
+++ b/_maps/map_files/debug/runtimestation.dmm
@@ -1514,7 +1514,7 @@
/turf/open/floor/plating,
/area/hallway/primary/central)
"NZ" = (
-/obj/machinery/rnd/protolathe,
+/obj/machinery/rnd/production/protolathe,
/turf/open/floor/plasteel,
/area/science)
"Qt" = (
diff --git a/code/__DEFINES/research.dm b/code/__DEFINES/research.dm
index b7aac16f76..cc66e54208 100644
--- a/code/__DEFINES/research.dm
+++ b/code/__DEFINES/research.dm
@@ -43,15 +43,11 @@
#define RDSCREEN_UI_SNODE_CHECK if(!selected_node) { return RDSCREEN_TEXT_NO_SNODE }
#define RDSCREEN_UI_SDESIGN_CHECK if(!selected_design) { return RDSCREEN_TEXT_NO_SDESIGN }
-#define DEPLATHE_SCREEN_PRIMARY 1
-#define DEPLATHE_SCREEN_SEARCH 2
-#define DEPLATHE_SCREEN_MATERIALS 3
-#define DEPLATHE_SCREEN_CHEMICALS 4
-
-#define DEPPRINTER_SCREEN_PRIMARY 1
-#define DEPPRINTER_SCREEN_SEARCH 2
-#define DEPPRINTER_SCREEN_MATERIALS 3
-#define DEPPRINTER_SCREEN_CHEMICALS 4
+#define RESEARCH_FABRICATOR_SCREEN_MAIN 1
+#define RESEARCH_FABRICATOR_SCREEN_CHEMICALS 2
+#define RESEARCH_FABRICATOR_SCREEN_MATERIALS 3
+#define RESEARCH_FABRICATOR_SCREEN_SEARCH 4
+#define RESEARCH_FABRICATOR_SCREEN_CATEGORYVIEW 5
#define DEPARTMENTAL_FLAG_SECURITY 1
#define DEPARTMENTAL_FLAG_MEDICAL 2
diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm
index 0274c09fd6..ff90d9f834 100644
--- a/code/game/machinery/autolathe.dm
+++ b/code/game/machinery/autolathe.dm
@@ -131,7 +131,7 @@
flick("autolathe_o",src)//plays metal insertion animation
if (MAT_GLASS)
flick("autolathe_r",src)//plays glass insertion animation
- use_power(max(1000, (MINERAL_MATERIAL_AMOUNT * amount_inserted / 100)))
+ use_power(min(1000, amount_inserted / 100))
updateUsrDialog()
/obj/machinery/autolathe/Topic(href, href_list)
diff --git a/code/game/objects/items/circuitboards/machine_circuitboards.dm b/code/game/objects/items/circuitboards/machine_circuitboards.dm
index 95aaa85b70..a26301693f 100644
--- a/code/game/objects/items/circuitboards/machine_circuitboards.dm
+++ b/code/game/objects/items/circuitboards/machine_circuitboards.dm
@@ -665,7 +665,7 @@
/obj/item/circuitboard/machine/circuit_imprinter
name = "Circuit Imprinter (Machine Board)"
- build_path = /obj/machinery/rnd/circuit_imprinter
+ build_path = /obj/machinery/rnd/production/circuit_imprinter
req_components = list(
/obj/item/stock_parts/matter_bin = 1,
/obj/item/stock_parts/manipulator = 1,
@@ -673,11 +673,11 @@
/obj/item/circuitboard/machine/circuit_imprinter/department
name = "Departmental Circuit Imprinter (Machine Board)"
- build_path = /obj/machinery/rnd/circuit_imprinter/department
+ build_path = /obj/machinery/rnd/production/circuit_imprinter/department
/obj/item/circuitboard/machine/circuit_imprinter/department/science
name = "Departmental Circuit Imprinter - Science (Machine Board)"
- build_path = /obj/machinery/rnd/circuit_imprinter/department/science
+ build_path = /obj/machinery/rnd/production/circuit_imprinter/department/science
/obj/item/circuitboard/machine/destructive_analyzer
name = "Destructive Analyzer (Machine Board)"
@@ -697,7 +697,7 @@
/obj/item/circuitboard/machine/protolathe
name = "Protolathe (Machine Board)"
- build_path = /obj/machinery/rnd/protolathe
+ build_path = /obj/machinery/rnd/production/protolathe
req_components = list(
/obj/item/stock_parts/matter_bin = 2,
/obj/item/stock_parts/manipulator = 2,
@@ -705,31 +705,67 @@
/obj/item/circuitboard/machine/protolathe/department
name = "Departmental Protolathe (Machine Board)"
- build_path = /obj/machinery/rnd/protolathe/department
+ build_path = /obj/machinery/rnd/production/protolathe/department
/obj/item/circuitboard/machine/protolathe/department/cargo
name = "Departmental Protolathe (Machine Board) - Cargo"
- build_path = /obj/machinery/rnd/protolathe/department/cargo
+ build_path = /obj/machinery/rnd/production/protolathe/department/cargo
/obj/item/circuitboard/machine/protolathe/department/engineering
name = "Departmental Protolathe (Machine Board) - Engineering"
- build_path = /obj/machinery/rnd/protolathe/department/engineering
+ build_path = /obj/machinery/rnd/production/protolathe/department/engineering
/obj/item/circuitboard/machine/protolathe/department/medical
name = "Departmental Protolathe (Machine Board) - Medical"
- build_path = /obj/machinery/rnd/protolathe/department/medical
+ build_path = /obj/machinery/rnd/production/protolathe/department/medical
/obj/item/circuitboard/machine/protolathe/department/science
name = "Departmental Protolathe (Machine Board) - Science"
- build_path = /obj/machinery/rnd/protolathe/department/science
+ build_path = /obj/machinery/rnd/production/protolathe/department/science
/obj/item/circuitboard/machine/protolathe/department/security
name = "Departmental Protolathe (Machine Board) - Security"
- build_path = /obj/machinery/rnd/protolathe/department/security
+ build_path = /obj/machinery/rnd/production/protolathe/department/security
/obj/item/circuitboard/machine/protolathe/department/service
name = "Departmental Protolathe - Service (Machine Board)"
- build_path = /obj/machinery/rnd/protolathe/department/service
+ build_path = /obj/machinery/rnd/production/protolathe/department/service
+
+/obj/item/circuitboard/machine/techfab
+ name = "\improper Techfab (Machine Board)"
+ build_path = /obj/machinery/rnd/production/techfab
+ req_components = list(
+ /obj/item/stock_parts/matter_bin = 2,
+ /obj/item/stock_parts/manipulator = 2,
+ /obj/item/reagent_containers/glass/beaker = 2)
+
+/obj/item/circuitboard/machine/techfab/department
+ name = "\improper Departmental Techfab (Machine Board)"
+ build_path = /obj/machinery/rnd/production/techfab/department
+
+/obj/item/circuitboard/machine/techfab/department/cargo
+ name = "\improper Departmental Techfab (Machine Board) - Cargo"
+ build_path = /obj/machinery/rnd/production/techfab/department/cargo
+
+/obj/item/circuitboard/machine/techfab/department/engineering
+ name = "\improper Departmental Techfab (Machine Board) - Engineering"
+ build_path = /obj/machinery/rnd/production/techfab/department/engineering
+
+/obj/item/circuitboard/machine/techfab/department/medical
+ name = "\improper Departmental Techfab (Machine Board) - Medical"
+ build_path = /obj/machinery/rnd/production/techfab/department/medical
+
+/obj/item/circuitboard/machine/techfab/department/science
+ name = "\improper Departmental Techfab (Machine Board) - Science"
+ build_path = /obj/machinery/rnd/production/techfab/department/science
+
+/obj/item/circuitboard/machine/techfab/department/security
+ name = "\improper Departmental Techfab (Machine Board) - Security"
+ build_path = /obj/machinery/rnd/production/techfab/department/security
+
+/obj/item/circuitboard/machine/techfab/department/service
+ name = "\improper Departmental Techfab - Service (Machine Board)"
+ build_path = /obj/machinery/rnd/production/techfab/department/service
/obj/item/circuitboard/machine/rdserver
name = "R&D Server (Machine Board)"
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm b/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm
index eff0db0af5..4bddb0f7a7 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm
@@ -18,4 +18,4 @@
new /obj/item/clothing/head/soft(src)
new /obj/item/device/export_scanner(src)
new /obj/item/door_remote/quartermaster(src)
- new /obj/item/circuitboard/machine/protolathe/department/cargo(src)
+ new /obj/item/circuitboard/machine/techfab/department/cargo(src)
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm
index 55c2160833..8f7da91465 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm
@@ -27,7 +27,7 @@
new /obj/item/door_remote/chief_engineer(src)
new /obj/item/pipe_dispenser(src)
new /obj/item/inducer(src)
- new /obj/item/circuitboard/machine/protolathe/department/engineering(src)
+ new /obj/item/circuitboard/machine/techfab/department/engineering(src)
/obj/structure/closet/secure_closet/engineering_electrical
name = "electrical supplies locker"
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/medical.dm b/code/game/objects/structures/crates_lockers/closets/secure/medical.dm
index d01d4ccaab..105aef4e9c 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/medical.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/medical.dm
@@ -75,7 +75,7 @@
new /obj/item/clothing/neck/petcollar(src)
new /obj/item/pet_carrier(src)
new /obj/item/wallframe/defib_mount(src)
- new /obj/item/circuitboard/machine/protolathe/department/medical(src)
+ new /obj/item/circuitboard/machine/techfab/department/medical(src)
/obj/structure/closet/secure_closet/animal
name = "animal control"
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/scientist.dm b/code/game/objects/structures/crates_lockers/closets/secure/scientist.dm
index 158e4d348d..a88fe3d450 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/scientist.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/scientist.dm
@@ -25,4 +25,4 @@
new /obj/item/device/laser_pointer(src)
new /obj/item/door_remote/research_director(src)
new /obj/item/storage/box/firingpins(src)
- new /obj/item/circuitboard/machine/protolathe/department/science(src)
+ new /obj/item/circuitboard/machine/techfab/department/science(src)
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm
index 2caa050309..660526d3d3 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm
@@ -57,7 +57,7 @@
new /obj/item/clothing/neck/petcollar(src)
new /obj/item/pet_carrier(src)
new /obj/item/door_remote/civillian(src)
- new /obj/item/circuitboard/machine/protolathe/department/service(src)
+ new /obj/item/circuitboard/machine/techfab/department/service(src)
/obj/structure/closet/secure_closet/hos
name = "\proper head of security's locker"
@@ -89,7 +89,7 @@
new /obj/item/gun/energy/e_gun/hos(src)
new /obj/item/device/flashlight/seclite(src)
new /obj/item/pinpointer/nuke(src)
- new /obj/item/circuitboard/machine/protolathe/department/security(src)
+ new /obj/item/circuitboard/machine/techfab/department/security(src)
/obj/structure/closet/secure_closet/warden
name = "\proper warden's locker"
diff --git a/code/modules/research/circuitprinter.dm b/code/modules/research/circuitprinter.dm
deleted file mode 100644
index a35c261120..0000000000
--- a/code/modules/research/circuitprinter.dm
+++ /dev/null
@@ -1,125 +0,0 @@
-/*///////////////Circuit Imprinter (By Darem)////////////////////////
- Used to print new circuit boards (for computers and similar systems) and AI modules. Each circuit board pattern are stored in
-a /datum/desgin on the linked R&D console. You can then print them out in a fasion similar to a regular lathe. However, instead of
-using metal and glass, it uses glass and reagents (usually sulfuric acis).
-
-*/
-/obj/machinery/rnd/circuit_imprinter
- name = "circuit imprinter"
- desc = "Manufactures circuit boards for the construction of machines."
- icon_state = "circuit_imprinter"
- container_type = OPENCONTAINER
- circuit = /obj/item/circuitboard/machine/circuit_imprinter
-
- var/efficiency_coeff
-
- var/datum/component/material_container/materials //Store for hyper speed!
-
- var/list/categories = list(
- "AI Modules",
- "Computer Boards",
- "Teleportation Machinery",
- "Medical Machinery",
- "Engineering Machinery",
- "Exosuit Modules",
- "Hydroponics Machinery",
- "Subspace Telecomms",
- "Research Machinery",
- "Misc. Machinery",
- "Computer Parts"
- )
-
-/obj/machinery/rnd/circuit_imprinter/Initialize()
- materials = AddComponent(/datum/component/material_container, list(MAT_GLASS, MAT_GOLD, MAT_DIAMOND, MAT_METAL, MAT_BLUESPACE), 0,
- FALSE, list(/obj/item/stack, /obj/item/stack/ore/bluespace_crystal), CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert))
- materials.precise_insertion = TRUE
- create_reagents(0)
- RefreshParts()
- return ..()
-
-/obj/machinery/rnd/circuit_imprinter/RefreshParts()
- reagents.maximum_volume = 0
- for(var/obj/item/reagent_containers/glass/G in component_parts)
- reagents.maximum_volume += G.volume
- G.reagents.trans_to(src, G.reagents.total_volume)
-
- GET_COMPONENT(materials, /datum/component/material_container)
- materials.max_amount = 0
- for(var/obj/item/stock_parts/matter_bin/M in component_parts)
- materials.max_amount += M.rating * 75000
-
- var/T = 0
- for(var/obj/item/stock_parts/manipulator/M in component_parts)
- T += M.rating
- efficiency_coeff = 2 ** (T - 1) //Only 1 manipulator here, you're making runtimes Razharas
-
-/obj/machinery/rnd/circuit_imprinter/blob_act(obj/structure/blob/B)
- if (prob(50))
- qdel(src)
-
-/obj/machinery/rnd/circuit_imprinter/proc/check_mat(datum/design/being_built, M) // now returns how many times the item can be built with the material
- var/list/all_materials = being_built.reagents_list + being_built.materials
-
- GET_COMPONENT(materials, /datum/component/material_container)
- var/A = materials.amount(M)
- if(!A)
- A = reagents.get_reagent_amount(M)
-
- return round(A / max(1, (all_materials[M]/efficiency_coeff)))
-
-//we eject the materials upon deconstruction.
-/obj/machinery/rnd/circuit_imprinter/on_deconstruction()
- for(var/obj/item/reagent_containers/glass/G in component_parts)
- reagents.trans_to(G, G.reagents.maximum_volume)
- GET_COMPONENT(materials, /datum/component/material_container)
- materials.retrieve_all()
- ..()
-
-
-/obj/machinery/rnd/circuit_imprinter/disconnect_console()
- linked_console.linked_imprinter = null
- ..()
-
-/obj/machinery/rnd/circuit_imprinter/proc/user_try_print_id(id)
- if((!linked_console && requires_console) || !id)
- return FALSE
- var/datum/design/D = (linked_console || requires_console)? linked_console.stored_research.researched_designs[id] : get_techweb_design_by_id(id)
- if(!istype(D))
- return FALSE
-
- var/power = 1000
- for(var/M in D.materials)
- power += round(D.materials[M] / 5)
- power = max(4000, power)
- use_power(power)
-
- var/list/efficient_mats = list()
- for(var/MAT in D.materials)
- efficient_mats[MAT] = D.materials[MAT]/efficiency_coeff
-
- if(!materials.has_materials(efficient_mats))
- say("Not enough materials to complete prototype.")
- return FALSE
- for(var/R in D.reagents_list)
- if(!reagents.has_reagent(R, D.reagents_list[R]/efficiency_coeff))
- say("Not enough reagents to complete prototype.")
- return FALSE
-
- busy = TRUE
- flick("circuit_imprinter_ani", src)
- materials.use_amount(efficient_mats)
- for(var/R in D.reagents_list)
- reagents.remove_reagent(R, D.reagents_list[R]/efficiency_coeff)
-
- var/P = D.build_path
- addtimer(CALLBACK(src, .proc/reset_busy), 16)
- addtimer(CALLBACK(src, .proc/do_print, P, efficient_mats, D.dangerous_construction), 16)
- return TRUE
-
-/obj/machinery/rnd/circuit_imprinter/proc/do_print(path, list/matlist, notify_admins)
- if(notify_admins && usr)
- investigate_log("[key_name(usr)] built [path] at a circuit imprinter.", INVESTIGATE_RESEARCH)
- message_admins("[ADMIN_LOOKUPFLW(usr)] has built [path] at a circuit imprinter.")
- var/obj/item/I = new path(get_turf(src))
- I.materials = matlist.Copy()
- SSblackbox.record_feedback("nested tally", "circuit_printed", 1, list("[type]", "[path]"))
diff --git a/code/modules/research/departmental_circuit_imprinter.dm b/code/modules/research/departmental_circuit_imprinter.dm
deleted file mode 100644
index 01c4a6a22c..0000000000
--- a/code/modules/research/departmental_circuit_imprinter.dm
+++ /dev/null
@@ -1,200 +0,0 @@
-/obj/machinery/rnd/circuit_imprinter/department
- name = "Department Circuit Imprinter"
- desc = "A special circuit imprinter with a built in interface meant for departmental usage, with built in ExoSync recievers allowing it to print designs researched that match its ROM-encoded department type. Features a bluespace materials reciever for recieving materials without the hassle of running to mining!"
- icon_state = "circuit_imprinter"
- container_type = OPENCONTAINER
- circuit = /obj/item/circuitboard/machine/circuit_imprinter/department
- requires_console = FALSE
-
- var/list/datum/design/cached_designs
- var/list/datum/design/matching_designs
- var/department_tag = "Unidentified" //used for material distribution among other things.
- var/datum/techweb/stored_research
- var/datum/techweb/host_research
- var/screen = DEPPRINTER_SCREEN_PRIMARY
-
-/obj/machinery/rnd/circuit_imprinter/department/science
- allowed_department_flags = DEPARTMENTAL_FLAG_ALL|DEPARTMENTAL_FLAG_SCIENCE
- department_tag = "Science"
-
-/obj/machinery/rnd/circuit_imprinter/department/Initialize()
- . = ..()
- stored_research = new
- cached_designs = list()
- host_research = SSresearch.science_tech
- matching_designs = list()
- update_research()
-
-/obj/machinery/rnd/circuit_imprinter/department/Destroy()
- QDEL_NULL(stored_research)
- return ..()
-
-/obj/machinery/rnd/circuit_imprinter/department/user_try_print_id(id, amount)
- var/datum/design/D = get_techweb_design_by_id(id)
- if(!D || !(D.departmental_flags & allowed_department_flags))
- say("Warning: Printing failed. Please update the research data with the on-screen button!")
- return FALSE
- . = ..()
-
-/obj/machinery/rnd/circuit_imprinter/department/attack_hand(mob/user)
- if(..())
- return
- interact(user)
-
-/obj/machinery/rnd/circuit_imprinter/department/interact(mob/user)
- user.set_machine(src)
-
- var/datum/browser/popup = new(user, "rndconsole", name, 460, 550)
- popup.set_content(generate_ui())
- popup.open()
-
-/obj/machinery/rnd/circuit_imprinter/department/proc/search(string)
- matching_designs.Cut()
- for(var/v in stored_research.researched_designs)
- var/datum/design/D = stored_research.researched_designs[v]
- if(!(D.build_type & IMPRINTER) || !(D.departmental_flags & allowed_department_flags))
- continue
- if(findtext(D.name,string))
- matching_designs.Add(D)
-
-/obj/machinery/rnd/circuit_imprinter/department/proc/update_research()
- host_research.copy_research_to(stored_research, TRUE)
- update_designs()
-
-/obj/machinery/rnd/circuit_imprinter/department/proc/update_designs()
- cached_designs.Cut()
- for(var/i in stored_research.researched_designs)
- var/datum/design/d = stored_research.researched_designs[i]
- if((d.departmental_flags & allowed_department_flags) && (d.build_type & IMPRINTER))
- cached_designs |= d
-
-/obj/machinery/rnd/circuit_imprinter/department/proc/generate_ui()
- var/list/ui = list()
- ui += ui_header()
- switch(screen)
- if(DEPPRINTER_SCREEN_MATERIALS)
- ui += ui_materials()
- if(DEPPRINTER_SCREEN_CHEMICALS)
- ui += ui_chemicals()
- if(DEPPRINTER_SCREEN_SEARCH)
- ui += ui_search()
- else
- ui += ui_department_imprinter()
- for(var/i in 1 to length(ui))
- if(!findtextEx(ui[i], RDSCREEN_NOBREAK))
- ui[i] += "
"
- ui[i] = replacetextEx(ui[i], RDSCREEN_NOBREAK, "")
- return ui.Join("")
-
-/obj/machinery/rnd/circuit_imprinter/department/proc/ui_search() //Legacy code
- var/list/l = list()
- l += "
Search Results:
"
- l += "
"
- var/coeff = efficiency_coeff
- for(var/datum/design/D in matching_designs)
- var/temp_materials
- var/check_materials = TRUE
- var/all_materials = D.materials + D.reagents_list
- for(var/M in all_materials)
- temp_materials += " | "
- if (!check_mat(D, M))
- check_materials = FALSE
- temp_materials += " [all_materials[M]/coeff] [CallMaterialName(M)]"
- else
- temp_materials += " [all_materials[M]/coeff] [CallMaterialName(M)]"
- if (check_materials)
- l += "[D.name][temp_materials]"
- else
- l += "[D.name][temp_materials]"
- l += ""
- return l
-
-/obj/machinery/rnd/circuit_imprinter/department/proc/ui_department_imprinter()
- var/list/l = list()
- var/coeff = efficiency_coeff
- l += "
"
- for(var/datum/design/D in cached_designs)
- var/temp_materials
- var/check_materials = TRUE
- var/all_materials = D.materials + D.reagents_list
- for(var/M in all_materials)
- temp_materials += " | "
- if (!check_mat(D, M))
- check_materials = FALSE
- temp_materials += " [all_materials[M]/coeff] [CallMaterialName(M)]"
- else
- temp_materials += " [all_materials[M]/coeff] [CallMaterialName(M)]"
- if (check_materials)
- l += "[D.name][temp_materials]"
- else
- l += "[D.name][temp_materials]"
- l += ""
- return l
-
-/obj/machinery/rnd/circuit_imprinter/department/proc/ui_header()
- var/list/l = list()
- l += "[RDSCREEN_NOBREAK]"
- return l
-
-/obj/machinery/rnd/circuit_imprinter/department/proc/ui_materials()
- var/list/l = list()
- l += "Material Storage:
"
- for(var/mat_id in materials.materials)
- var/datum/material/M = materials.materials[mat_id]
- l += "* [M.amount] of [M.name]: "
- if(M.amount >= MINERAL_MATERIAL_AMOUNT) l += "
Eject [RDSCREEN_NOBREAK]"
- if(M.amount >= MINERAL_MATERIAL_AMOUNT*5) l += "
5x [RDSCREEN_NOBREAK]"
- if(M.amount >= MINERAL_MATERIAL_AMOUNT) l += "
All[RDSCREEN_NOBREAK]"
- l += ""
- l += "
[RDSCREEN_NOBREAK]"
- return l
-
-/obj/machinery/rnd/circuit_imprinter/department/proc/ui_chemicals()
- var/list/l = list()
- l += ""
- return l
-
-/obj/machinery/rnd/circuit_imprinter/department/Topic(raw, ls)
- if(..())
- return
- add_fingerprint(usr)
- usr.set_machine(src)
- if(ls["switch_screen"])
- screen = text2num(ls["switch_screen"])
- if(ls["imprint"]) //Causes the circuit_imprinter to build something.
- if(busy)
- say("Warning: Fabricators busy!")
- else
- user_try_print_id(ls["imprint"])
- if(ls["search"]) //Search for designs with name matching pattern
- search(ls["to_search"])
- screen = DEPPRINTER_SCREEN_SEARCH
- if(ls["sync_research"])
- update_research()
- say("Synchronizing research with host technology database.")
- if(ls["dispose"]) //Causes the protolathe to dispose of a single reagent (all of it)
- reagents.del_reagent(ls["dispose"])
- if(ls["disposeall"]) //Causes the protolathe to dispose of all it's reagents.
- reagents.clear_reagents()
- if(ls["ejectsheet"]) //Causes the protolathe to eject a sheet of material
- materials.retrieve_sheets(text2num(ls["eject_amt"]), ls["ejectsheet"])
diff --git a/code/modules/research/departmental_lathe.dm b/code/modules/research/departmental_lathe.dm
deleted file mode 100644
index ab893e7853..0000000000
--- a/code/modules/research/departmental_lathe.dm
+++ /dev/null
@@ -1,244 +0,0 @@
-/obj/machinery/rnd/protolathe/department
- name = "department protolathe"
- desc = "A special protolathe with a built in interface meant for departmental usage, with built in ExoSync recievers allowing it to print designs researched that match its ROM-encoded department type. Features a bluespace materials reciever for recieving materials without the hassle of running to mining!"
- icon_state = "protolathe"
- container_type = OPENCONTAINER
- circuit = /obj/item/circuitboard/machine/protolathe/department
- requires_console = FALSE
-
- var/list/datum/design/cached_designs
- var/list/datum/design/matching_designs
- var/department_tag = "Unidentified" //used for material distribution among other things.
- var/datum/techweb/stored_research
- var/datum/techweb/host_research
- var/screen = DEPLATHE_SCREEN_PRIMARY
-
-/obj/machinery/rnd/protolathe/department/engineering
- allowed_department_flags = DEPARTMENTAL_FLAG_ALL|DEPARTMENTAL_FLAG_ENGINEERING
- department_tag = "Engineering"
- circuit = /obj/item/circuitboard/machine/protolathe/department/engineering
-
-/obj/machinery/rnd/protolathe/department/service
- allowed_department_flags = DEPARTMENTAL_FLAG_ALL|DEPARTMENTAL_FLAG_SERVICE
- department_tag = "Service"
- circuit = /obj/item/circuitboard/machine/protolathe/department/service
-
-/obj/machinery/rnd/protolathe/department/medical
- allowed_department_flags = DEPARTMENTAL_FLAG_ALL|DEPARTMENTAL_FLAG_MEDICAL
- department_tag = "Medical"
- circuit = /obj/item/circuitboard/machine/protolathe/department/medical
-
-/obj/machinery/rnd/protolathe/department/cargo
- allowed_department_flags = DEPARTMENTAL_FLAG_ALL|DEPARTMENTAL_FLAG_CARGO
- department_tag = "Cargo"
- circuit = /obj/item/circuitboard/machine/protolathe/department/cargo
-
-/obj/machinery/rnd/protolathe/department/science
- allowed_department_flags = DEPARTMENTAL_FLAG_ALL|DEPARTMENTAL_FLAG_SCIENCE
- department_tag = "Science"
- circuit = /obj/item/circuitboard/machine/protolathe/department/science
-
-/obj/machinery/rnd/protolathe/department/security
- allowed_department_flags = DEPARTMENTAL_FLAG_ALL|DEPARTMENTAL_FLAG_SECURITY
- department_tag = "Security"
- circuit = /obj/item/circuitboard/machine/protolathe/department/security
-
-/obj/machinery/rnd/protolathe/department/Initialize()
- . = ..()
- matching_designs = list()
- cached_designs = list()
- stored_research = new
- host_research = SSresearch.science_tech
- update_research()
-
-/obj/machinery/rnd/protolathe/department/Destroy()
- QDEL_NULL(stored_research)
- return ..()
-
-/obj/machinery/rnd/protolathe/department/user_try_print_id(id, amount)
- var/datum/design/D = get_techweb_design_by_id(id)
- if(!D || !(D.departmental_flags & allowed_department_flags))
- say("Warning: Printing failed. Please update the research data with the on-screen button!")
- return FALSE
- . = ..()
-
-/obj/machinery/rnd/protolathe/department/attack_hand(mob/user)
- if(..())
- return
- interact(user)
-
-/obj/machinery/rnd/protolathe/department/interact(mob/user)
- user.set_machine(src)
- var/datum/browser/popup = new(user, "rndconsole", name, 460, 550)
- popup.set_content(generate_ui())
- popup.open()
-
-/obj/machinery/rnd/protolathe/department/proc/search(string)
- matching_designs.Cut()
- for(var/v in stored_research.researched_designs)
- var/datum/design/D = stored_research.researched_designs[v]
- if(!(D.build_type & PROTOLATHE) || !(D.departmental_flags & allowed_department_flags))
- continue
- if(findtext(D.name,string))
- matching_designs.Add(D)
-
-/obj/machinery/rnd/protolathe/department/proc/update_research()
- host_research.copy_research_to(stored_research, TRUE)
- update_designs()
-
-/obj/machinery/rnd/protolathe/department/proc/update_designs()
- cached_designs.Cut()
- for(var/i in stored_research.researched_designs)
- var/datum/design/d = stored_research.researched_designs[i]
- if((d.departmental_flags & allowed_department_flags) && (d.build_type & PROTOLATHE))
- cached_designs |= d
-
-/obj/machinery/rnd/protolathe/department/proc/generate_ui()
- var/list/ui = list()
- ui += ui_header()
- switch(screen)
- if(DEPLATHE_SCREEN_MATERIALS)
- ui += ui_materials()
- if(DEPLATHE_SCREEN_CHEMICALS)
- ui += ui_chemicals()
- if(DEPLATHE_SCREEN_SEARCH)
- ui += ui_search()
- else
- ui += ui_department_lathe()
- for(var/i in 1 to length(ui))
- if(!findtextEx(ui[i], RDSCREEN_NOBREAK))
- ui[i] += "
"
- ui[i] = replacetextEx(ui[i], RDSCREEN_NOBREAK, "")
- return ui.Join("")
-
-/obj/machinery/rnd/protolathe/department/proc/ui_search() //Legacy code
- var/list/l = list()
- var/coeff = efficiency_coeff
- l += "Search Results:
"
- l += "
"
- for(var/datum/design/D in matching_designs)
- var/temp_material
- var/c = 50
- var/t
- var/all_materials = D.materials + D.reagents_list
- for(var/M in all_materials)
- t = check_mat(D, M)
- temp_material += " | "
- if (t < 1)
- temp_material += "[all_materials[M]*coeff] [CallMaterialName(M)]"
- else
- temp_material += " [all_materials[M]*coeff] [CallMaterialName(M)]"
- c = min(c,t)
-
- if (c >= 1)
- l += "[D.name][RDSCREEN_NOBREAK]"
- if(c >= 5)
- l += "x5[RDSCREEN_NOBREAK]"
- if(c >= 10)
- l += "x10[RDSCREEN_NOBREAK]"
- l += "[temp_material][RDSCREEN_NOBREAK]"
- else
- l += "[D.name][temp_material][RDSCREEN_NOBREAK]"
- l += ""
- l += ""
- return l
-
-/obj/machinery/rnd/protolathe/department/proc/ui_department_lathe()
- var/list/l = list()
- var/coeff = efficiency_coeff
- l += "
"
- for(var/datum/design/D in cached_designs)
- var/temp_material
- var/c = 50
- var/t
- var/all_materials = D.materials + D.reagents_list
- for(var/M in all_materials)
- t = check_mat(D, M)
- temp_material += " | "
- if (t < 1)
- temp_material += "[all_materials[M]*coeff] [CallMaterialName(M)]"
- else
- temp_material += " [all_materials[M]*coeff] [CallMaterialName(M)]"
- c = min(c,t)
-
- if (c >= 1)
- l += "[D.name][RDSCREEN_NOBREAK]"
- if(c >= 5)
- l += "x5[RDSCREEN_NOBREAK]"
- if(c >= 10)
- l += "x10[RDSCREEN_NOBREAK]"
- l += "[temp_material][RDSCREEN_NOBREAK]"
- else
- l += "[D.name][temp_material][RDSCREEN_NOBREAK]"
- l += ""
- l += ""
- return l
-
-/obj/machinery/rnd/protolathe/department/proc/ui_header()
- var/list/l = list()
- l += "[RDSCREEN_NOBREAK]"
- return l
-
-/obj/machinery/rnd/protolathe/department/proc/ui_materials()
- var/list/l = list()
- l += "Material Storage:
"
- for(var/mat_id in materials.materials)
- var/datum/material/M = materials.materials[mat_id]
- l += "* [M.amount] of [M.name]: "
- if(M.amount >= MINERAL_MATERIAL_AMOUNT) l += "
Eject [RDSCREEN_NOBREAK]"
- if(M.amount >= MINERAL_MATERIAL_AMOUNT*5) l += "
5x [RDSCREEN_NOBREAK]"
- if(M.amount >= MINERAL_MATERIAL_AMOUNT) l += "
All[RDSCREEN_NOBREAK]"
- l += ""
- l += "
[RDSCREEN_NOBREAK]"
- return l
-
-/obj/machinery/rnd/protolathe/department/proc/ui_chemicals()
- var/list/l = list()
- l += ""
- return l
-
-/obj/machinery/rnd/protolathe/department/Topic(raw, ls)
- if(..())
- return
- add_fingerprint(usr)
- usr.set_machine(src)
- if(ls["switch_screen"])
- screen = text2num(ls["switch_screen"])
- if(ls["build"]) //Causes the Protolathe to build something.
- if(busy)
- say("Warning: Fabricators busy!")
- else
- user_try_print_id(ls["build"], ls["amount"])
- if(ls["search"]) //Search for designs with name matching pattern
- search(ls["to_search"])
- screen = DEPLATHE_SCREEN_SEARCH
- if(ls["sync_research"])
- update_research()
- say("Synchronizing research with host technology database.")
- if(ls["dispose"]) //Causes the protolathe to dispose of a single reagent (all of it)
- reagents.del_reagent(ls["dispose"])
- if(ls["disposeall"]) //Causes the protolathe to dispose of all it's reagents.
- reagents.clear_reagents()
- if(ls["ejectsheet"]) //Causes the protolathe to eject a sheet of material
- materials.retrieve_sheets(text2num(ls["eject_amt"]), ls["ejectsheet"])
- updateUsrDialog()
diff --git a/code/modules/research/machinery/_production.dm b/code/modules/research/machinery/_production.dm
new file mode 100644
index 0000000000..3cef3a0b84
--- /dev/null
+++ b/code/modules/research/machinery/_production.dm
@@ -0,0 +1,328 @@
+/obj/machinery/rnd/production
+ name = "technology fabricator"
+ desc = "Makes researched and prototype items with materials and energy."
+ container_type = OPENCONTAINER
+
+ var/consoleless_interface = FALSE //Whether it can be used without a console.
+ var/efficiency_coeff = 1 //Materials needed / coeff = actual.
+ var/list/categories = list()
+ var/datum/component/material_container/materials //Store for hyper speed!
+ var/allowed_department_flags = ALL
+ var/production_animation //What's flick()'d on print.
+ var/allowed_buildtypes = NONE
+ var/list/datum/design/cached_designs
+ var/list/datum/design/matching_designs
+ var/department_tag = "Unidentified" //used for material distribution among other things.
+ var/datum/techweb/stored_research
+ var/datum/techweb/host_research
+
+ var/screen = RESEARCH_FABRICATOR_SCREEN_MAIN
+ var/selected_category
+
+/obj/machinery/rnd/production/Initialize()
+ . = ..()
+ create_reagents(0)
+ materials = AddComponent(/datum/component/material_container,
+ list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM, MAT_BLUESPACE), 0,
+ FALSE, list(/obj/item/stack), CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert))
+ materials.precise_insertion = TRUE
+ RefreshParts()
+ matching_designs = list()
+ cached_designs = list()
+ stored_research = new
+ host_research = SSresearch.science_tech
+ update_research()
+
+/obj/machinery/rnd/production/proc/update_research()
+ host_research.copy_research_to(stored_research, TRUE)
+ update_designs()
+
+/obj/machinery/rnd/production/proc/update_designs()
+ cached_designs.Cut()
+ for(var/i in stored_research.researched_designs)
+ var/datum/design/d = stored_research.researched_designs[i]
+ if((d.departmental_flags & allowed_department_flags) && (d.build_type & allowed_buildtypes))
+ cached_designs |= d
+
+/obj/machinery/rnd/production/RefreshParts()
+ calculate_efficiency()
+
+/obj/machinery/rnd/production/attack_hand(mob/user)
+ interact(user) //remove this snowflake shit when the refactor of storage components or some other pr that unsnowflakes attack_hand on machinery is in
+
+/obj/machinery/rnd/production/interact(mob/user)
+ if(!consoleless_interface)
+ return ..()
+ user.set_machine(src)
+ var/datum/browser/popup = new(user, "rndconsole", name, 460, 550)
+ popup.set_content(generate_ui())
+ popup.open()
+
+/obj/machinery/rnd/production/Destroy()
+ QDEL_NULL(stored_research)
+ return ..()
+
+/obj/machinery/rnd/production/proc/calculate_efficiency()
+ efficiency_coeff = 1
+ if(reagents) //If reagents/materials aren't initialized, don't bother, we'll be doing this again after reagents init anyways.
+ reagents.maximum_volume = 0
+ for(var/obj/item/reagent_containers/glass/G in component_parts)
+ reagents.maximum_volume += G.volume
+ G.reagents.trans_to(src, G.reagents.total_volume)
+ if(materials)
+ materials.max_amount = 0
+ for(var/obj/item/stock_parts/matter_bin/M in component_parts)
+ materials.max_amount += M.rating * 75000
+
+//we eject the materials upon deconstruction.
+/obj/machinery/rnd/production/on_deconstruction()
+ for(var/obj/item/reagent_containers/glass/G in component_parts)
+ reagents.trans_to(G, G.reagents.maximum_volume)
+ materials.retrieve_all()
+ return ..()
+
+/obj/machinery/rnd/production/proc/do_print(path, amount, list/matlist, notify_admins)
+ if(notify_admins)
+ investigate_log("[key_name(usr)] built [amount] of [path] at [src]([type]).", INVESTIGATE_RESEARCH)
+ message_admins("[ADMIN_LOOKUPFLW(usr)] has built [amount] of [path] at a [src]([type]).")
+ for(var/i in 1 to amount)
+ var/obj/item/I = new path(get_turf(src))
+ if(!istype(I, /obj/item/stack/sheet) && !istype(I, /obj/item/stack/ore/bluespace_crystal))
+ I.materials = matlist.Copy()
+ SSblackbox.record_feedback("nested tally", "item_printed", amount, list("[type]", "[path]"))
+
+/obj/machinery/rnd/production/proc/check_mat(datum/design/being_built, M) // now returns how many times the item can be built with the material
+ var/list/all_materials = being_built.reagents_list + being_built.materials
+
+ var/A = materials.amount(M)
+ if(!A)
+ A = reagents.get_reagent_amount(M)
+
+ return round(A / max(1, (all_materials[M]/efficiency_coeff)))
+
+/obj/machinery/rnd/production/proc/user_try_print_id(id, amount)
+ if((!istype(linked_console) && requires_console) || !id)
+ return FALSE
+ if(istext(amount))
+ amount = text2num(amount)
+ if(isnull(amount))
+ amount = 1
+ var/datum/design/D = (linked_console || requires_console)? linked_console.stored_research.researched_designs[id] : get_techweb_design_by_id(id)
+ if(!istype(D))
+ return FALSE
+ if(!(D.departmental_flags & allowed_department_flags))
+ say("Warning: Printing failed: This fabricator does not have the necessary keys to decrypt design schematics. Please update the research data with the on-screen button and contact Nanotrasen Support!")
+ return FALSE
+ if(D.build_type && !(D.build_type & allowed_buildtypes))
+ say("This machine does not have the necessary manipulation systems for this design. Please contact Nanotrasen Support!")
+ return FALSE
+ var/power = 1000
+ amount = CLAMP(amount, 1, 50)
+ for(var/M in D.materials)
+ power += round(D.materials[M] * amount / 35)
+ power = min(3000, power)
+ use_power(power)
+ var/list/efficient_mats = list()
+ for(var/MAT in D.materials)
+ efficient_mats[MAT] = D.materials[MAT]/efficiency_coeff
+ if(!materials.has_materials(efficient_mats, amount))
+ say("Not enough materials to complete prototype[amount > 1? "s" : ""].")
+ return FALSE
+ for(var/R in D.reagents_list)
+ if(!reagents.has_reagent(R, D.reagents_list[R]*amount/efficiency_coeff))
+ say("Not enough reagents to complete prototype[amount > 1? "s" : ""].")
+ return FALSE
+ materials.use_amount(efficient_mats, amount)
+ for(var/R in D.reagents_list)
+ reagents.remove_reagent(R, D.reagents_list[R]*amount/efficiency_coeff)
+ busy = TRUE
+ if(production_animation)
+ flick(production_animation, src)
+ var/timecoeff = D.lathe_time_factor / efficiency_coeff
+ addtimer(CALLBACK(src, .proc/reset_busy), (30 * timecoeff * amount) ** 0.5)
+ addtimer(CALLBACK(src, .proc/do_print, D.build_path, amount, efficient_mats, D.dangerous_construction), (32 * timecoeff * amount) ** 0.8)
+ return TRUE
+
+/obj/machinery/rnd/production/proc/search(string)
+ matching_designs.Cut()
+ for(var/v in stored_research.researched_designs)
+ var/datum/design/D = stored_research.researched_designs[v]
+ if(!(D.build_type & allowed_buildtypes) || !(D.departmental_flags & allowed_department_flags))
+ continue
+ if(findtext(D.name,string))
+ matching_designs.Add(D)
+
+/obj/machinery/rnd/production/proc/generate_ui()
+ var/list/ui = list()
+ ui += ui_header()
+ switch(screen)
+ if(RESEARCH_FABRICATOR_SCREEN_MATERIALS)
+ ui += ui_screen_materials()
+ if(RESEARCH_FABRICATOR_SCREEN_CHEMICALS)
+ ui += ui_screen_chemicals()
+ if(RESEARCH_FABRICATOR_SCREEN_SEARCH)
+ ui += ui_screen_search()
+ if(RESEARCH_FABRICATOR_SCREEN_CATEGORYVIEW)
+ ui += ui_screen_category_view()
+ else
+ ui += ui_screen_main()
+ for(var/i in 1 to length(ui))
+ if(!findtextEx(ui[i], RDSCREEN_NOBREAK))
+ ui[i] += "
"
+ ui[i] = replacetextEx(ui[i], RDSCREEN_NOBREAK, "")
+ return ui.Join("")
+
+/obj/machinery/rnd/production/proc/ui_header()
+ var/list/l = list()
+ l += "[RDSCREEN_NOBREAK]"
+ return l
+
+/obj/machinery/rnd/production/proc/ui_screen_materials()
+ var/list/l = list()
+ l += "Material Storage:
"
+ for(var/mat_id in materials.materials)
+ var/datum/material/M = materials.materials[mat_id]
+ l += "* [M.amount] of [M.name]: "
+ if(M.amount >= MINERAL_MATERIAL_AMOUNT) l += "
Eject [RDSCREEN_NOBREAK]"
+ if(M.amount >= MINERAL_MATERIAL_AMOUNT*5) l += "
5x [RDSCREEN_NOBREAK]"
+ if(M.amount >= MINERAL_MATERIAL_AMOUNT) l += "
All[RDSCREEN_NOBREAK]"
+ l += ""
+ l += "
[RDSCREEN_NOBREAK]"
+ return l
+
+/obj/machinery/rnd/production/proc/ui_screen_chemicals()
+ var/list/l = list()
+ l += ""
+ return l
+
+/obj/machinery/rnd/production/proc/ui_screen_search()
+ var/list/l = list()
+ var/coeff = efficiency_coeff
+ l += "Search Results:
"
+ l += "
"
+ for(var/datum/design/D in matching_designs)
+ l += design_menu_entry(D, coeff)
+ l += ""
+ return l
+
+/obj/machinery/rnd/production/proc/design_menu_entry(datum/design/D, coeff)
+ if(!istype(D))
+ return
+ if(!coeff)
+ coeff = efficiency_coeff
+ var/list/l = list()
+ var/temp_material
+ var/c = 50
+ var/t
+ var/all_materials = D.materials + D.reagents_list
+ for(var/M in all_materials)
+ t = check_mat(D, M)
+ temp_material += " | "
+ if (t < 1)
+ temp_material += "[all_materials[M]*coeff] [CallMaterialName(M)]"
+ else
+ temp_material += " [all_materials[M]*coeff] [CallMaterialName(M)]"
+ c = min(c,t)
+
+ if (c >= 1)
+ l += "[D.name][RDSCREEN_NOBREAK]"
+ if(c >= 5)
+ l += "x5[RDSCREEN_NOBREAK]"
+ if(c >= 10)
+ l += "x10[RDSCREEN_NOBREAK]"
+ l += "[temp_material][RDSCREEN_NOBREAK]"
+ else
+ l += "[D.name][temp_material][RDSCREEN_NOBREAK]"
+ l += ""
+ return l
+
+/obj/machinery/rnd/production/Topic(raw, ls)
+ if(..())
+ return
+ add_fingerprint(usr)
+ usr.set_machine(src)
+ if(ls["switch_screen"])
+ screen = text2num(ls["switch_screen"])
+ if(ls["build"]) //Causes the Protolathe to build something.
+ if(busy)
+ say("Warning: Fabricators busy!")
+ else
+ user_try_print_id(ls["build"], ls["amount"])
+ if(ls["search"]) //Search for designs with name matching pattern
+ search(ls["to_search"])
+ screen = RESEARCH_FABRICATOR_SCREEN_SEARCH
+ if(ls["sync_research"])
+ update_research()
+ say("Synchronizing research with host technology database.")
+ if(ls["category"])
+ selected_category = ls["category"]
+ if(ls["dispose"]) //Causes the protolathe to dispose of a single reagent (all of it)
+ reagents.del_reagent(ls["dispose"])
+ if(ls["disposeall"]) //Causes the protolathe to dispose of all it's reagents.
+ reagents.clear_reagents()
+ if(ls["ejectsheet"]) //Causes the protolathe to eject a sheet of material
+ materials.retrieve_sheets(text2num(ls["eject_amt"]), ls["ejectsheet"])
+ updateUsrDialog()
+
+/obj/machinery/rnd/production/proc/ui_screen_main()
+ var/list/l = list()
+ l += "
"
+
+ l += list_categories(categories, RESEARCH_FABRICATOR_SCREEN_CATEGORYVIEW)
+
+ return l
+
+/obj/machinery/rnd/production/proc/ui_screen_category_view()
+ if(!selected_category)
+ return ui_screen_main()
+ var/list/l = list()
+ l += "Browsing [selected_category]:
"
+ var/coeff = efficiency_coeff
+ for(var/v in stored_research.researched_designs)
+ var/datum/design/D = stored_research.researched_designs[v]
+ if(!(selected_category in D.category)|| !(D.build_type & allowed_buildtypes))
+ continue
+ if(!(D.departmental_flags & allowed_department_flags))
+ continue
+ l += design_menu_entry(D, coeff)
+ l += ""
+ return l
+
+/obj/machinery/rnd/production/proc/list_categories(list/categories, menu_num)
+ if(!categories)
+ return
+
+ var/line_length = 1
+ var/list/l = ""
+
+ for(var/C in categories)
+ if(line_length > 2)
+ l += "
"
+ line_length = 1
+
+ l += "| [C] | "
+ line_length++
+
+ l += "
"
+ return l
\ No newline at end of file
diff --git a/code/modules/research/machinery/circuit_imprinter.dm b/code/modules/research/machinery/circuit_imprinter.dm
new file mode 100644
index 0000000000..3a56850a2f
--- /dev/null
+++ b/code/modules/research/machinery/circuit_imprinter.dm
@@ -0,0 +1,32 @@
+/obj/machinery/rnd/production/circuit_imprinter
+ name = "circuit imprinter"
+ desc = "Manufactures circuit boards for the construction of machines."
+ icon_state = "circuit_imprinter"
+ container_type = OPENCONTAINER
+ circuit = /obj/item/circuitboard/machine/circuit_imprinter
+ categories = list(
+ "AI Modules",
+ "Computer Boards",
+ "Teleportation Machinery",
+ "Medical Machinery",
+ "Engineering Machinery",
+ "Exosuit Modules",
+ "Hydroponics Machinery",
+ "Subspace Telecomms",
+ "Research Machinery",
+ "Misc. Machinery",
+ "Computer Parts"
+ )
+ production_animation = "circuit_imprinter_ani"
+ allowed_buildtypes = IMPRINTER
+
+/obj/machinery/rnd/production/circuit_imprinter/calculate_efficiency()
+ . = ..()
+ var/T = 0
+ for(var/obj/item/stock_parts/manipulator/M in component_parts)
+ T += M.rating
+ efficiency_coeff = 2 ** (T - 1) //Only 1 manipulator here, you're making runtimes Razharas
+
+/obj/machinery/rnd/production/circuit_imprinter/disconnect_console()
+ linked_console.linked_imprinter = null
+ ..()
\ No newline at end of file
diff --git a/code/modules/research/machinery/departmental_circuit_imprinter.dm b/code/modules/research/machinery/departmental_circuit_imprinter.dm
new file mode 100644
index 0000000000..e1acdd5cc2
--- /dev/null
+++ b/code/modules/research/machinery/departmental_circuit_imprinter.dm
@@ -0,0 +1,13 @@
+/obj/machinery/rnd/production/circuit_imprinter/department
+ name = "Department Circuit Imprinter"
+ desc = "A special circuit imprinter with a built in interface meant for departmental usage, with built in ExoSync recievers allowing it to print designs researched that match its ROM-encoded department type. Features a bluespace materials reciever for recieving materials without the hassle of running to mining!"
+ icon_state = "circuit_imprinter"
+ container_type = OPENCONTAINER
+ circuit = /obj/item/circuitboard/machine/circuit_imprinter/department
+ requires_console = FALSE
+ consoleless_interface = TRUE
+
+/obj/machinery/rnd/production/circuit_imprinter/department/science
+ name = "department protolathe (Science)"
+ allowed_department_flags = DEPARTMENTAL_FLAG_ALL|DEPARTMENTAL_FLAG_SCIENCE
+ department_tag = "Science"
\ No newline at end of file
diff --git a/code/modules/research/machinery/departmental_protolathe.dm b/code/modules/research/machinery/departmental_protolathe.dm
new file mode 100644
index 0000000000..1c315ab815
--- /dev/null
+++ b/code/modules/research/machinery/departmental_protolathe.dm
@@ -0,0 +1,44 @@
+/obj/machinery/rnd/production/protolathe/department
+ name = "department protolathe"
+ desc = "A special protolathe with a built in interface meant for departmental usage, with built in ExoSync recievers allowing it to print designs researched that match its ROM-encoded department type. Features a bluespace materials reciever for recieving materials without the hassle of running to mining!"
+ icon_state = "protolathe"
+ container_type = OPENCONTAINER
+ circuit = /obj/item/circuitboard/machine/protolathe/department
+ requires_console = FALSE
+ consoleless_interface = TRUE
+
+/obj/machinery/rnd/production/protolathe/department/engineering
+ name = "department protolathe (Engineering)"
+ allowed_department_flags = DEPARTMENTAL_FLAG_ALL|DEPARTMENTAL_FLAG_ENGINEERING
+ department_tag = "Engineering"
+ circuit = /obj/item/circuitboard/machine/protolathe/department/engineering
+
+/obj/machinery/rnd/production/protolathe/department/service
+ name = "department protolathe (Service)"
+ allowed_department_flags = DEPARTMENTAL_FLAG_ALL|DEPARTMENTAL_FLAG_SERVICE
+ department_tag = "Service"
+ circuit = /obj/item/circuitboard/machine/protolathe/department/service
+
+/obj/machinery/rnd/production/protolathe/department/medical
+ name = "department protolathe (Medical)"
+ allowed_department_flags = DEPARTMENTAL_FLAG_ALL|DEPARTMENTAL_FLAG_MEDICAL
+ department_tag = "Medical"
+ circuit = /obj/item/circuitboard/machine/protolathe/department/medical
+
+/obj/machinery/rnd/production/protolathe/department/cargo
+ name = "department protolathe (Cargo)"
+ allowed_department_flags = DEPARTMENTAL_FLAG_ALL|DEPARTMENTAL_FLAG_CARGO
+ department_tag = "Cargo"
+ circuit = /obj/item/circuitboard/machine/protolathe/department/cargo
+
+/obj/machinery/rnd/production/protolathe/department/science
+ name = "department protolathe (Science)"
+ allowed_department_flags = DEPARTMENTAL_FLAG_ALL|DEPARTMENTAL_FLAG_SCIENCE
+ department_tag = "Science"
+ circuit = /obj/item/circuitboard/machine/protolathe/department/science
+
+/obj/machinery/rnd/production/protolathe/department/security
+ name = "department protolathe (Security)"
+ allowed_department_flags = DEPARTMENTAL_FLAG_ALL|DEPARTMENTAL_FLAG_SECURITY
+ department_tag = "Security"
+ circuit = /obj/item/circuitboard/machine/protolathe/department/security
\ No newline at end of file
diff --git a/code/modules/research/machinery/departmental_techfab.dm b/code/modules/research/machinery/departmental_techfab.dm
new file mode 100644
index 0000000000..cf0e30596f
--- /dev/null
+++ b/code/modules/research/machinery/departmental_techfab.dm
@@ -0,0 +1,42 @@
+/obj/machinery/rnd/production/techfab/department
+ name = "department techfab"
+ desc = "An advanced fabricator designed to print out the latest prototypes and circuits researched from Science. Contains hardware to sync to research networks. This one is department-locked and only possesses a limited set of decryption keys."
+ icon_state = "protolathe"
+ container_type = OPENCONTAINER
+ circuit = /obj/item/circuitboard/machine/techfab/department
+
+/obj/machinery/rnd/production/techfab/department/engineering
+ name = "department techfab (Engineering)"
+ allowed_department_flags = DEPARTMENTAL_FLAG_ALL|DEPARTMENTAL_FLAG_ENGINEERING
+ department_tag = "Engineering"
+ circuit = /obj/item/circuitboard/machine/techfab/department/engineering
+
+/obj/machinery/rnd/production/techfab/department/service
+ name = "department techfab (Service)"
+ allowed_department_flags = DEPARTMENTAL_FLAG_ALL|DEPARTMENTAL_FLAG_SERVICE
+ department_tag = "Service"
+ circuit = /obj/item/circuitboard/machine/techfab/department/service
+
+/obj/machinery/rnd/production/techfab/department/medical
+ name = "department techfab (Medical)"
+ allowed_department_flags = DEPARTMENTAL_FLAG_ALL|DEPARTMENTAL_FLAG_MEDICAL
+ department_tag = "Medical"
+ circuit = /obj/item/circuitboard/machine/techfab/department/medical
+
+/obj/machinery/rnd/production/techfab/department/cargo
+ name = "department techfab (Cargo)"
+ allowed_department_flags = DEPARTMENTAL_FLAG_ALL|DEPARTMENTAL_FLAG_CARGO
+ department_tag = "Cargo"
+ circuit = /obj/item/circuitboard/machine/techfab/department/cargo
+
+/obj/machinery/rnd/production/techfab/department/science
+ name = "department techfab (Science)"
+ allowed_department_flags = DEPARTMENTAL_FLAG_ALL|DEPARTMENTAL_FLAG_SCIENCE
+ department_tag = "Science"
+ circuit = /obj/item/circuitboard/machine/techfab/department/science
+
+/obj/machinery/rnd/production/techfab/department/security
+ name = "department techfab (Security)"
+ allowed_department_flags = DEPARTMENTAL_FLAG_ALL|DEPARTMENTAL_FLAG_SECURITY
+ department_tag = "Security"
+ circuit = /obj/item/circuitboard/machine/techfab/department/security
\ No newline at end of file
diff --git a/code/modules/research/machinery/protolathe.dm b/code/modules/research/machinery/protolathe.dm
new file mode 100644
index 0000000000..404a982b51
--- /dev/null
+++ b/code/modules/research/machinery/protolathe.dm
@@ -0,0 +1,32 @@
+/obj/machinery/rnd/production/protolathe
+ name = "protolathe"
+ desc = "Converts raw materials into useful objects."
+ icon_state = "protolathe"
+ container_type = OPENCONTAINER
+ circuit = /obj/item/circuitboard/machine/protolathe
+ categories = list(
+ "Power Designs",
+ "Medical Designs",
+ "Bluespace Designs",
+ "Stock Parts",
+ "Equipment",
+ "Mining Designs",
+ "Electronics",
+ "Weapons",
+ "Ammo",
+ "Firing Pins",
+ "Computer Parts"
+ )
+ production_animation = "protolathe_n"
+ allowed_buildtypes = PROTOLATHE
+
+/obj/machinery/rnd/production/protolathe/calculate_efficiency()
+ . = ..()
+ efficiency_coeff = 0
+ for(var/obj/item/stock_parts/manipulator/M in component_parts)
+ efficiency_coeff += M.rating
+ efficiency_coeff = max(1, efficiency_coeff)
+
+/obj/machinery/rnd/production/protolathe/disconnect_console()
+ linked_console.linked_lathe = null
+ ..()
\ No newline at end of file
diff --git a/code/modules/research/machinery/techfab.dm b/code/modules/research/machinery/techfab.dm
new file mode 100644
index 0000000000..40b407ac61
--- /dev/null
+++ b/code/modules/research/machinery/techfab.dm
@@ -0,0 +1,35 @@
+/obj/machinery/rnd/production/techfab
+ name = "technology fabricator"
+ desc = "Produces researched prototypes with raw materials and energy."
+ icon_state = "protolathe"
+ container_type = OPENCONTAINER
+ circuit = /obj/item/circuitboard/machine/techfab
+ categories = list(
+ "Power Designs",
+ "Medical Designs",
+ "Bluespace Designs",
+ "Stock Parts",
+ "Equipment",
+ "Mining Designs",
+ "Electronics",
+ "Weapons",
+ "Ammo",
+ "Firing Pins",
+ "Computer Parts",
+ "AI Modules",
+ "Computer Boards",
+ "Teleportation Machinery",
+ "Medical Machinery",
+ "Engineering Machinery",
+ "Exosuit Modules",
+ "Hydroponics Machinery",
+ "Subspace Telecomms",
+ "Research Machinery",
+ "Misc. Machinery",
+ "Computer Parts"
+ )
+ console_link = FALSE
+ production_animation = "protolathe_n"
+ requires_console = FALSE
+ consoleless_interface = TRUE
+ allowed_buildtypes = PROTOLATHE | IMPRINTER
\ No newline at end of file
diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm
deleted file mode 100644
index 12630cafbe..0000000000
--- a/code/modules/research/protolathe.dm
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
-Protolathe
-
-Similar to an autolathe, you load glass and metal sheets (but not other objects) into it to be used as raw materials for the stuff
-it creates. All the menus and other manipulation commands are in the R&D console.
-
-Note: Must be placed west/left of and R&D console to function.
-
-*/
-/obj/machinery/rnd/protolathe
- name = "protolathe"
- desc = "Converts raw materials into useful objects."
- icon_state = "protolathe"
- container_type = OPENCONTAINER
- circuit = /obj/item/circuitboard/machine/protolathe
-
- var/efficiency_coeff
- var/list/categories = list(
- "Power Designs",
- "Medical Designs",
- "Bluespace Designs",
- "Stock Parts",
- "Equipment",
- "Mining Designs",
- "Electronics",
- "Weapons",
- "Ammo",
- "Firing Pins",
- "Computer Parts"
- )
-
- var/datum/component/material_container/materials //Store for hyper speed!
-
-/obj/machinery/rnd/protolathe/Initialize()
- create_reagents(0)
- materials = AddComponent(/datum/component/material_container,
- list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM, MAT_BLUESPACE), 0,
- FALSE, list(/obj/item/stack, /obj/item/stack/ore/bluespace_crystal), CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert))
- materials.precise_insertion = TRUE
- RefreshParts()
- return ..()
-
-/obj/machinery/rnd/protolathe/RefreshParts()
- reagents.maximum_volume = 0
- for(var/obj/item/reagent_containers/glass/G in component_parts)
- reagents.maximum_volume += G.volume
- G.reagents.trans_to(src, G.reagents.total_volume)
-
- GET_COMPONENT(materials, /datum/component/material_container)
- materials.max_amount = 0
- for(var/obj/item/stock_parts/matter_bin/M in component_parts)
- materials.max_amount += M.rating * 75000
-
- var/T = 1.2
- for(var/obj/item/stock_parts/manipulator/M in component_parts)
- T -= M.rating/10
- efficiency_coeff = min(max(0, T), 1)
-
-/obj/machinery/rnd/protolathe/proc/check_mat(datum/design/being_built, M) // now returns how many times the item can be built with the material
- var/list/all_materials = being_built.reagents_list + being_built.materials
-
- GET_COMPONENT(materials, /datum/component/material_container)
- var/A = materials.amount(M)
- if(!A)
- A = reagents.get_reagent_amount(M)
-
- return round(A / max(1, (all_materials[M]*efficiency_coeff)))
-
-//we eject the materials upon deconstruction.
-/obj/machinery/rnd/protolathe/on_deconstruction()
- for(var/obj/item/reagent_containers/glass/G in component_parts)
- reagents.trans_to(G, G.reagents.maximum_volume)
- GET_COMPONENT(materials, /datum/component/material_container)
- materials.retrieve_all()
- ..()
-
-
-/obj/machinery/rnd/protolathe/disconnect_console()
- linked_console.linked_lathe = null
- ..()
-
-/obj/machinery/rnd/protolathe/proc/user_try_print_id(id, amount)
- if((!istype(linked_console) && requires_console) || !id)
- return FALSE
- if(istext(amount))
- amount = text2num(amount)
- if(isnull(amount))
- amount = 1
- var/datum/design/D = (linked_console || requires_console)? linked_console.stored_research.researched_designs[id] : get_techweb_design_by_id(id)
- if(!istype(D))
- return FALSE
- if(D.make_reagents.len)
- return FALSE
-
- var/power = 1000
- amount = CLAMP(amount, 1, 10)
- for(var/M in D.materials)
- power += round(D.materials[M] * amount / 5)
- power = max(3000, power)
- use_power(power)
-
- var/list/efficient_mats = list()
- for(var/MAT in D.materials)
- efficient_mats[MAT] = D.materials[MAT]*efficiency_coeff
-
- if(!materials.has_materials(efficient_mats, amount))
- say("Not enough materials to complete prototype[amount > 1? "s" : ""].")
- return FALSE
- for(var/R in D.reagents_list)
- if(!reagents.has_reagent(R, D.reagents_list[R]*efficiency_coeff))
- say("Not enough reagents to complete prototype[amount > 1? "s" : ""].")
- return FALSE
-
- materials.use_amount(efficient_mats, amount)
- for(var/R in D.reagents_list)
- reagents.remove_reagent(R, D.reagents_list[R]*efficiency_coeff)
-
- busy = TRUE
- flick("protolathe_n", src)
- var/timecoeff = efficiency_coeff * D.lathe_time_factor
-
- addtimer(CALLBACK(src, .proc/reset_busy), (32 * timecoeff * amount) ** 0.8)
- addtimer(CALLBACK(src, .proc/do_print, D.build_path, amount, efficient_mats, D.dangerous_construction), (32 * timecoeff * amount) ** 0.8)
- return TRUE
-
-/obj/machinery/rnd/protolathe/proc/do_print(path, amount, list/matlist, notify_admins)
- if(notify_admins && usr)
- investigate_log("[key_name(usr)] built [amount] of [path] at a protolathe.", INVESTIGATE_RESEARCH)
- message_admins("[ADMIN_LOOKUPFLW(usr)] has built [amount] of [path] at a protolathe")
- for(var/i in 1 to amount)
- var/obj/item/I = new path(get_turf(src))
- if(!istype(I, /obj/item/stack/sheet) && !istype(I, /obj/item/stack/ore/bluespace_crystal))
- I.materials = matlist.Copy()
- SSblackbox.record_feedback("nested tally", "item_printed", amount, list("[type]", "[path]"))
diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm
index 42cf5a529b..c4628c70ef 100644
--- a/code/modules/research/rdconsole.dm
+++ b/code/modules/research/rdconsole.dm
@@ -27,8 +27,8 @@ doesn't have toxins access.
circuit = /obj/item/circuitboard/computer/rdconsole
var/obj/machinery/rnd/destructive_analyzer/linked_destroy //Linked Destructive Analyzer
- var/obj/machinery/rnd/protolathe/linked_lathe //Linked Protolathe
- var/obj/machinery/rnd/circuit_imprinter/linked_imprinter //Linked Circuit Imprinter
+ var/obj/machinery/rnd/production/protolathe/linked_lathe //Linked Protolathe
+ var/obj/machinery/rnd/production/circuit_imprinter/linked_imprinter //Linked Circuit Imprinter
req_access = list(ACCESS_TOX) //lA AND SETTING MANIPULATION REQUIRES SCIENTIST ACCESS.
@@ -70,16 +70,16 @@ doesn't have toxins access.
if(linked_destroy == null)
linked_destroy = D
D.linked_console = src
- else if(istype(D, /obj/machinery/rnd/protolathe))
+ else if(istype(D, /obj/machinery/rnd/production/protolathe))
if(linked_lathe == null)
- var/obj/machinery/rnd/protolathe/P = D
+ var/obj/machinery/rnd/production/protolathe/P = D
if(!P.console_link)
continue
linked_lathe = D
D.linked_console = src
- else if(istype(D, /obj/machinery/rnd/circuit_imprinter))
+ else if(istype(D, /obj/machinery/rnd/production/circuit_imprinter))
if(linked_imprinter == null)
- var/obj/machinery/rnd/circuit_imprinter/C = D
+ var/obj/machinery/rnd/production/circuit_imprinter/C = D
if(!C.console_link)
continue
linked_imprinter = D
@@ -720,11 +720,11 @@ doesn't have toxins access.
if(D.build_type)
var/lathes = list()
if(D.build_type & IMPRINTER)
- lathes += "[machine_icon(/obj/machinery/rnd/circuit_imprinter)][RDSCREEN_NOBREAK]"
+ lathes += "[machine_icon(/obj/machinery/rnd/production/circuit_imprinter)][RDSCREEN_NOBREAK]"
if (linked_imprinter && D.id in stored_research.researched_designs)
l += "Imprint"
if(D.build_type & PROTOLATHE)
- lathes += "[machine_icon(/obj/machinery/rnd/protolathe)][RDSCREEN_NOBREAK]"
+ lathes += "[machine_icon(/obj/machinery/rnd/production/protolathe)][RDSCREEN_NOBREAK]"
if (linked_lathe && D.id in stored_research.researched_designs)
l += "Construct"
if(D.build_type & AUTOLATHE)
diff --git a/code/modules/research/rdmachines.dm b/code/modules/research/rdmachines.dm
index 707e3e1e46..0a8659c795 100644
--- a/code/modules/research/rdmachines.dm
+++ b/code/modules/research/rdmachines.dm
@@ -16,7 +16,6 @@
var/shocked = FALSE
var/obj/machinery/computer/rdconsole/linked_console
var/obj/item/loaded_item = null //the item loaded inside the machine (currently only used by experimentor and destructive analyzer)
- var/allowed_department_flags = ALL
/obj/machinery/rnd/proc/reset_busy()
busy = FALSE
@@ -47,8 +46,6 @@
if(panel_open)
wires.interact(user)
-
-
/obj/machinery/rnd/attackby(obj/item/O, mob/user, params)
if (shocked)
if(shock(user,50))
@@ -114,6 +111,6 @@
else
var/obj/item/stack/S = type_inserted
stack_name = initial(S.name)
- use_power(max(1000, (MINERAL_MATERIAL_AMOUNT * amount_inserted / 100)))
+ use_power(min(1000, (amount_inserted / 100)))
add_overlay("protolathe_[stack_name]")
addtimer(CALLBACK(src, /atom/proc/cut_overlay, "protolathe_[stack_name]"), 10)
diff --git a/code/modules/shuttle/supply.dm b/code/modules/shuttle/supply.dm
index a06b2aeebb..be17c0d641 100644
--- a/code/modules/shuttle/supply.dm
+++ b/code/modules/shuttle/supply.dm
@@ -17,7 +17,7 @@ GLOBAL_LIST_INIT(blacklisted_cargo_types, typecacheof(list(
/obj/effect/clockwork/spatial_gateway,
/obj/structure/destructible/clockwork/powered/clockwork_obelisk,
/obj/item/device/warp_cube,
- /obj/machinery/rnd/protolathe, //print tracking beacons, send shuttle
+ /obj/machinery/rnd/production/protolathe, //print tracking beacons, send shuttle
/obj/machinery/autolathe, //same
/obj/item/projectile/beam/wormhole,
/obj/effect/portal,
diff --git a/tgstation.dme b/tgstation.dme
index 6722b5dce6..04b4178684 100755
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -2336,13 +2336,9 @@
#include "code\modules\recycling\disposal\outlet.dm"
#include "code\modules\recycling\disposal\pipe.dm"
#include "code\modules\recycling\disposal\pipe_sorting.dm"
-#include "code\modules\research\circuitprinter.dm"
-#include "code\modules\research\departmental_circuit_imprinter.dm"
-#include "code\modules\research\departmental_lathe.dm"
#include "code\modules\research\designs.dm"
#include "code\modules\research\destructive_analyzer.dm"
#include "code\modules\research\experimentor.dm"
-#include "code\modules\research\protolathe.dm"
#include "code\modules\research\rdconsole.dm"
#include "code\modules\research\rdmachines.dm"
#include "code\modules\research\research_disk.dm"
@@ -2368,6 +2364,13 @@
#include "code\modules\research\designs\stock_parts_designs.dm"
#include "code\modules\research\designs\telecomms_designs.dm"
#include "code\modules\research\designs\weapon_designs.dm"
+#include "code\modules\research\machinery\_production.dm"
+#include "code\modules\research\machinery\circuit_imprinter.dm"
+#include "code\modules\research\machinery\departmental_circuit_imprinter.dm"
+#include "code\modules\research\machinery\departmental_protolathe.dm"
+#include "code\modules\research\machinery\departmental_techfab.dm"
+#include "code\modules\research\machinery\protolathe.dm"
+#include "code\modules\research\machinery\techfab.dm"
#include "code\modules\research\techweb\__techweb_helpers.dm"
#include "code\modules\research\techweb\_techweb.dm"
#include "code\modules\research\techweb\_techweb_node.dm"