diff --git a/code/datums/autolathe/arms.dm b/code/datums/autolathe/arms.dm
new file mode 100644
index 0000000000..f1dbc75192
--- /dev/null
+++ b/code/datums/autolathe/arms.dm
@@ -0,0 +1,389 @@
+/datum/category_item/autolathe/arms/syringegun_ammo
+ name = "syringe gun cartridge"
+ path =/obj/item/weapon/syringe_cartridge
+
+////////////////
+/*Ammo casings*/
+////////////////
+
+/datum/category_item/autolathe/arms/shotgun_blanks
+ name = "ammunition (12g, blank)"
+ path =/obj/item/ammo_casing/shotgun/blank
+
+/datum/category_item/autolathe/arms/shotgun_beanbag
+ name = "ammunition (12g, beanbag)"
+ path =/obj/item/ammo_casing/shotgun/beanbag
+
+/datum/category_item/autolathe/arms/shotgun_flash
+ name = "ammunition (12g, flash)"
+ path =/obj/item/ammo_casing/shotgun/flash
+
+/datum/category_item/autolathe/arms/shotgun
+ name = "ammunition (12g, slug)"
+ path =/obj/item/ammo_casing/shotgun
+ hidden = 1
+
+/datum/category_item/autolathe/arms/shotgun_pellet
+ name = "ammunition (12g, pellet)"
+ path =/obj/item/ammo_casing/shotgun/pellet
+ hidden = 1
+
+/datum/category_item/autolathe/arms/stunshell
+ name = "ammunition (stun cartridge, shotgun)"
+ path =/obj/item/ammo_casing/shotgun/stunshell
+ hidden = 1
+
+//////////////////
+/*Ammo magazines*/
+//////////////////
+
+/////// 5mm
+/*
+/datum/category_item/autolathe/arms/pistol_5mm
+ name = "pistol magazine (5mm)"
+ path =/obj/item/ammo_magazine/c5mm
+ category = "Arms and Ammunition"
+ hidden = 1
+*/
+
+/////// .45
+/datum/category_item/autolathe/arms/pistol_45
+ name = "pistol magazine (.45)"
+ path =/obj/item/ammo_magazine/c45m
+ hidden = 1
+
+/datum/category_item/autolathe/arms/pistol_45p
+ name = "pistol magazine (.45 practice)"
+ path =/obj/item/ammo_magazine/c45m/practice
+
+/datum/category_item/autolathe/arms/pistol_45r
+ name = "pistol magazine (.45 rubber)"
+ path =/obj/item/ammo_magazine/c45m/rubber
+
+/datum/category_item/autolathe/arms/pistol_45f
+ name = "pistol magazine (.45 flash)"
+ path =/obj/item/ammo_magazine/c45m/flash
+
+/datum/category_item/autolathe/arms/pistol_45uzi
+ name = "uzi magazine (.45)"
+ path =/obj/item/ammo_magazine/c45uzi
+ hidden = 1
+
+/datum/category_item/autolathe/arms/tommymag
+ name = "Tommygun magazine (.45)"
+ path =/obj/item/ammo_magazine/tommymag
+ hidden = 1
+
+/datum/category_item/autolathe/arms/tommydrum
+ name = "Tommygun drum magazine (.45)"
+ path =/obj/item/ammo_magazine/tommydrum
+ hidden = 1
+
+/////// 9mm
+
+/obj/item/ammo_magazine/mc9mm/flash
+ ammo_type =/obj/item/ammo_casing/c9mmf
+
+/obj/item/ammo_magazine/mc9mm/rubber
+ name = "magazine (9mm rubber)"
+ ammo_type =/obj/item/ammo_casing/c9mmr
+
+/obj/item/ammo_magazine/mc9mm/practice
+ name = "magazine (9mm practice)"
+ ammo_type =/obj/item/ammo_casing/c9mmp
+
+/datum/category_item/autolathe/arms/pistol_9mm
+ name = "pistol magazine (9mm)"
+ path =/obj/item/ammo_magazine/mc9mm
+ hidden = 1
+
+/datum/category_item/autolathe/arms/pistol_9mmr
+ name = "pistol magazine (9mm rubber)"
+ path =/obj/item/ammo_magazine/mc9mm/rubber
+
+/datum/category_item/autolathe/arms/pistol_9mmp
+ name = "pistol magazine (9mm practice)"
+ path =/obj/item/ammo_magazine/mc9mm/practice
+
+/datum/category_item/autolathe/arms/pistol_9mmf
+ name = "pistol magazine (9mm flash)"
+ path =/obj/item/ammo_magazine/mc9mm/flash
+
+/datum/category_item/autolathe/arms/smg_9mm
+ name = "top-mounted SMG magazine (9mm)"
+ path =/obj/item/ammo_magazine/mc9mmt
+ hidden = 1
+
+/datum/category_item/autolathe/arms/smg_9mmr
+ name = "top-mounted SMG magazine (9mm rubber)"
+ path =/obj/item/ammo_magazine/mc9mmt/rubber
+
+/datum/category_item/autolathe/arms/smg_9mmp
+ name = "top-mounted SMG magazine (9mm practice)"
+ path =/obj/item/ammo_magazine/mc9mmt/practice
+
+/datum/category_item/autolathe/arms/smg_9mmf
+ name = "top-mounted SMG magazine (9mm flash)"
+ path =/obj/item/ammo_magazine/mc9mmt/flash
+
+/////// 10mm
+/datum/category_item/autolathe/arms/smg_10mm
+ name = "SMG magazine (10mm)"
+ path =/obj/item/ammo_magazine/a10mm
+ hidden = 1
+
+/datum/category_item/autolathe/arms/pistol_50
+ name = "pistol magazine (.50AE)"
+ path =/obj/item/ammo_magazine/a50
+ hidden = 1
+
+/////// 5.56mm
+/datum/category_item/autolathe/arms/rifle_556
+ name = "10rnd rifle magazine (5.56mm)"
+ path =/obj/item/ammo_magazine/a556
+ hidden = 1
+
+/datum/category_item/autolathe/arms/rifle_556p
+ name = "10rnd rifle magazine (5.56mm practice)"
+ path =/obj/item/ammo_magazine/a556/practice
+
+/datum/category_item/autolathe/arms/rifle_556m
+ name = "20rnd rifle magazine (5.56mm)"
+ path =/obj/item/ammo_magazine/a556m
+ hidden = 1
+
+/datum/category_item/autolathe/arms/rifle_556mp
+ name = "20rnd rifle magazine (5.56mm practice)"
+ path =/obj/item/ammo_magazine/a556m/practice
+ hidden = 1
+
+/////// 7.62
+/datum/category_item/autolathe/arms/rifle_small_762
+ name = "10rnd rifle magazine (7.62mm)"
+ path =/obj/item/ammo_magazine/s762
+ hidden = 1
+
+/datum/category_item/autolathe/arms/rifle_762
+ name = "20rnd rifle magazine (7.62mm)"
+ path =/obj/item/ammo_magazine/c762
+ hidden = 1
+
+/datum/category_item/autolathe/arms/machinegun_762
+ name = "machinegun box magazine (7.62)"
+ path =/obj/item/ammo_magazine/a762
+ hidden = 1
+
+/datum/category_item/autolathe/arms/shotgun_magazine
+ name = "24rnd shotgun magazine (12g)"
+ path =/obj/item/ammo_magazine/g12
+ hidden = 1
+
+/* Commented out until autolathe stuff is decided/fixed. Will probably remove these entirely. -Spades
+// These should always be/empty! The idea is to fill them up manually with ammo clips.
+
+/datum/category_item/autolathe/arms/pistol_5mm
+ name = "pistol magazine (5mm)"
+ path =/obj/item/ammo_magazine/c5mm/empty
+ category = "Arms and Ammunition"
+ hidden = 1
+
+/datum/category_item/autolathe/arms/smg_5mm
+ name = "top-mounted SMG magazine (5mm)"
+ path =/obj/item/ammo_magazine/c5mmt/empty
+ category = "Arms and Ammunition"
+ hidden = 1
+
+/datum/category_item/autolathe/arms/pistol_45
+ name = "pistol magazine (.45)"
+ path =/obj/item/ammo_magazine/c45m/empty
+ category = "Arms and Ammunition"
+
+/datum/category_item/autolathe/arms/pistol_45uzi
+ name = "uzi magazine (.45)"
+ path =/obj/item/ammo_magazine/c45uzi/empty
+ category = "Arms and Ammunition"
+ hidden = 1
+
+/datum/category_item/autolathe/arms/tommymag
+ name = "Tommygun magazine (.45)"
+ path =/obj/item/ammo_magazine/tommymag/empty
+ category = "Arms and Ammunition"
+ hidden = 1
+
+/datum/category_item/autolathe/arms/tommydrum
+ name = "Tommygun drum magazine (.45)"
+ path =/obj/item/ammo_magazine/tommydrum/empty
+ category = "Arms and Ammunition"
+ hidden = 1
+
+/datum/category_item/autolathe/arms/pistol_9mm
+ name = "pistol magazine (9mm)"
+ path =/obj/item/ammo_magazine/mc9mm/empty
+ category = "Arms and Ammunition"
+
+/datum/category_item/autolathe/arms/smg_9mm
+ name = "top-mounted SMG magazine (9mm)"
+ path =/obj/item/ammo_magazine/mc9mmt/empty
+ category = "Arms and Ammunition"
+
+/datum/category_item/autolathe/arms/smg_10mm
+ name = "SMG magazine (10mm)"
+ path =/obj/item/ammo_magazine/a10mm/empty
+ category = "Arms and Ammunition"
+ hidden = 1
+
+/datum/category_item/autolathe/arms/pistol_50
+ name = "pistol magazine (.50AE)"
+ path =/obj/item/ammo_magazine/a50/empty
+ category = "Arms and Ammunition"
+ hidden = 1
+
+/datum/category_item/autolathe/arms/rifle_556
+ name = "10rnd rifle magazine (5.56mm)"
+ path =/obj/item/ammo_magazine/a556/empty
+ category = "Arms and Ammunition"
+
+/datum/category_item/autolathe/arms/rifle_556m
+ name = "20rnd rifle magazine (5.56mm)"
+ path =/obj/item/ammo_magazine/a556m/empty
+ category = "Arms and Ammunition"
+ hidden = 1
+
+/datum/category_item/autolathe/arms/rifle_SVD
+ name = "10rnd rifle magazine (7.62mm)"
+ path =/obj/item/ammo_magazine/SVD/empty
+ category = "Arms and Ammunition"
+ hidden = 1
+
+/datum/category_item/autolathe/arms/rifle_762
+ name = "20rnd rifle magazine (7.62mm)"
+ path =/obj/item/ammo_magazine/c762/empty
+ category = "Arms and Ammunition"
+ hidden = 1
+
+/datum/category_item/autolathe/arms/machinegun_762
+ name = "machinegun box magazine (7.62)"
+ path =/obj/item/ammo_magazine/a762/empty
+ category = "Arms and Ammunition"
+ hidden = 1
+
+/datum/category_item/autolathe/arms/shotgun_magazine
+ name = "24rnd shotgun magazine (12g)"
+ path =/obj/item/ammo_magazine/g12/empty
+ category = "Arms and Ammunition"
+ hidden = 1*/
+
+///////////////////////////////
+/*Ammo clips and Speedloaders*/
+///////////////////////////////
+
+/datum/category_item/autolathe/arms/speedloader_357
+ name = "speedloader (.357)"
+ path =/obj/item/ammo_magazine/a357
+ hidden = 1
+
+/datum/category_item/autolathe/arms/speedloader_38
+ name = "speedloader (.38)"
+ path =/obj/item/ammo_magazine/c38
+ hidden = 1
+
+/datum/category_item/autolathe/arms/speedloader_38r
+ name = "speedloader (.38 rubber)"
+ path =/obj/item/ammo_magazine/c38/rubber
+
+// Commented out until metal exploits with autolathe is fixed.
+/*/datum/category_item/autolathe/arms/pistol_clip_45
+ name = "ammo clip (.45)"
+ path =/obj/item/ammo_magazine/clip/c45
+ category = "Arms and Ammunition"
+ hidden = 1
+
+/datum/category_item/autolathe/arms/pistol_clip_45r
+ name = "ammo clip (.45 rubber)"
+ path =/obj/item/ammo_magazine/clip/c45/rubber
+ category = "Arms and Ammunition"
+
+/datum/category_item/autolathe/arms/pistol_clip_45f
+ name = "ammo clip (.45 flash)"
+ path =/obj/item/ammo_magazine/clip/c45/flash
+ category = "Arms and Ammunition"
+
+/datum/category_item/autolathe/arms/pistol_clip_45p
+ name = "ammo clip (.45 practice)"
+ path =/obj/item/ammo_magazine/clip/c45/practice
+ category = "Arms and Ammunition"
+
+/datum/category_item/autolathe/arms/pistol_clip_9mm
+ name = "ammo clip (9mm)"
+ path =/obj/item/ammo_magazine/clip/c9mm
+ category = "Arms and Ammunition"
+ hidden = 1
+
+/datum/category_item/autolathe/arms/pistol_clip_9mmr
+ name = "ammo clip (9mm rubber)"
+ path =/obj/item/ammo_magazine/clip/c9mm/rubber
+ category = "Arms and Ammunition"
+
+/datum/category_item/autolathe/arms/pistol_clip_9mmp
+ name = "ammo clip (9mm practice)"
+ path =/obj/item/ammo_magazine/clip/c9mm/practice
+ category = "Arms and Ammunition"
+
+/datum/category_item/autolathe/arms/pistol_clip_9mmf
+ name = "ammo clip (9mm flash)"
+ path =/obj/item/ammo_magazine/clip/c9mm/flash
+ category = "Arms and Ammunition"
+
+/datum/category_item/autolathe/arms/pistol_clip_5mm
+ name = "ammo clip (5mm)"
+ path =/obj/item/ammo_magazine/clip/c5mm
+ category = "Arms and Ammunition"
+ hidden = 1
+
+/datum/category_item/autolathe/arms/pistol_clip_10mm
+ name = "ammo clip (10mm)"
+ path =/obj/item/ammo_magazine/clip/a10mm
+ category = "Arms and Ammunition"
+ hidden = 1
+
+/datum/category_item/autolathe/arms/pistol_clip_50
+ name = "ammo clip (.50AE)"
+ path =/obj/item/ammo_magazine/clip/a50
+ category = "Arms and Ammunition"
+ hidden = 1
+
+/datum/category_item/autolathe/arms/rifle_clip_556
+ name = "ammo clip (5.56mm)"
+ path =/obj/item/ammo_magazine/clip/a556
+ category = "Arms and Ammunition"
+ hidden = 1
+
+/datum/category_item/autolathe/arms/rifle_clip_556_practice
+ name = "ammo clip (5.56mm practice)"
+ path =/obj/item/ammo_magazine/clip/a556/practice
+ category = "Arms and Ammunition"
+*/
+
+/datum/category_item/autolathe/arms/rifle_clip_762
+ name = "ammo clip (7.62mm)"
+ path =/obj/item/ammo_magazine/clip/a762
+ hidden = 1
+
+/datum/category_item/autolathe/arms/rifle_clip_762_practice
+ name = "ammo clip (7.62mm practice)"
+ path =/obj/item/ammo_magazine/clip/a762/practice
+
+/datum/category_item/autolathe/arms/knuckledusters
+ name = "knuckle dusters"
+ path =/obj/item/weapon/material/knuckledusters
+ hidden = 1
+
+/datum/category_item/autolathe/arms/tacknife
+ name = "tactical knife"
+ path =/obj/item/weapon/material/hatchet/tacknife
+ hidden = 1
+
+/datum/category_item/autolathe/arms/flamethrower
+ name = "flamethrower"
+ path =/obj/item/weapon/flamethrower/full
+ hidden = 1
diff --git a/code/datums/autolathe/autolathe.dm b/code/datums/autolathe/autolathe.dm
new file mode 100644
index 0000000000..4adeb85760
--- /dev/null
+++ b/code/datums/autolathe/autolathe.dm
@@ -0,0 +1,71 @@
+var/datum/category_collection/autolathe/autolathe_recipes
+
+/datum/category_item/autolathe/New()
+ ..()
+ var/obj/item/I = new path()
+ if(I.matter && !resources)
+ resources = list()
+ for(var/material in I.matter)
+ resources[material] = I.matter[material]*1.25 // More expensive to produce than they are to recycle.
+ if(is_stack && istype(I, /obj/item/stack))
+ var/obj/item/stack/IS = I
+ max_stack = IS.max_amount
+ qdel(I)
+
+/****************************
+* Category Collection Setup *
+****************************/
+
+/datum/category_collection/autolathe
+ category_group_type = /datum/category_group/autolathe
+
+/*************
+* Categories *
+*************/
+
+/datum/category_group/autolathe
+
+/datum/category_group/autolathe/all
+ name = "All"
+ category_item_type = /datum/category_item/autolathe
+
+///datum/category_group/autolathe/all/New()
+
+/datum/category_group/autolathe/arms
+ name = "Arms and Ammunition"
+ category_item_type = /datum/category_item/autolathe/arms
+
+/datum/category_group/autolathe/devices
+ name = "Devices and Components"
+ category_item_type = /datum/category_item/autolathe/devices
+
+/datum/category_group/autolathe/engineering
+ name = "Engineering"
+ category_item_type = /datum/category_item/autolathe/engineering
+
+/datum/category_group/autolathe/general
+ name = "General"
+ category_item_type = /datum/category_item/autolathe/general
+
+/datum/category_group/autolathe/medical
+ name = "Medical"
+ category_item_type = /datum/category_item/autolathe/medical
+
+/datum/category_group/autolathe/tools
+ name = "Tools"
+ category_item_type = /datum/category_item/autolathe/tools
+
+/*******************
+* Category entries *
+*******************/
+
+/datum/category_item/autolathe
+ var/path
+ var/list/resources
+ var/hidden
+ var/power_use = 0
+ var/is_stack
+ var/max_stack
+
+/datum/category_item/autolathe/dd_SortValue()
+ return name
\ No newline at end of file
diff --git a/code/datums/autolathe/devices.dm b/code/datums/autolathe/devices.dm
new file mode 100644
index 0000000000..9c6ab5bb97
--- /dev/null
+++ b/code/datums/autolathe/devices.dm
@@ -0,0 +1,32 @@
+/datum/category_item/autolathe/devices/consolescreen
+ name = "console screen"
+ path =/obj/item/weapon/stock_parts/console_screen
+
+/datum/category_item/autolathe/devices/igniter
+ name = "igniter"
+ path =/obj/item/device/assembly/igniter
+
+/datum/category_item/autolathe/devices/signaler
+ name = "signaler"
+ path =/obj/item/device/assembly/signaler
+
+/datum/category_item/autolathe/devices/sensor_infra
+ name = "infrared sensor"
+ path =/obj/item/device/assembly/infra
+
+/datum/category_item/autolathe/devices/timer
+ name = "timer"
+ path =/obj/item/device/assembly/timer
+
+/datum/category_item/autolathe/devices/sensor_prox
+ name = "proximity sensor"
+ path =/obj/item/device/assembly/prox_sensor
+
+/datum/category_item/autolathe/devices/beartrap
+ name = "mechanical trap"
+ path =/obj/item/weapon/beartrap
+
+/datum/category_item/autolathe/devices/electropack
+ name = "electropack"
+ path =/obj/item/device/radio/electropack
+ hidden = 1
diff --git a/code/datums/autolathe/engineering.dm b/code/datums/autolathe/engineering.dm
new file mode 100644
index 0000000000..ce6b5f07b5
--- /dev/null
+++ b/code/datums/autolathe/engineering.dm
@@ -0,0 +1,95 @@
+/datum/category_item/autolathe/engineering/airlockmodule
+ name = "airlock electronics"
+ path =/obj/item/weapon/airlock_electronics
+
+/datum/category_item/autolathe/engineering/airalarm
+ name = "air alarm electronics"
+ path =/obj/item/weapon/circuitboard/airalarm
+
+/datum/category_item/autolathe/engineering/firealarm
+ name = "fire alarm electronics"
+ path =/obj/item/weapon/circuitboard/firealarm
+
+/datum/category_item/autolathe/engineering/powermodule
+ name = "power control module"
+ path =/obj/item/weapon/module/power_control
+
+/datum/category_item/autolathe/engineering/statusdisplay
+ name = "status display electronics"
+ path =/obj/item/weapon/circuitboard/status_display
+
+/datum/category_item/autolathe/engineering/aistatusdisplay
+ name = "ai status display electronics"
+ path =/obj/item/weapon/circuitboard/ai_status_display
+
+/datum/category_item/autolathe/engineering/newscaster
+ name = "newscaster electronics"
+ path =/obj/item/weapon/circuitboard/newscaster
+
+/datum/category_item/autolathe/engineering/atm
+ name = "atm electronics"
+ path =/obj/item/weapon/circuitboard/atm
+
+/datum/category_item/autolathe/engineering/intercom
+ name = "intercom electronics"
+ path =/obj/item/weapon/circuitboard/intercom
+
+/datum/category_item/autolathe/engineering/holopad
+ name = "holopad electronics"
+ path =/obj/item/weapon/circuitboard/holopad
+
+/datum/category_item/autolathe/engineering/guestpass
+ name = "guestpass console electronics"
+ path =/obj/item/weapon/circuitboard/guestpass
+
+/datum/category_item/autolathe/engineering/entertainment
+ name = "entertainment camera electronics"
+ path =/obj/item/weapon/circuitboard/security/telescreen/entertainment
+
+/datum/category_item/autolathe/engineering/keycard
+ name = "keycard authenticator electronics"
+ path =/obj/item/weapon/circuitboard/keycard_auth
+
+/datum/category_item/autolathe/engineering/photocopier
+ name = "photocopier electronics"
+ path =/obj/item/weapon/circuitboard/photocopier
+
+/datum/category_item/autolathe/engineering/fax
+ name = "fax machine electronics"
+ path =/obj/item/weapon/circuitboard/fax
+
+/datum/category_item/autolathe/engineering/microwave
+ name = "microwave electronics"
+ path =/obj/item/weapon/circuitboard/microwave
+
+/datum/category_item/autolathe/engineering/washing
+ name = "washing machine electronics"
+ path =/obj/item/weapon/circuitboard/washing
+
+/datum/category_item/autolathe/engineering/request
+ name = "request console electronics"
+ path =/obj/item/weapon/circuitboard/request
+
+/datum/category_item/autolathe/engineering/motor
+ name = "motor"
+ path =/obj/item/weapon/stock_parts/motor
+
+/datum/category_item/autolathe/engineering/gear
+ name = "gear"
+ path =/obj/item/weapon/stock_parts/gear
+
+/datum/category_item/autolathe/engineering/spring
+ name = "spring"
+ path =/obj/item/weapon/stock_parts/spring
+
+/datum/category_item/autolathe/engineering/rcd_ammo
+ name = "matter cartridge"
+ path =/obj/item/weapon/rcd_ammo
+
+/datum/category_item/autolathe/engineering/rcd
+ name = "rapid construction device"
+ path =/obj/item/weapon/rcd
+
+/datum/category_item/autolathe/engineering/camera_assembly
+ name = "camera assembly"
+ path =/obj/item/weapon/camera_assembly
diff --git a/code/datums/autolathe/general.dm b/code/datums/autolathe/general.dm
new file mode 100644
index 0000000000..f354583318
--- /dev/null
+++ b/code/datums/autolathe/general.dm
@@ -0,0 +1,124 @@
+/datum/category_item/autolathe/general/bucket
+ name = "bucket"
+ path =/obj/item/weapon/reagent_containers/glass/bucket
+
+/datum/category_item/autolathe/general/cooler_bottle
+ name = "water-cooler bottle"
+ path =/obj/item/weapon/reagent_containers/glass/cooler_bottle
+
+/datum/category_item/autolathe/general/drinkingglass_square
+ name = "half-pint glass"
+ path =/obj/item/weapon/reagent_containers/food/drinks/glass2/square
+
+/datum/category_item/autolathe/general/drinkingglass_rocks
+ name = "rocks glass"
+ path =/obj/item/weapon/reagent_containers/food/drinks/glass2/rocks
+
+/datum/category_item/autolathe/general/drinkingglass_shake
+ name = "milkshake glass"
+ path =/obj/item/weapon/reagent_containers/food/drinks/glass2/shake
+
+/datum/category_item/autolathe/general/drinkingglass_cocktail
+ name = "cocktail glass"
+ path =/obj/item/weapon/reagent_containers/food/drinks/glass2/cocktail
+
+/datum/category_item/autolathe/general/drinkingglass_shot
+ name = "shot glass"
+ path =/obj/item/weapon/reagent_containers/food/drinks/glass2/shot
+
+/datum/category_item/autolathe/general/drinkingglass_pint
+ name = "pint glass"
+ path =/obj/item/weapon/reagent_containers/food/drinks/glass2/pint
+
+/datum/category_item/autolathe/general/drinkingglass_mug
+ name = "glass mug"
+ path =/obj/item/weapon/reagent_containers/food/drinks/glass2/mug
+
+/datum/category_item/autolathe/general/drinkingglass_wine
+ name = "wine glass"
+ path =/obj/item/weapon/reagent_containers/food/drinks/glass2/wine
+
+/datum/category_item/autolathe/general/flashlight
+ name = "flashlight"
+ path =/obj/item/device/flashlight
+
+/datum/category_item/autolathe/general/floor_light
+ name = "floor light"
+ path =/obj/machinery/floor_light
+
+/datum/category_item/autolathe/general/extinguisher
+ name = "extinguisher"
+ path =/obj/item/weapon/extinguisher
+
+/datum/category_item/autolathe/general/jar
+ name = "jar"
+ path =/obj/item/glass_jar
+
+/datum/category_item/autolathe/general/radio_headset
+ name = "radio headset"
+ path =/obj/item/device/radio/headset
+
+/datum/category_item/autolathe/general/radio_bounced
+ name = "station bounced radio"
+ path =/obj/item/device/radio/off
+
+/datum/category_item/autolathe/general/suit_cooler
+ name = "suit cooling unit"
+ path =/obj/item/device/suit_cooling_unit
+
+/datum/category_item/autolathe/general/weldermask
+ name = "welding mask"
+ path =/obj/item/clothing/head/welding
+
+/datum/category_item/autolathe/general/metal
+ name = "steel sheets"
+ path =/obj/item/stack/material/steel
+ is_stack = 1
+
+/datum/category_item/autolathe/general/glass
+ name = "glass sheets"
+ path =/obj/item/stack/material/glass
+ is_stack = 1
+
+/datum/category_item/autolathe/general/rglass
+ name = "reinforced glass sheets"
+ path =/obj/item/stack/material/glass/reinforced
+ is_stack = 1
+
+/datum/category_item/autolathe/general/rods
+ name = "metal rods"
+ path =/obj/item/stack/rods
+ is_stack = 1
+
+/datum/category_item/autolathe/general/knife
+ name = "kitchen knife"
+ path =/obj/item/weapon/material/knife
+
+/datum/category_item/autolathe/general/taperecorder
+ name = "tape recorder"
+ path =/obj/item/device/taperecorder
+
+/datum/category_item/autolathe/general/tube
+ name = "light tube"
+ path =/obj/item/weapon/light/tube
+
+/datum/category_item/autolathe/general/bulb
+ name = "light bulb"
+ path =/obj/item/weapon/light/bulb
+
+/datum/category_item/autolathe/general/ashtray_glass
+ name = "glass ashtray"
+ path =/obj/item/weapon/material/ashtray/glass
+
+/datum/category_item/autolathe/general/weldinggoggles
+ name = "welding goggles"
+ path =/obj/item/clothing/glasses/welding
+
+/datum/category_item/autolathe/general/maglight
+ name = "maglight"
+ path =/obj/item/device/flashlight/maglight
+
+/datum/category_item/autolathe/general/handcuffs
+ name = "handcuffs"
+ path =/obj/item/weapon/handcuffs
+ hidden = 1
diff --git a/code/datums/autolathe/medical.dm b/code/datums/autolathe/medical.dm
new file mode 100644
index 0000000000..40211f9a8f
--- /dev/null
+++ b/code/datums/autolathe/medical.dm
@@ -0,0 +1,39 @@
+/datum/category_item/autolathe/medical/scalpel
+ name = "scalpel"
+ path =/obj/item/weapon/scalpel
+
+/datum/category_item/autolathe/medical/circularsaw
+ name = "circular saw"
+ path =/obj/item/weapon/circular_saw
+
+/datum/category_item/autolathe/medical/surgicaldrill
+ name = "surgical drill"
+ path =/obj/item/weapon/surgicaldrill
+
+/datum/category_item/autolathe/medical/retractor
+ name = "retractor"
+ path =/obj/item/weapon/retractor
+
+/datum/category_item/autolathe/medical/cautery
+ name = "cautery"
+ path =/obj/item/weapon/cautery
+
+/datum/category_item/autolathe/medical/hemostat
+ name = "hemostat"
+ path =/obj/item/weapon/hemostat
+
+/datum/category_item/autolathe/medical/beaker
+ name = "glass beaker"
+ path =/obj/item/weapon/reagent_containers/glass/beaker
+
+/datum/category_item/autolathe/medical/beaker_large
+ name = "large glass beaker"
+ path =/obj/item/weapon/reagent_containers/glass/beaker/large
+
+/datum/category_item/autolathe/medical/vial
+ name = "glass vial"
+ path =/obj/item/weapon/reagent_containers/glass/beaker/vial
+
+/datum/category_item/autolathe/medical/syringe
+ name = "syringe"
+ path =/obj/item/weapon/reagent_containers/syringe
diff --git a/code/datums/autolathe/tools.dm b/code/datums/autolathe/tools.dm
new file mode 100644
index 0000000000..50361e94d2
--- /dev/null
+++ b/code/datums/autolathe/tools.dm
@@ -0,0 +1,39 @@
+/datum/category_item/autolathe/tools/crowbar
+ name = "crowbar"
+ path =/obj/item/weapon/crowbar
+
+/datum/category_item/autolathe/tools/multitool
+ name = "multitool"
+ path =/obj/item/device/multitool
+
+/datum/category_item/autolathe/tools/t_scanner
+ name = "T-ray scanner"
+ path =/obj/item/device/t_scanner
+
+/datum/category_item/autolathe/tools/weldertool
+ name = "welding tool"
+ path =/obj/item/weapon/weldingtool
+
+/datum/category_item/autolathe/tools/screwdriver
+ name = "screwdriver"
+ path =/obj/item/weapon/screwdriver
+
+/datum/category_item/autolathe/tools/wirecutters
+ name = "wirecutters"
+ path =/obj/item/weapon/wirecutters
+
+/datum/category_item/autolathe/tools/wrench
+ name = "wrench"
+ path =/obj/item/weapon/wrench
+
+/datum/category_item/autolathe/tools/hatchet
+ name = "hatchet"
+ path =/obj/item/weapon/material/hatchet
+
+/datum/category_item/autolathe/tools/minihoe
+ name = "mini hoe"
+ path =/obj/item/weapon/material/minihoe
+
+/datum/category_item/autolathe/tools/welder_industrial
+ name = "industrial welding tool"
+ path =/obj/item/weapon/weldingtool/largetank
diff --git a/code/datums/hierarchy.dm b/code/datums/hierarchy.dm
new file mode 100644
index 0000000000..ab009e03c3
--- /dev/null
+++ b/code/datums/hierarchy.dm
@@ -0,0 +1,30 @@
+/decl/hierarchy
+ var/name = "Hierarchy"
+ var/hierarchy_type
+ var/decl/hierarchy/parent
+ var/list/decl/hierarchy/children
+
+/decl/hierarchy/New(var/full_init = TRUE)
+ children = list()
+ if(!full_init)
+ return
+
+ var/list/all_subtypes = list()
+ all_subtypes[type] = src
+ for(var/subtype in subtypesof(type))
+ all_subtypes[subtype] = new subtype(FALSE)
+
+ for(var/subtype in (all_subtypes - type))
+ var/decl/hierarchy/subtype_instance = all_subtypes[subtype]
+ var/decl/hierarchy/subtype_parent = all_subtypes[subtype_instance.parent_type]
+ subtype_instance.parent = subtype_parent
+ dd_insertObjectList(subtype_parent.children, subtype_instance)
+
+/decl/hierarchy/proc/is_category()
+ return hierarchy_type == type || children.len
+
+/decl/hierarchy/proc/is_hidden_category()
+ return hierarchy_type == type
+
+/decl/hierarchy/dd_SortValue()
+ return name
\ No newline at end of file
diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm
index 5901148603..236079f8e3 100644
--- a/code/game/machinery/autolathe.dm
+++ b/code/game/machinery/autolathe.dm
@@ -8,10 +8,10 @@
idle_power_usage = 10
active_power_usage = 2000
circuit = /obj/item/weapon/circuitboard/autolathe
- var/list/machine_recipes
+ var/datum/category_collection/autolathe/machine_recipes
var/list/stored_material = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0)
var/list/storage_capacity = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0)
- var/show_category = "All"
+ var/datum/category_group/autolathe/current_category
var/hacked = 0
var/disabled = 0
@@ -42,7 +42,10 @@
/obj/machinery/autolathe/proc/update_recipe_list()
if(!machine_recipes)
+ if(!autolathe_recipes)
+ autolathe_recipes = new()
machine_recipes = autolathe_recipes
+ current_category = machine_recipes.categories[1]
/obj/machinery/autolathe/interact(mob/user as mob)
@@ -67,12 +70,10 @@
material_bottom += "
[stored_material[material]]/[storage_capacity[material]] | "
dat += "[material_top][material_bottom]
"
- dat += "Printable Designs
"
+ dat += "Printable Designs
"
- var/index = 0
- for(var/datum/autolathe/recipe/R in machine_recipes)
- index++
- if(R.hidden && !hacked || (show_category != "All" && show_category != R.category))
+ for(var/datum/category_item/autolathe/R in current_category.items)
+ if(R.hidden && !hacked)
continue
var/can_make = 1
var/material_string = ""
@@ -101,10 +102,10 @@
max_sheets = min(max_sheets, R.max_stack) // Limit to the max allowed by stack type.
multiplier_string += "
"
for(var/i = 5;i\[x[i]\]"
- multiplier_string += "\[x[max_sheets]\]"
+ multiplier_string += "\[x[i]\]"
+ multiplier_string += "\[x[max_sheets]\]"
- dat += "| [R.hidden ? "*" : ""][can_make ? "" : ""][R.name][can_make ? "" : ""][R.hidden ? "*" : ""][multiplier_string] | [material_string] |
"
+ dat += "| [R.hidden ? "*" : ""][can_make ? "" : ""][R.name][can_make ? "" : ""][R.hidden ? "*" : ""][multiplier_string] | [material_string] |
"
dat += "
"
//Hacking.
@@ -235,18 +236,13 @@
if(href_list["change_category"])
- var/choice = input("Which category do you wish to display?") as null|anything in autolathe_categories+"All"
+ var/choice = input("Which category do you wish to display?") as null|anything in machine_recipes.categories
if(!choice) return
- show_category = choice
+ current_category = choice
if(href_list["make"] && machine_recipes)
-
- var/index = text2num(href_list["make"])
var/multiplier = text2num(href_list["multiplier"])
- var/datum/autolathe/recipe/making
-
- if(index > 0 && index <= machine_recipes.len)
- making = machine_recipes[index]
+ var/datum/category_item/autolathe/making = locate(href_list["make"]) in current_category.items
//Exploit detection, not sure if necessary after rewrite.
if(!making || multiplier < 0 || multiplier > 100)
diff --git a/code/game/machinery/autolathe_datums.dm b/code/game/machinery/autolathe_datums.dm
deleted file mode 100644
index eb70b1afa6..0000000000
--- a/code/game/machinery/autolathe_datums.dm
+++ /dev/null
@@ -1,874 +0,0 @@
-/var/global/list/autolathe_recipes
-/var/global/list/autolathe_categories
-
-/proc/populate_lathe_recipes()
-
- //Create global autolathe recipe list if it hasn't been made already.
- autolathe_recipes = list()
- autolathe_categories = list()
- for(var/R in typesof(/datum/autolathe/recipe)-/datum/autolathe/recipe)
- var/datum/autolathe/recipe/recipe = new R
- autolathe_recipes += recipe
- autolathe_categories |= recipe.category
-
- var/obj/item/I = new recipe.path
- if(I.matter && !recipe.resources) //This can be overidden in the datums.
- recipe.resources = list()
- for(var/material in I.matter)
- recipe.resources[material] = I.matter[material]*1.25 // More expensive to produce than they are to recycle.
- if(recipe.is_stack && istype(I, /obj/item/stack))
- var/obj/item/stack/IS = I
- recipe.max_stack = IS.max_amount
- qdel(I)
-
-/datum/autolathe/recipe
- var/name = "object"
- var/path
- var/list/resources
- var/hidden
- var/category
- var/power_use = 0
- var/is_stack
- var/max_stack
-
-/datum/autolathe/recipe/bucket
- name = "bucket"
- path = /obj/item/weapon/reagent_containers/glass/bucket
- category = "General"
-
-/datum/autolathe/recipe/cooler_bottle
- name = "water-cooler bottle"
- path = /obj/item/weapon/reagent_containers/glass/cooler_bottle
- category = "General"
-
-/datum/autolathe/recipe/drinkingglass
- name = "drinking glass"
- path = /obj/item/weapon/reagent_containers/food/drinks/glass2/square
- category = "General"
- New()
- ..()
- var/obj/O = path
- name = initial(O.name) // generic recipes yay
-
-/datum/autolathe/recipe/drinkingglass/rocks
- path = /obj/item/weapon/reagent_containers/food/drinks/glass2/rocks
-
-/datum/autolathe/recipe/drinkingglass/shake
- path = /obj/item/weapon/reagent_containers/food/drinks/glass2/shake
-
-/datum/autolathe/recipe/drinkingglass/cocktail
- path = /obj/item/weapon/reagent_containers/food/drinks/glass2/cocktail
-
-/datum/autolathe/recipe/drinkingglass/shot
- path = /obj/item/weapon/reagent_containers/food/drinks/glass2/shot
-
-/datum/autolathe/recipe/drinkingglass/pint
- path = /obj/item/weapon/reagent_containers/food/drinks/glass2/pint
-
-/datum/autolathe/recipe/drinkingglass/mug
- path = /obj/item/weapon/reagent_containers/food/drinks/glass2/mug
-
-/datum/autolathe/recipe/drinkingglass/wine
- path = /obj/item/weapon/reagent_containers/food/drinks/glass2/wine
-
-/datum/autolathe/recipe/flashlight
- name = "flashlight"
- path = /obj/item/device/flashlight
- category = "General"
-
-/datum/autolathe/recipe/floor_light
- name = "floor light"
- path = /obj/machinery/floor_light
- category = "General"
-
-/datum/autolathe/recipe/extinguisher
- name = "extinguisher"
- path = /obj/item/weapon/extinguisher
- category = "General"
-
-/datum/autolathe/recipe/jar
- name = "jar"
- path = /obj/item/glass_jar
- category = "General"
-
-/datum/autolathe/recipe/crowbar
- name = "crowbar"
- path = /obj/item/weapon/crowbar
- category = "Tools"
-
-/datum/autolathe/recipe/multitool
- name = "multitool"
- path = /obj/item/device/multitool
- category = "Tools"
-
-/datum/autolathe/recipe/t_scanner
- name = "T-ray scanner"
- path = /obj/item/device/t_scanner
- category = "Tools"
-
-/datum/autolathe/recipe/weldertool
- name = "welding tool"
- path = /obj/item/weapon/weldingtool
- category = "Tools"
-
-/datum/autolathe/recipe/screwdriver
- name = "screwdriver"
- path = /obj/item/weapon/screwdriver
- category = "Tools"
-
-/datum/autolathe/recipe/wirecutters
- name = "wirecutters"
- path = /obj/item/weapon/wirecutters
- category = "Tools"
-
-/datum/autolathe/recipe/wrench
- name = "wrench"
- path = /obj/item/weapon/wrench
- category = "Tools"
-
-/datum/autolathe/recipe/hatchet
- name = "hatchet"
- path = /obj/item/weapon/material/hatchet
- category = "Tools"
-
-/datum/autolathe/recipe/minihoe
- name = "mini hoe"
- path = /obj/item/weapon/material/minihoe
- category = "Tools"
-
-/datum/autolathe/recipe/radio_headset
- name = "radio headset"
- path = /obj/item/device/radio/headset
- category = "General"
-
-/datum/autolathe/recipe/radio_bounced
- name = "station bounced radio"
- path = /obj/item/device/radio/off
- category = "General"
-
-/datum/autolathe/recipe/suit_cooler
- name = "suit cooling unit"
- path = /obj/item/device/suit_cooling_unit
- category = "General"
-
-/datum/autolathe/recipe/weldermask
- name = "welding mask"
- path = /obj/item/clothing/head/welding
- category = "General"
-
-/datum/autolathe/recipe/metal
- name = "steel sheets"
- path = /obj/item/stack/material/steel
- category = "General"
- is_stack = 1
-
-/datum/autolathe/recipe/glass
- name = "glass sheets"
- path = /obj/item/stack/material/glass
- category = "General"
- is_stack = 1
-
-/datum/autolathe/recipe/rglass
- name = "reinforced glass sheets"
- path = /obj/item/stack/material/glass/reinforced
- category = "General"
- is_stack = 1
-
-/datum/autolathe/recipe/rods
- name = "metal rods"
- path = /obj/item/stack/rods
- category = "General"
- is_stack = 1
-
-/datum/autolathe/recipe/knife
- name = "kitchen knife"
- path = /obj/item/weapon/material/knife
- category = "General"
-
-/datum/autolathe/recipe/taperecorder
- name = "tape recorder"
- path = /obj/item/device/taperecorder
- category = "General"
-
-/datum/autolathe/recipe/airlockmodule
- name = "airlock electronics"
- path = /obj/item/weapon/airlock_electronics
- category = "Engineering"
-
-/datum/autolathe/recipe/airalarm
- name = "air alarm electronics"
- path = /obj/item/weapon/circuitboard/airalarm
- category = "Engineering"
-
-/datum/autolathe/recipe/firealarm
- name = "fire alarm electronics"
- path = /obj/item/weapon/circuitboard/firealarm
- category = "Engineering"
-
-/datum/autolathe/recipe/powermodule
- name = "power control module"
- path = /obj/item/weapon/module/power_control
- category = "Engineering"
-
-/datum/autolathe/recipe/statusdisplay
- name = "status display electronics"
- path = /obj/item/weapon/circuitboard/status_display
- category = "Engineering"
-
-/datum/autolathe/recipe/aistatusdisplay
- name = "ai status display electronics"
- path = /obj/item/weapon/circuitboard/ai_status_display
- category = "Engineering"
-
-/datum/autolathe/recipe/newscaster
- name = "newscaster electronics"
- path = /obj/item/weapon/circuitboard/newscaster
- category = "Engineering"
-
-/datum/autolathe/recipe/atm
- name = "atm electronics"
- path = /obj/item/weapon/circuitboard/atm
- category = "Engineering"
-
-/datum/autolathe/recipe/intercom
- name = "intercom electronics"
- path = /obj/item/weapon/circuitboard/intercom
- category = "Engineering"
-
-/datum/autolathe/recipe/holopad
- name = "holopad electronics"
- path = /obj/item/weapon/circuitboard/holopad
- category = "Engineering"
-
-/datum/autolathe/recipe/guestpass
- name = "guestpass console electronics"
- path = /obj/item/weapon/circuitboard/guestpass
- category = "Engineering"
-
-/datum/autolathe/recipe/entertainment
- name = "entertainment camera electronics"
- path = /obj/item/weapon/circuitboard/security/telescreen/entertainment
- category = "Engineering"
-
-/datum/autolathe/recipe/keycard
- name = "keycard authenticator electronics"
- path = /obj/item/weapon/circuitboard/keycard_auth
- category = "Engineering"
-
-/datum/autolathe/recipe/photocopier
- name = "photocopier electronics"
- path = /obj/item/weapon/circuitboard/photocopier
- category = "Engineering"
-
-/datum/autolathe/recipe/fax
- name = "fax machine electronics"
- path = /obj/item/weapon/circuitboard/fax
- category = "Engineering"
-
-/datum/autolathe/recipe/microwave
- name = "microwave electronics"
- path = /obj/item/weapon/circuitboard/microwave
- category = "Engineering"
-
-/datum/autolathe/recipe/washing
- name = "washing machine electronics"
- path = /obj/item/weapon/circuitboard/washing
- category = "Engineering"
-
-/datum/autolathe/recipe/request
- name = "request console electronics"
- path = /obj/item/weapon/circuitboard/request
- category = "Engineering"
-
-/datum/autolathe/recipe/motor
- name = "motor"
- path = /obj/item/weapon/stock_parts/motor
- category = "Engineering"
-
-/datum/autolathe/recipe/gear
- name = "gear"
- path = /obj/item/weapon/stock_parts/gear
- category = "Engineering"
-
-/datum/autolathe/recipe/spring
- name = "spring"
- path = /obj/item/weapon/stock_parts/spring
- category = "Engineering"
-
-/datum/autolathe/recipe/rcd_ammo
- name = "matter cartridge"
- path = /obj/item/weapon/rcd_ammo
- category = "Engineering"
-
-/datum/autolathe/recipe/scalpel
- name = "scalpel"
- path = /obj/item/weapon/scalpel
- category = "Medical"
-
-/datum/autolathe/recipe/circularsaw
- name = "circular saw"
- path = /obj/item/weapon/circular_saw
- category = "Medical"
-
-/datum/autolathe/recipe/surgicaldrill
- name = "surgical drill"
- path = /obj/item/weapon/surgicaldrill
- category = "Medical"
-
-/datum/autolathe/recipe/retractor
- name = "retractor"
- path = /obj/item/weapon/retractor
- category = "Medical"
-
-/datum/autolathe/recipe/cautery
- name = "cautery"
- path = /obj/item/weapon/cautery
- category = "Medical"
-
-/datum/autolathe/recipe/hemostat
- name = "hemostat"
- path = /obj/item/weapon/hemostat
- category = "Medical"
-
-/datum/autolathe/recipe/beaker
- name = "glass beaker"
- path = /obj/item/weapon/reagent_containers/glass/beaker
- category = "Medical"
-
-/datum/autolathe/recipe/beaker_large
- name = "large glass beaker"
- path = /obj/item/weapon/reagent_containers/glass/beaker/large
- category = "Medical"
-
-/datum/autolathe/recipe/vial
- name = "glass vial"
- path = /obj/item/weapon/reagent_containers/glass/beaker/vial
- category = "Medical"
-
-/datum/autolathe/recipe/syringe
- name = "syringe"
- path = /obj/item/weapon/reagent_containers/syringe
- category = "Medical"
-
-/datum/autolathe/recipe/syringegun_ammo
- name = "syringe gun cartridge"
- path = /obj/item/weapon/syringe_cartridge
- category = "Arms and Ammunition"
-
-////////////////
-/*Ammo casings*/
-////////////////
-
-/datum/autolathe/recipe/shotgun_blanks
- name = "ammunition (12g, blank)"
- path = /obj/item/ammo_casing/shotgun/blank
- category = "Arms and Ammunition"
-
-/datum/autolathe/recipe/shotgun_beanbag
- name = "ammunition (12g, beanbag)"
- path = /obj/item/ammo_casing/shotgun/beanbag
- category = "Arms and Ammunition"
-
-/datum/autolathe/recipe/shotgun_flash
- name = "ammunition (12g, flash)"
- path = /obj/item/ammo_casing/shotgun/flash
- category = "Arms and Ammunition"
-
-/datum/autolathe/recipe/shotgun
- name = "ammunition (12g, slug)"
- path = /obj/item/ammo_casing/shotgun
- hidden = 1
- category = "Arms and Ammunition"
-
-/datum/autolathe/recipe/shotgun_pellet
- name = "ammunition (12g, pellet)"
- path = /obj/item/ammo_casing/shotgun/pellet
- hidden = 1
- category = "Arms and Ammunition"
-
-/datum/autolathe/recipe/stunshell
- name = "ammunition (stun cartridge, shotgun)"
- path = /obj/item/ammo_casing/shotgun/stunshell
- hidden = 1
- category = "Arms and Ammunition"
-
-//////////////////
-/*Ammo magazines*/
-//////////////////
-
-/////// 5mm
-/*
-/datum/autolathe/recipe/pistol_5mm
- name = "pistol magazine (5mm)"
- path = /obj/item/ammo_magazine/c5mm
- category = "Arms and Ammunition"
- hidden = 1
-*/
-
-/////// .45
-/datum/autolathe/recipe/pistol_45
- name = "pistol magazine (.45)"
- path = /obj/item/ammo_magazine/c45m
- category = "Arms and Ammunition"
- hidden = 1
-
-/datum/autolathe/recipe/pistol_45p
- name = "pistol magazine (.45 practice)"
- path = /obj/item/ammo_magazine/c45m/practice
- category = "Arms and Ammunition"
-
-/datum/autolathe/recipe/pistol_45r
- name = "pistol magazine (.45 rubber)"
- path = /obj/item/ammo_magazine/c45m/rubber
- category = "Arms and Ammunition"
-
-/datum/autolathe/recipe/pistol_45f
- name = "pistol magazine (.45 flash)"
- path = /obj/item/ammo_magazine/c45m/flash
- category = "Arms and Ammunition"
-
-/datum/autolathe/recipe/pistol_45uzi
- name = "uzi magazine (.45)"
- path = /obj/item/ammo_magazine/c45uzi
- category = "Arms and Ammunition"
- hidden = 1
-
-/datum/autolathe/recipe/tommymag
- name = "Tommygun magazine (.45)"
- path = /obj/item/ammo_magazine/tommymag
- category = "Arms and Ammunition"
- hidden = 1
-
-/datum/autolathe/recipe/tommydrum
- name = "Tommygun drum magazine (.45)"
- path = /obj/item/ammo_magazine/tommydrum
- category = "Arms and Ammunition"
- hidden = 1
-
-/////// 9mm
-
-/obj/item/ammo_magazine/mc9mm/flash
- ammo_type = /obj/item/ammo_casing/c9mmf
-
-/obj/item/ammo_magazine/mc9mm/rubber
- name = "magazine (9mm rubber)"
- ammo_type = /obj/item/ammo_casing/c9mmr
-
-/obj/item/ammo_magazine/mc9mm/practice
- name = "magazine (9mm practice)"
- ammo_type = /obj/item/ammo_casing/c9mmp
-
-/datum/autolathe/recipe/pistol_9mm
- name = "pistol magazine (9mm)"
- path = /obj/item/ammo_magazine/mc9mm
- category = "Arms and Ammunition"
- hidden = 1
-
-/datum/autolathe/recipe/pistol_9mmr
- name = "pistol magazine (9mm rubber)"
- path = /obj/item/ammo_magazine/mc9mm/rubber
- category = "Arms and Ammunition"
-
-/datum/autolathe/recipe/pistol_9mmp
- name = "pistol magazine (9mm practice)"
- path = /obj/item/ammo_magazine/mc9mm/practice
- category = "Arms and Ammunition"
-
-/datum/autolathe/recipe/pistol_9mmf
- name = "pistol magazine (9mm flash)"
- path = /obj/item/ammo_magazine/mc9mm/flash
- category = "Arms and Ammunition"
-
-/datum/autolathe/recipe/smg_9mm
- name = "top-mounted SMG magazine (9mm)"
- path = /obj/item/ammo_magazine/mc9mmt
- category = "Arms and Ammunition"
- hidden = 1
-
-/datum/autolathe/recipe/smg_9mmr
- name = "top-mounted SMG magazine (9mm rubber)"
- path = /obj/item/ammo_magazine/mc9mmt/rubber
- category = "Arms and Ammunition"
-
-/datum/autolathe/recipe/smg_9mmp
- name = "top-mounted SMG magazine (9mm practice)"
- path = /obj/item/ammo_magazine/mc9mmt/practice
- category = "Arms and Ammunition"
-
-/datum/autolathe/recipe/smg_9mmf
- name = "top-mounted SMG magazine (9mm flash)"
- path = /obj/item/ammo_magazine/mc9mmt/flash
- category = "Arms and Ammunition"
-
-/////// 10mm
-/datum/autolathe/recipe/smg_10mm
- name = "SMG magazine (10mm)"
- path = /obj/item/ammo_magazine/a10mm
- category = "Arms and Ammunition"
- hidden = 1
-
-/datum/autolathe/recipe/pistol_50
- name = "pistol magazine (.50AE)"
- path = /obj/item/ammo_magazine/a50
- category = "Arms and Ammunition"
- hidden = 1
-
-/////// 5.56mm
-/datum/autolathe/recipe/rifle_556
- name = "10rnd rifle magazine (5.56mm)"
- path = /obj/item/ammo_magazine/a556
- category = "Arms and Ammunition"
- hidden = 1
-
-/datum/autolathe/recipe/rifle_556p
- name = "10rnd rifle magazine (5.56mm practice)"
- path = /obj/item/ammo_magazine/a556/practice
- category = "Arms and Ammunition"
-
-/datum/autolathe/recipe/rifle_556m
- name = "20rnd rifle magazine (5.56mm)"
- path = /obj/item/ammo_magazine/a556m
- category = "Arms and Ammunition"
- hidden = 1
-
-/datum/autolathe/recipe/rifle_556mp
- name = "20rnd rifle magazine (5.56mm practice)"
- path = /obj/item/ammo_magazine/a556m/practice
- category = "Arms and Ammunition"
- hidden = 1
-
-/////// 7.62
-/datum/autolathe/recipe/rifle_small_762
- name = "10rnd rifle magazine (7.62mm)"
- path = /obj/item/ammo_magazine/s762
- category = "Arms and Ammunition"
- hidden = 1
-
-/datum/autolathe/recipe/rifle_762
- name = "20rnd rifle magazine (7.62mm)"
- path = /obj/item/ammo_magazine/c762
- category = "Arms and Ammunition"
- hidden = 1
-
-/datum/autolathe/recipe/machinegun_762
- name = "machinegun box magazine (7.62)"
- path = /obj/item/ammo_magazine/a762
- category = "Arms and Ammunition"
- hidden = 1
-
-/datum/autolathe/recipe/shotgun_magazine
- name = "24rnd shotgun magazine (12g)"
- path = /obj/item/ammo_magazine/g12
- category = "Arms and Ammunition"
- hidden = 1
-
-/* Commented out until autolathe stuff is decided/fixed. Will probably remove these entirely. -Spades
-// These should always be /empty! The idea is to fill them up manually with ammo clips.
-
-/datum/autolathe/recipe/pistol_5mm
- name = "pistol magazine (5mm)"
- path = /obj/item/ammo_magazine/c5mm/empty
- category = "Arms and Ammunition"
- hidden = 1
-
-/datum/autolathe/recipe/smg_5mm
- name = "top-mounted SMG magazine (5mm)"
- path = /obj/item/ammo_magazine/c5mmt/empty
- category = "Arms and Ammunition"
- hidden = 1
-
-/datum/autolathe/recipe/pistol_45
- name = "pistol magazine (.45)"
- path = /obj/item/ammo_magazine/c45m/empty
- category = "Arms and Ammunition"
-
-/datum/autolathe/recipe/pistol_45uzi
- name = "uzi magazine (.45)"
- path = /obj/item/ammo_magazine/c45uzi/empty
- category = "Arms and Ammunition"
- hidden = 1
-
-/datum/autolathe/recipe/tommymag
- name = "Tommygun magazine (.45)"
- path = /obj/item/ammo_magazine/tommymag/empty
- category = "Arms and Ammunition"
- hidden = 1
-
-/datum/autolathe/recipe/tommydrum
- name = "Tommygun drum magazine (.45)"
- path = /obj/item/ammo_magazine/tommydrum/empty
- category = "Arms and Ammunition"
- hidden = 1
-
-/datum/autolathe/recipe/pistol_9mm
- name = "pistol magazine (9mm)"
- path = /obj/item/ammo_magazine/mc9mm/empty
- category = "Arms and Ammunition"
-
-/datum/autolathe/recipe/smg_9mm
- name = "top-mounted SMG magazine (9mm)"
- path = /obj/item/ammo_magazine/mc9mmt/empty
- category = "Arms and Ammunition"
-
-/datum/autolathe/recipe/smg_10mm
- name = "SMG magazine (10mm)"
- path = /obj/item/ammo_magazine/a10mm/empty
- category = "Arms and Ammunition"
- hidden = 1
-
-/datum/autolathe/recipe/pistol_50
- name = "pistol magazine (.50AE)"
- path = /obj/item/ammo_magazine/a50/empty
- category = "Arms and Ammunition"
- hidden = 1
-
-/datum/autolathe/recipe/rifle_556
- name = "10rnd rifle magazine (5.56mm)"
- path = /obj/item/ammo_magazine/a556/empty
- category = "Arms and Ammunition"
-
-/datum/autolathe/recipe/rifle_556m
- name = "20rnd rifle magazine (5.56mm)"
- path = /obj/item/ammo_magazine/a556m/empty
- category = "Arms and Ammunition"
- hidden = 1
-
-/datum/autolathe/recipe/rifle_SVD
- name = "10rnd rifle magazine (7.62mm)"
- path = /obj/item/ammo_magazine/SVD/empty
- category = "Arms and Ammunition"
- hidden = 1
-
-/datum/autolathe/recipe/rifle_762
- name = "20rnd rifle magazine (7.62mm)"
- path = /obj/item/ammo_magazine/c762/empty
- category = "Arms and Ammunition"
- hidden = 1
-
-/datum/autolathe/recipe/machinegun_762
- name = "machinegun box magazine (7.62)"
- path = /obj/item/ammo_magazine/a762/empty
- category = "Arms and Ammunition"
- hidden = 1
-
-/datum/autolathe/recipe/shotgun_magazine
- name = "24rnd shotgun magazine (12g)"
- path = /obj/item/ammo_magazine/g12/empty
- category = "Arms and Ammunition"
- hidden = 1*/
-
-///////////////////////////////
-/*Ammo clips and Speedloaders*/
-///////////////////////////////
-
-/datum/autolathe/recipe/speedloader_357
- name = "speedloader (.357)"
- path = /obj/item/ammo_magazine/a357
- category = "Arms and Ammunition"
- hidden = 1
-
-/datum/autolathe/recipe/speedloader_38
- name = "speedloader (.38)"
- path = /obj/item/ammo_magazine/c38
- category = "Arms and Ammunition"
- hidden = 1
-
-/datum/autolathe/recipe/speedloader_38r
- name = "speedloader (.38 rubber)"
- path = /obj/item/ammo_magazine/c38/rubber
- category = "Arms and Ammunition"
-
-// Commented out until metal exploits with autolathe is fixed.
-/*/datum/autolathe/recipe/pistol_clip_45
- name = "ammo clip (.45)"
- path = /obj/item/ammo_magazine/clip/c45
- category = "Arms and Ammunition"
- hidden = 1
-
-/datum/autolathe/recipe/pistol_clip_45r
- name = "ammo clip (.45 rubber)"
- path = /obj/item/ammo_magazine/clip/c45/rubber
- category = "Arms and Ammunition"
-
-/datum/autolathe/recipe/pistol_clip_45f
- name = "ammo clip (.45 flash)"
- path = /obj/item/ammo_magazine/clip/c45/flash
- category = "Arms and Ammunition"
-
-/datum/autolathe/recipe/pistol_clip_45p
- name = "ammo clip (.45 practice)"
- path = /obj/item/ammo_magazine/clip/c45/practice
- category = "Arms and Ammunition"
-
-/datum/autolathe/recipe/pistol_clip_9mm
- name = "ammo clip (9mm)"
- path = /obj/item/ammo_magazine/clip/c9mm
- category = "Arms and Ammunition"
- hidden = 1
-
-/datum/autolathe/recipe/pistol_clip_9mmr
- name = "ammo clip (9mm rubber)"
- path = /obj/item/ammo_magazine/clip/c9mm/rubber
- category = "Arms and Ammunition"
-
-/datum/autolathe/recipe/pistol_clip_9mmp
- name = "ammo clip (9mm practice)"
- path = /obj/item/ammo_magazine/clip/c9mm/practice
- category = "Arms and Ammunition"
-
-/datum/autolathe/recipe/pistol_clip_9mmf
- name = "ammo clip (9mm flash)"
- path = /obj/item/ammo_magazine/clip/c9mm/flash
- category = "Arms and Ammunition"
-
-/datum/autolathe/recipe/pistol_clip_5mm
- name = "ammo clip (5mm)"
- path = /obj/item/ammo_magazine/clip/c5mm
- category = "Arms and Ammunition"
- hidden = 1
-
-/datum/autolathe/recipe/pistol_clip_10mm
- name = "ammo clip (10mm)"
- path = /obj/item/ammo_magazine/clip/a10mm
- category = "Arms and Ammunition"
- hidden = 1
-
-/datum/autolathe/recipe/pistol_clip_50
- name = "ammo clip (.50AE)"
- path = /obj/item/ammo_magazine/clip/a50
- category = "Arms and Ammunition"
- hidden = 1
-
-/datum/autolathe/recipe/rifle_clip_556
- name = "ammo clip (5.56mm)"
- path = /obj/item/ammo_magazine/clip/a556
- category = "Arms and Ammunition"
- hidden = 1
-
-/datum/autolathe/recipe/rifle_clip_556_practice
- name = "ammo clip (5.56mm practice)"
- path = /obj/item/ammo_magazine/clip/a556/practice
- category = "Arms and Ammunition"
-*/
-
-/datum/autolathe/recipe/rifle_clip_762
- name = "ammo clip (7.62mm)"
- path = /obj/item/ammo_magazine/clip/a762
- category = "Arms and Ammunition"
- hidden = 1
-
-/datum/autolathe/recipe/rifle_clip_762_practice
- name = "ammo clip (7.62mm practice)"
- path = /obj/item/ammo_magazine/clip/a762/practice
- category = "Arms and Ammunition"
-
-//////////////
-
-/datum/autolathe/recipe/consolescreen
- name = "console screen"
- path = /obj/item/weapon/stock_parts/console_screen
- category = "Devices and Components"
-
-/datum/autolathe/recipe/igniter
- name = "igniter"
- path = /obj/item/device/assembly/igniter
- category = "Devices and Components"
-
-/datum/autolathe/recipe/signaler
- name = "signaler"
- path = /obj/item/device/assembly/signaler
- category = "Devices and Components"
-
-/datum/autolathe/recipe/sensor_infra
- name = "infrared sensor"
- path = /obj/item/device/assembly/infra
- category = "Devices and Components"
-
-/datum/autolathe/recipe/timer
- name = "timer"
- path = /obj/item/device/assembly/timer
- category = "Devices and Components"
-
-/datum/autolathe/recipe/sensor_prox
- name = "proximity sensor"
- path = /obj/item/device/assembly/prox_sensor
- category = "Devices and Components"
-
-/datum/autolathe/recipe/tube
- name = "light tube"
- path = /obj/item/weapon/light/tube
- category = "General"
-
-/datum/autolathe/recipe/bulb
- name = "light bulb"
- path = /obj/item/weapon/light/bulb
- category = "General"
-
-/datum/autolathe/recipe/ashtray_glass
- name = "glass ashtray"
- path = /obj/item/weapon/material/ashtray/glass
- category = "General"
-
-/datum/autolathe/recipe/camera_assembly
- name = "camera assembly"
- path = /obj/item/weapon/camera_assembly
- category = "Engineering"
-
-/datum/autolathe/recipe/weldinggoggles
- name = "welding goggles"
- path = /obj/item/clothing/glasses/welding
- category = "General"
-
-/datum/autolathe/recipe/maglight
- name = "maglight"
- path = /obj/item/device/flashlight/maglight
- hidden = 1
- category = "General"
-
-/datum/autolathe/recipe/flamethrower
- name = "flamethrower"
- path = /obj/item/weapon/flamethrower/full
- hidden = 1
- category = "Arms and Ammunition"
-
-/datum/autolathe/recipe/rcd
- name = "rapid construction device"
- path = /obj/item/weapon/rcd
- hidden = 1
- category = "Engineering"
-
-/datum/autolathe/recipe/electropack
- name = "electropack"
- path = /obj/item/device/radio/electropack
- hidden = 1
- category = "Devices and Components"
-
-/datum/autolathe/recipe/beartrap
- name = "mechanical trap"
- path = /obj/item/weapon/beartrap
- hidden = 1
- category = "Devices and Components"
-
-/datum/autolathe/recipe/welder_industrial
- name = "industrial welding tool"
- path = /obj/item/weapon/weldingtool/largetank
- hidden = 1
- category = "Tools"
-
-/datum/autolathe/recipe/handcuffs
- name = "handcuffs"
- path = /obj/item/weapon/handcuffs
- hidden = 1
- category = "General"
-
-/datum/autolathe/recipe/knuckledusters
- name = "knuckle dusters"
- path = /obj/item/weapon/material/knuckledusters
- hidden = 1
- category = "Arms and Ammunition"
-
-/datum/autolathe/recipe/tacknife
- name = "tactical knife"
- path = /obj/item/weapon/material/hatchet/tacknife
- hidden = 1
- category = "Arms and Ammunition"
\ No newline at end of file
diff --git a/code/world.dm b/code/world.dm
index e0cb55b849..1d439428d2 100644
--- a/code/world.dm
+++ b/code/world.dm
@@ -103,8 +103,6 @@ var/global/datum/global_init/init = new ()
for(var/turf/simulated/mineral/M in world) // Ugh.
M.update_icon()
- // Create autolathe recipes, as above.
- populate_lathe_recipes()
// Create robolimbs for chargen.
populate_robolimb_list()
diff --git a/polaris.dme b/polaris.dme
index af9a1e0a46..4c0a8079c6 100644
--- a/polaris.dme
+++ b/polaris.dme
@@ -162,6 +162,7 @@
#include "code\datums\computerfiles.dm"
#include "code\datums\datacore.dm"
#include "code\datums\EPv2.dm"
+#include "code\datums\hierarchy.dm"
#include "code\datums\mind.dm"
#include "code\datums\mixed.dm"
#include "code\datums\modules.dm"
@@ -169,6 +170,13 @@
#include "code\datums\progressbar.dm"
#include "code\datums\recipe.dm"
#include "code\datums\sun.dm"
+#include "code\datums\autolathe\arms.dm"
+#include "code\datums\autolathe\autolathe.dm"
+#include "code\datums\autolathe\devices.dm"
+#include "code\datums\autolathe\engineering.dm"
+#include "code\datums\autolathe\general.dm"
+#include "code\datums\autolathe\medical.dm"
+#include "code\datums\autolathe\tools.dm"
#include "code\datums\helper_datums\construction_datum.dm"
#include "code\datums\helper_datums\events.dm"
#include "code\datums\helper_datums\getrev.dm"
@@ -500,7 +508,6 @@
#include "code\game\machinery\alarm.dm"
#include "code\game\machinery\atmo_control.dm"
#include "code\game\machinery\autolathe.dm"
-#include "code\game\machinery\autolathe_datums.dm"
#include "code\game\machinery\Beacon.dm"
#include "code\game\machinery\biogenerator.dm"
#include "code\game\machinery\bioprinter.dm"