diff --git a/code/datums/components/riding/riding_vehicle.dm b/code/datums/components/riding/riding_vehicle.dm
index 207ef70bae1..89ac28ee065 100644
--- a/code/datums/components/riding/riding_vehicle.dm
+++ b/code/datums/components/riding/riding_vehicle.dm
@@ -267,8 +267,8 @@
var/delay_multiplier = 6.7 // magic number from wheelchair code
var/obj/vehicle/ridden/wheelchair/motorized/our_chair = parent
- for(var/obj/item/stock_parts/manipulator/M in our_chair.contents)
- speed += M.rating
+ for(var/datum/stock_part/manipulator/manipulator in our_chair.component_parts)
+ speed += manipulator.tier
vehicle_move_delay = round(CONFIG_GET(number/movedelay/run_delay) * delay_multiplier) / speed
return ..()
diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm
index 599358adb2e..921134396ef 100644
--- a/code/game/machinery/autolathe.dm
+++ b/code/game/machinery/autolathe.dm
@@ -340,14 +340,14 @@
/obj/machinery/autolathe/RefreshParts()
. = ..()
var/mat_capacity = 0
- for(var/obj/item/stock_parts/matter_bin/new_matter_bin in component_parts)
- mat_capacity += new_matter_bin.rating*75000
+ for(var/datum/stock_part/matter_bin/new_matter_bin in component_parts)
+ mat_capacity += new_matter_bin.tier * 75000
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
materials.max_amount = mat_capacity
var/efficiency=1.8
- for(var/obj/item/stock_parts/manipulator/new_manipulator in component_parts)
- efficiency -= new_manipulator.rating*0.2
+ for(var/datum/stock_part/manipulator/new_manipulator in component_parts)
+ efficiency -= new_manipulator.tier * 0.2
creation_efficiency = max(1,efficiency) // creation_efficiency goes 1.6 -> 1.4 -> 1.2 -> 1 per level of manipulator efficiency
/obj/machinery/autolathe/examine(mob/user)
diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm
index 787172e8f89..e8a594a67c2 100644
--- a/code/game/machinery/cell_charger.dm
+++ b/code/game/machinery/cell_charger.dm
@@ -135,8 +135,8 @@
/obj/machinery/cell_charger/RefreshParts()
. = ..()
charge_rate = 250
- for(var/obj/item/stock_parts/capacitor/C in component_parts)
- charge_rate *= C.rating
+ for(var/datum/stock_part/capacitor/capacitor in component_parts)
+ charge_rate *= capacitor.tier
/obj/machinery/cell_charger/process(delta_time)
if(!charging || !anchored || (machine_stat & (BROKEN|NOPOWER)))
diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm
index e685165c285..bb757d99012 100644
--- a/code/game/machinery/constructable_frame.dm
+++ b/code/game/machinery/constructable_frame.dm
@@ -268,7 +268,6 @@
new_machine.circuit.moveToNullspace()
QDEL_NULL(new_machine.circuit)
for(var/obj/old_part in new_machine.component_parts)
- // Move to nullspace and delete.
old_part.moveToNullspace()
qdel(old_part)
diff --git a/code/game/machinery/dish_drive.dm b/code/game/machinery/dish_drive.dm
index 7ab920d46f5..c5e0d8436e5 100644
--- a/code/game/machinery/dish_drive.dm
+++ b/code/game/machinery/dish_drive.dm
@@ -71,8 +71,8 @@
/obj/machinery/dish_drive/RefreshParts()
. = ..()
var/total_rating = 0
- for(var/obj/item/stock_parts/S in component_parts)
- total_rating += S.rating
+ for(var/datum/stock_part/stock_part in component_parts)
+ total_rating += stock_part.tier
if(total_rating >= 9)
update_mode_power_usage(ACTIVE_POWER_USE, 0)
else
diff --git a/code/game/machinery/dna_scanner.dm b/code/game/machinery/dna_scanner.dm
index cc42d0729e4..412a5833f4f 100644
--- a/code/game/machinery/dna_scanner.dm
+++ b/code/game/machinery/dna_scanner.dm
@@ -23,10 +23,10 @@
precision_coeff = 0
for(var/datum/stock_part/scanning_module/scanning_module in component_parts)
scan_level += scanning_module.tier
- for(var/obj/item/stock_parts/matter_bin/M in component_parts)
- precision_coeff = M.rating
- for(var/obj/item/stock_parts/micro_laser/P in component_parts)
- damage_coeff = P.rating
+ for(var/datum/stock_part/matter_bin/matter_bin in component_parts)
+ precision_coeff = matter_bin.tier
+ for(var/datum/stock_part/micro_laser/micro_laser in component_parts)
+ damage_coeff = micro_laser.tier
/obj/machinery/dna_scannernew/examine(mob/user)
. = ..()
diff --git a/code/game/machinery/fat_sucker.dm b/code/game/machinery/fat_sucker.dm
index 85f78be9a27..d06c514c98e 100644
--- a/code/game/machinery/fat_sucker.dm
+++ b/code/game/machinery/fat_sucker.dm
@@ -39,8 +39,8 @@
/obj/machinery/fat_sucker/RefreshParts()
. = ..()
var/rating = 0
- for(var/obj/item/stock_parts/micro_laser/L in component_parts)
- rating += L.rating
+ for(var/datum/stock_part/micro_laser/micro_laser in component_parts)
+ rating += micro_laser.tier
bite_size = initial(bite_size) + rating * 2.5
nutrient_to_meat = initial(nutrient_to_meat) - rating * 5
diff --git a/code/game/machinery/harvester.dm b/code/game/machinery/harvester.dm
index 9f5ddbd727f..5c7589d7e1b 100644
--- a/code/game/machinery/harvester.dm
+++ b/code/game/machinery/harvester.dm
@@ -25,8 +25,8 @@
. = ..()
interval = 0
var/max_time = 40
- for(var/obj/item/stock_parts/micro_laser/L in component_parts)
- max_time -= L.rating
+ for(var/datum/stock_part/micro_laser/micro_laser in component_parts)
+ max_time -= micro_laser.tier
interval = max(max_time,1)
/obj/machinery/harvester/update_icon_state()
diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm
index 4b499ec6fce..5b812740589 100644
--- a/code/game/machinery/hologram.dm
+++ b/code/game/machinery/hologram.dm
@@ -209,8 +209,8 @@ Possible to do for anyone motivated enough:
/obj/machinery/holopad/RefreshParts()
. = ..()
var/holograph_range = 4
- for(var/obj/item/stock_parts/capacitor/B in component_parts)
- holograph_range += 1 * B.rating
+ for(var/datum/stock_part/capacitor/capacitor in component_parts)
+ holograph_range += 1 * capacitor.tier
holo_range = holograph_range
/obj/machinery/holopad/examine(mob/user)
diff --git a/code/game/machinery/launch_pad.dm b/code/game/machinery/launch_pad.dm
index ee378f2b0ea..ad5c9298768 100644
--- a/code/game/machinery/launch_pad.dm
+++ b/code/game/machinery/launch_pad.dm
@@ -26,8 +26,8 @@
/obj/machinery/launchpad/RefreshParts()
. = ..()
var/max_range_multiplier = 0
- for(var/obj/item/stock_parts/manipulator/M in component_parts)
- max_range_multiplier += M.rating
+ for(var/datum/stock_part/manipulator/manipulator in component_parts)
+ max_range_multiplier += manipulator.tier
range = initial(range)
range *= max_range_multiplier
diff --git a/code/game/machinery/limbgrower.dm b/code/game/machinery/limbgrower.dm
index 1f1152bcd77..6c476d85056 100644
--- a/code/game/machinery/limbgrower.dm
+++ b/code/game/machinery/limbgrower.dm
@@ -255,8 +255,8 @@
reagents.maximum_volume += our_beaker.volume
our_beaker.reagents.trans_to(src, our_beaker.reagents.total_volume)
production_coefficient = 1.25
- for(var/obj/item/stock_parts/manipulator/our_manipulator in component_parts)
- production_coefficient -= our_manipulator.rating * 0.25
+ for(var/datum/stock_part/manipulator/our_manipulator in component_parts)
+ production_coefficient -= our_manipulator.tier * 0.25
production_coefficient = clamp(production_coefficient, 0, 1) // coefficient goes from 1 -> 0.75 -> 0.5 -> 0.25
/obj/machinery/limbgrower/examine(mob/user)
diff --git a/code/game/machinery/medipen_refiller.dm b/code/game/machinery/medipen_refiller.dm
index fc1366f1940..b5c97554865 100644
--- a/code/game/machinery/medipen_refiller.dm
+++ b/code/game/machinery/medipen_refiller.dm
@@ -41,8 +41,8 @@
/obj/machinery/medipen_refiller/RefreshParts()
. = ..()
var/new_volume = 100
- for(var/obj/item/stock_parts/matter_bin/bin in component_parts)
- new_volume += (100 * bin.rating)
+ for(var/datum/stock_part/matter_bin/matter_bin in component_parts)
+ new_volume += (100 * matter_bin.tier)
if(!reagents)
create_reagents(new_volume, TRANSPARENT)
reagents.maximum_volume = new_volume
diff --git a/code/game/machinery/quantum_pad.dm b/code/game/machinery/quantum_pad.dm
index 956b1b07919..e56fbbd72f0 100644
--- a/code/game/machinery/quantum_pad.dm
+++ b/code/game/machinery/quantum_pad.dm
@@ -42,12 +42,12 @@
/obj/machinery/quantumpad/RefreshParts()
. = ..()
var/E = 0
- for(var/obj/item/stock_parts/capacitor/C in component_parts)
- E += C.rating
+ for(var/datum/stock_part/capacitor/capacitor in component_parts)
+ E += capacitor.tier
power_efficiency = E
E = 0
- for(var/obj/item/stock_parts/manipulator/M in component_parts)
- E += M.rating
+ for(var/datum/stock_part/manipulator/manipulator in component_parts)
+ E += manipulator.tier
teleport_speed = initial(teleport_speed)
teleport_speed -= (E*10)
teleport_cooldown = initial(teleport_cooldown)
diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm
index 1000c0a6702..aa26cf3580f 100755
--- a/code/game/machinery/recharger.dm
+++ b/code/game/machinery/recharger.dm
@@ -23,8 +23,8 @@
/obj/machinery/recharger/RefreshParts()
. = ..()
- for(var/obj/item/stock_parts/capacitor/C in component_parts)
- recharge_coeff = C.rating
+ for(var/datum/stock_part/capacitor/capacitor in component_parts)
+ recharge_coeff = capacitor.tier
/obj/machinery/recharger/examine(mob/user)
. = ..()
diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm
index f9ebe95de9e..6bf7e8218c8 100644
--- a/code/game/machinery/rechargestation.dm
+++ b/code/game/machinery/rechargestation.dm
@@ -35,12 +35,12 @@
. = ..()
recharge_speed = 0
repairs = 0
- for(var/obj/item/stock_parts/capacitor/C in component_parts)
- recharge_speed += C.rating * 100
- for(var/obj/item/stock_parts/manipulator/M in component_parts)
- repairs += M.rating - 1
- for(var/obj/item/stock_parts/cell/C in component_parts)
- recharge_speed *= C.maxcharge / 10000
+ for(var/datum/stock_part/capacitor/capacitor in component_parts)
+ recharge_speed += capacitor.tier * 100
+ for(var/datum/stock_part/manipulator/matter_bin in component_parts)
+ repairs += matter_bin.tier - 1
+ for(var/obj/item/stock_parts/cell/cell in component_parts)
+ recharge_speed *= cell.maxcharge / 10000
/obj/machinery/recharge_station/examine(mob/user)
. = ..()
diff --git a/code/game/machinery/recycler.dm b/code/game/machinery/recycler.dm
index eba16b8e43a..6cc27158541 100644
--- a/code/game/machinery/recycler.dm
+++ b/code/game/machinery/recycler.dm
@@ -53,8 +53,8 @@
/obj/machinery/recycler/RefreshParts()
. = ..()
var/amt_made = 0
- for(var/obj/item/stock_parts/manipulator/M in component_parts)
- amt_made = 12.5 * M.rating //% of materials salvaged
+ for(var/datum/stock_part/manipulator/manipulator in component_parts)
+ amt_made = 12.5 * manipulator.tier //% of materials salvaged
amount_produced = min(50, amt_made) + 50
var/datum/component/butchering/butchering = GetComponent(/datum/component/butchering/recycler)
butchering.effectiveness = amount_produced
diff --git a/code/game/machinery/sleepers.dm b/code/game/machinery/sleepers.dm
index 7e668d49c70..bb6c490108c 100644
--- a/code/game/machinery/sleepers.dm
+++ b/code/game/machinery/sleepers.dm
@@ -64,14 +64,14 @@
/obj/machinery/sleeper/RefreshParts()
. = ..()
var/matterbin_rating
- for(var/obj/item/stock_parts/matter_bin/matterbins in component_parts)
- matterbin_rating += matterbins.rating
+ for(var/datum/stock_part/matter_bin/matterbins in component_parts)
+ matterbin_rating += matterbins.tier
efficiency = initial(efficiency) * matterbin_rating
min_health = initial(min_health) * matterbin_rating
available_chems.Cut()
- for(var/obj/item/stock_parts/manipulator/manipulators in component_parts)
- for(var/i in 1 to manipulators.rating)
+ for(var/datum/stock_part/manipulator/manipulators in component_parts)
+ for(var/i in 1 to manipulators.tier)
available_chems |= possible_chems[i]
reset_chem_buttons()
diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm
index 7587ba9efc4..99328d76873 100644
--- a/code/game/machinery/spaceheater.dm
+++ b/code/game/machinery/spaceheater.dm
@@ -158,10 +158,10 @@
. = ..()
var/laser = 0
var/cap = 0
- for(var/obj/item/stock_parts/micro_laser/M in component_parts)
- laser += M.rating
- for(var/obj/item/stock_parts/capacitor/M in component_parts)
- cap += M.rating
+ for(var/datum/stock_part/micro_laser/micro_laser in component_parts)
+ laser += micro_laser.tier
+ for(var/datum/stock_part/capacitor/capacitor in component_parts)
+ cap += capacitor.tier
heating_power = laser * 40000
@@ -445,10 +445,10 @@
. = ..()
var/lasers_rating = 0
var/capacitors_rating = 0
- for(var/obj/item/stock_parts/micro_laser/laser in component_parts)
- lasers_rating += laser.rating
- for(var/obj/item/stock_parts/capacitor/capacitor in component_parts)
- capacitors_rating += capacitor.rating
+ for(var/datum/stock_part/micro_laser/laser in component_parts)
+ lasers_rating += laser.tier
+ for(var/datum/stock_part/capacitor/capacitor in component_parts)
+ capacitors_rating += capacitor.tier
heating_power = lasers_rating * 20000
diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm
index 5160c12d6bd..5ee4c702cf2 100644
--- a/code/game/machinery/teleporter.dm
+++ b/code/game/machinery/teleporter.dm
@@ -26,8 +26,8 @@
/obj/machinery/teleport/hub/RefreshParts()
. = ..()
var/A = 0
- for(var/obj/item/stock_parts/matter_bin/M in component_parts)
- A += M.rating
+ for(var/datum/stock_part/matter_bin/matter_bin in component_parts)
+ A += matter_bin.tier
accuracy = A
/obj/machinery/teleport/hub/examine(mob/user)
@@ -142,8 +142,8 @@
/obj/machinery/teleport/station/RefreshParts()
. = ..()
var/E
- for(var/obj/item/stock_parts/capacitor/C in component_parts)
- E += C.rating
+ for(var/datum/stock_part/capacitor/C in component_parts)
+ E += C.tier
efficiency = E - 1
/obj/machinery/teleport/station/examine(mob/user)
diff --git a/code/game/objects/items/circuitboards/machines/machine_circuitboards.dm b/code/game/objects/items/circuitboards/machines/machine_circuitboards.dm
index d399a2c76e0..d4763b33f08 100644
--- a/code/game/objects/items/circuitboards/machines/machine_circuitboards.dm
+++ b/code/game/objects/items/circuitboards/machines/machine_circuitboards.dm
@@ -6,7 +6,7 @@
build_path = /obj/machinery/bsa/back //No freebies!
specific_parts = TRUE
req_components = list(
- /obj/item/stock_parts/capacitor/quadratic = 5,
+ /datum/stock_part/capacitor/quadratic = 5,
/obj/item/stack/cable_coil = 2)
/obj/item/circuitboard/machine/bsa/front
@@ -15,7 +15,7 @@
build_path = /obj/machinery/bsa/front
specific_parts = TRUE
req_components = list(
- /obj/item/stock_parts/manipulator/femto = 5,
+ /datum/stock_part/manipulator/femto = 5,
/obj/item/stack/cable_coil = 2)
/obj/item/circuitboard/machine/bsa/middle
@@ -32,8 +32,8 @@
build_path = /obj/machinery/dna_vault //No freebies!
specific_parts = TRUE
req_components = list(
- /obj/item/stock_parts/capacitor/super = 5,
- /obj/item/stock_parts/manipulator/pico = 5,
+ /datum/stock_part/capacitor/super = 5,
+ /datum/stock_part/manipulator/pico = 5,
/obj/item/stack/cable_coil = 2)
//Engineering
@@ -51,15 +51,15 @@
greyscale_colors = CIRCUIT_COLOR_ENGINEERING
build_path = /obj/machinery/autolathe
req_components = list(
- /obj/item/stock_parts/matter_bin = 3,
- /obj/item/stock_parts/manipulator = 1,
+ /datum/stock_part/matter_bin = 3,
+ /datum/stock_part/manipulator = 1,
/obj/item/stack/sheet/glass = 1)
/obj/item/circuitboard/machine/grounding_rod
name = "Grounding Rod"
greyscale_colors = CIRCUIT_COLOR_ENGINEERING
build_path = /obj/machinery/power/energy_accumulator/grounding_rod
- req_components = list(/obj/item/stock_parts/capacitor = 1)
+ req_components = list(/datum/stock_part/capacitor = 1)
needs_anchored = FALSE
@@ -68,92 +68,92 @@
greyscale_colors = CIRCUIT_COLOR_ENGINEERING
build_path = /obj/machinery/telecomms/broadcaster
req_components = list(
- /obj/item/stock_parts/manipulator = 2,
+ /datum/stock_part/manipulator = 2,
/obj/item/stack/cable_coil = 1,
- /obj/item/stock_parts/subspace/filter = 1,
- /obj/item/stock_parts/subspace/crystal = 1,
- /obj/item/stock_parts/micro_laser = 2)
+ /datum/stock_part/filter = 1,
+ /datum/stock_part/crystal = 1,
+ /datum/stock_part/micro_laser = 2)
/obj/item/circuitboard/machine/telecomms/bus
name = "Bus Mainframe"
greyscale_colors = CIRCUIT_COLOR_ENGINEERING
build_path = /obj/machinery/telecomms/bus
req_components = list(
- /obj/item/stock_parts/manipulator = 2,
+ /datum/stock_part/manipulator = 2,
/obj/item/stack/cable_coil = 1,
- /obj/item/stock_parts/subspace/filter = 1)
+ /datum/stock_part/filter = 1)
/obj/item/circuitboard/machine/telecomms/hub
name = "Hub Mainframe"
greyscale_colors = CIRCUIT_COLOR_ENGINEERING
build_path = /obj/machinery/telecomms/hub
req_components = list(
- /obj/item/stock_parts/manipulator = 2,
+ /datum/stock_part/manipulator = 2,
/obj/item/stack/cable_coil = 2,
- /obj/item/stock_parts/subspace/filter = 2)
+ /datum/stock_part/filter = 2)
/obj/item/circuitboard/machine/telecomms/message_server
name = "Messaging Server"
greyscale_colors = CIRCUIT_COLOR_ENGINEERING
build_path = /obj/machinery/telecomms/message_server
req_components = list(
- /obj/item/stock_parts/manipulator = 2,
+ /datum/stock_part/manipulator = 2,
/obj/item/stack/cable_coil = 1,
- /obj/item/stock_parts/subspace/filter = 3)
+ /datum/stock_part/filter = 3)
/obj/item/circuitboard/machine/telecomms/processor
name = "Processor Unit"
greyscale_colors = CIRCUIT_COLOR_ENGINEERING
build_path = /obj/machinery/telecomms/processor
req_components = list(
- /obj/item/stock_parts/manipulator = 3,
- /obj/item/stock_parts/subspace/filter = 1,
- /obj/item/stock_parts/subspace/treatment = 2,
- /obj/item/stock_parts/subspace/analyzer = 1,
+ /datum/stock_part/manipulator = 3,
+ /datum/stock_part/filter = 1,
+ /datum/stock_part/treatment = 2,
+ /datum/stock_part/analyzer = 1,
/obj/item/stack/cable_coil = 2,
- /obj/item/stock_parts/subspace/amplifier = 1)
+ /datum/stock_part/amplifier = 1)
/obj/item/circuitboard/machine/telecomms/receiver
name = "Subspace Receiver"
greyscale_colors = CIRCUIT_COLOR_ENGINEERING
build_path = /obj/machinery/telecomms/receiver
req_components = list(
- /obj/item/stock_parts/subspace/ansible = 1,
- /obj/item/stock_parts/subspace/filter = 1,
- /obj/item/stock_parts/manipulator = 2,
- /obj/item/stock_parts/micro_laser = 1)
+ /datum/stock_part/ansible = 1,
+ /datum/stock_part/filter = 1,
+ /datum/stock_part/manipulator = 2,
+ /datum/stock_part/micro_laser = 1)
/obj/item/circuitboard/machine/telecomms/relay
name = "Relay Mainframe"
greyscale_colors = CIRCUIT_COLOR_ENGINEERING
build_path = /obj/machinery/telecomms/relay
req_components = list(
- /obj/item/stock_parts/manipulator = 2,
+ /datum/stock_part/manipulator = 2,
/obj/item/stack/cable_coil = 2,
- /obj/item/stock_parts/subspace/filter = 2)
+ /datum/stock_part/filter = 2)
/obj/item/circuitboard/machine/telecomms/server
name = "Telecommunication Server"
greyscale_colors = CIRCUIT_COLOR_ENGINEERING
build_path = /obj/machinery/telecomms/server
req_components = list(
- /obj/item/stock_parts/manipulator = 2,
+ /datum/stock_part/manipulator = 2,
/obj/item/stack/cable_coil = 1,
- /obj/item/stock_parts/subspace/filter = 1)
+ /datum/stock_part/filter = 1)
/obj/item/circuitboard/machine/tesla_coil
name = "Tesla Controller"
greyscale_colors = CIRCUIT_COLOR_ENGINEERING
desc = "Does not let you shoot lightning from your hands."
build_path = /obj/machinery/power/energy_accumulator/tesla_coil
- req_components = list(/obj/item/stock_parts/capacitor = 1)
+ req_components = list(/datum/stock_part/capacitor = 1)
needs_anchored = FALSE
/obj/item/circuitboard/machine/cell_charger
name = "Cell Charger"
greyscale_colors = CIRCUIT_COLOR_ENGINEERING
build_path = /obj/machinery/cell_charger
- req_components = list(/obj/item/stock_parts/capacitor = 1)
+ req_components = list(/datum/stock_part/capacitor = 1)
needs_anchored = FALSE
/obj/item/circuitboard/machine/circulator
@@ -167,8 +167,8 @@
greyscale_colors = CIRCUIT_COLOR_ENGINEERING
build_path = /obj/machinery/power/emitter
req_components = list(
- /obj/item/stock_parts/micro_laser = 1,
- /obj/item/stock_parts/manipulator = 1)
+ /datum/stock_part/micro_laser = 1,
+ /datum/stock_part/manipulator = 1)
needs_anchored = FALSE
/obj/item/circuitboard/machine/generator
@@ -183,7 +183,7 @@
build_path = /obj/machinery/ntnet_relay
req_components = list(
/obj/item/stack/cable_coil = 2,
- /obj/item/stock_parts/subspace/filter = 1)
+ /datum/stock_part/filter = 1)
/obj/item/circuitboard/machine/pacman
name = "PACMAN-type Generator"
@@ -245,7 +245,7 @@
build_path = /obj/machinery/power/rtg
req_components = list(
/obj/item/stack/cable_coil = 5,
- /obj/item/stock_parts/capacitor = 1,
+ /datum/stock_part/capacitor = 1,
/obj/item/stack/sheet/mineral/uranium = 10) // We have no Pu-238, and this is the closest thing to it.
/obj/item/circuitboard/machine/rtg/advanced
@@ -253,8 +253,8 @@
build_path = /obj/machinery/power/rtg/advanced
req_components = list(
/obj/item/stack/cable_coil = 5,
- /obj/item/stock_parts/capacitor = 1,
- /obj/item/stock_parts/micro_laser = 1,
+ /datum/stock_part/capacitor = 1,
+ /datum/stock_part/micro_laser = 1,
/obj/item/stack/sheet/mineral/uranium = 10,
/obj/item/stack/sheet/mineral/plasma = 5)
@@ -272,7 +272,7 @@
req_components = list(
/obj/item/stack/cable_coil = 5,
/obj/item/stock_parts/cell = 5,
- /obj/item/stock_parts/capacitor = 1)
+ /datum/stock_part/capacitor = 1)
def_components = list(/obj/item/stock_parts/cell = /obj/item/stock_parts/cell/high/empty)
/obj/item/circuitboard/machine/techfab/department/engineering
@@ -286,8 +286,8 @@
build_path = /obj/machinery/atmospherics/components/unary/thermomachine/freezer
var/pipe_layer = PIPING_LAYER_DEFAULT
req_components = list(
- /obj/item/stock_parts/matter_bin = 2,
- /obj/item/stock_parts/micro_laser = 2,
+ /datum/stock_part/matter_bin = 2,
+ /datum/stock_part/micro_laser = 2,
/obj/item/stack/cable_coil = 1,
/obj/item/stack/sheet/glass = 1)
@@ -371,8 +371,8 @@
greyscale_colors = CIRCUIT_COLOR_GENERIC
build_path = /obj/machinery/rnd/production/circuit_imprinter
req_components = list(
- /obj/item/stock_parts/matter_bin = 1,
- /obj/item/stock_parts/manipulator = 1,
+ /datum/stock_part/matter_bin = 1,
+ /datum/stock_part/manipulator = 1,
/obj/item/reagent_containers/cup/beaker = 2)
/obj/item/circuitboard/machine/circuit_imprinter/offstation
@@ -388,7 +388,7 @@
name = "AI Holopad"
greyscale_colors = CIRCUIT_COLOR_GENERIC
build_path = /obj/machinery/holopad
- req_components = list(/obj/item/stock_parts/capacitor = 1)
+ req_components = list(/datum/stock_part/capacitor = 1)
needs_anchored = FALSE //wew lad
var/secure = FALSE
@@ -414,7 +414,7 @@
build_path = /obj/machinery/launchpad
req_components = list(
/obj/item/stack/ore/bluespace_crystal = 1,
- /obj/item/stock_parts/manipulator = 1)
+ /datum/stock_part/manipulator = 1)
def_components = list(/obj/item/stack/ore/bluespace_crystal = /obj/item/stack/ore/bluespace_crystal/artificial)
/obj/item/circuitboard/machine/protolathe
@@ -422,8 +422,8 @@
greyscale_colors = CIRCUIT_COLOR_GENERIC
build_path = /obj/machinery/rnd/production/protolathe
req_components = list(
- /obj/item/stock_parts/matter_bin = 2,
- /obj/item/stock_parts/manipulator = 2,
+ /datum/stock_part/matter_bin = 2,
+ /datum/stock_part/manipulator = 2,
/obj/item/reagent_containers/cup/beaker = 2)
/obj/item/circuitboard/machine/protolathe/offstation
@@ -440,13 +440,13 @@
greyscale_colors = CIRCUIT_COLOR_GENERIC
build_path = /obj/machinery/reagentgrinder/constructed
req_components = list(
- /obj/item/stock_parts/manipulator = 1)
+ /datum/stock_part/manipulator = 1)
needs_anchored = FALSE
/obj/item/circuitboard/machine/smartfridge
name = "Smartfridge"
build_path = /obj/machinery/smartfridge
- req_components = list(/obj/item/stock_parts/matter_bin = 1)
+ req_components = list(/datum/stock_part/matter_bin = 1)
var/static/list/fridges_name_paths = list(/obj/machinery/smartfridge = "plant produce",
/obj/machinery/smartfridge/food = "food",
/obj/machinery/smartfridge/drinks = "drinks",
@@ -486,8 +486,8 @@
greyscale_colors = CIRCUIT_COLOR_GENERIC
build_path = /obj/machinery/space_heater/constructed
req_components = list(
- /obj/item/stock_parts/micro_laser = 1,
- /obj/item/stock_parts/capacitor = 1,
+ /datum/stock_part/micro_laser = 1,
+ /datum/stock_part/capacitor = 1,
/obj/item/stack/cable_coil = 3)
needs_anchored = FALSE
@@ -496,8 +496,8 @@
greyscale_colors = CIRCUIT_COLOR_GENERIC
build_path = /obj/machinery/electrolyzer
req_components = list(
- /obj/item/stock_parts/manipulator = 2,
- /obj/item/stock_parts/capacitor = 2,
+ /datum/stock_part/manipulator = 2,
+ /datum/stock_part/capacitor = 2,
/obj/item/stack/cable_coil = 5,
/obj/item/stack/sheet/glass = 1)
@@ -509,8 +509,8 @@
greyscale_colors = CIRCUIT_COLOR_GENERIC
build_path = /obj/machinery/rnd/production/techfab
req_components = list(
- /obj/item/stock_parts/matter_bin = 2,
- /obj/item/stock_parts/manipulator = 2,
+ /datum/stock_part/matter_bin = 2,
+ /datum/stock_part/manipulator = 2,
/obj/item/reagent_containers/cup/beaker = 2)
/obj/item/circuitboard/machine/techfab/department
@@ -621,9 +621,9 @@
greyscale_colors = CIRCUIT_COLOR_GENERIC
build_path = /obj/machinery/piratepad/civilian
req_components = list(
- /obj/item/stock_parts/card_reader = 1,
+ /datum/stock_part/card_reader = 1,
/datum/stock_part/scanning_module = 1,
- /obj/item/stock_parts/micro_laser = 1
+ /datum/stock_part/micro_laser = 1
)
/obj/item/circuitboard/machine/fax
@@ -631,10 +631,10 @@
greyscale_colors = CIRCUIT_COLOR_GENERIC
build_path = /obj/machinery/fax
req_components = list(
- /obj/item/stock_parts/subspace/crystal = 1,
+ /datum/stock_part/crystal = 1,
/datum/stock_part/scanning_module = 1,
- /obj/item/stock_parts/micro_laser = 1,
- /obj/item/stock_parts/manipulator = 1,)
+ /datum/stock_part/micro_laser = 1,
+ /datum/stock_part/manipulator = 1,)
//Medical
@@ -643,9 +643,9 @@
greyscale_colors = CIRCUIT_COLOR_MEDICAL
build_path = /obj/machinery/chem_dispenser
req_components = list(
- /obj/item/stock_parts/matter_bin = 2,
- /obj/item/stock_parts/capacitor = 1,
- /obj/item/stock_parts/manipulator = 1,
+ /datum/stock_part/matter_bin = 2,
+ /datum/stock_part/capacitor = 1,
+ /datum/stock_part/manipulator = 1,
/obj/item/stack/sheet/glass = 1,
/obj/item/stock_parts/cell = 1)
def_components = list(/obj/item/stock_parts/cell = /obj/item/stock_parts/cell/high)
@@ -655,9 +655,9 @@
build_path = /obj/machinery/chem_dispenser/fullupgrade
specific_parts = TRUE
req_components = list(
- /obj/item/stock_parts/matter_bin/bluespace = 2,
- /obj/item/stock_parts/capacitor/quadratic = 2,
- /obj/item/stock_parts/manipulator/femto = 2,
+ /datum/stock_part/matter_bin/bluespace = 2,
+ /datum/stock_part/capacitor/quadratic = 2,
+ /datum/stock_part/manipulator/femto = 2,
/obj/item/stack/sheet/glass = 1,
/obj/item/stock_parts/cell/bluespace = 1,
)
@@ -666,9 +666,9 @@
build_path = /obj/machinery/chem_dispenser/mutagensaltpeter
specific_parts = TRUE
req_components = list(
- /obj/item/stock_parts/matter_bin/bluespace = 2,
- /obj/item/stock_parts/capacitor/quadratic = 2,
- /obj/item/stock_parts/manipulator/femto = 2,
+ /datum/stock_part/matter_bin/bluespace = 2,
+ /datum/stock_part/capacitor/quadratic = 2,
+ /datum/stock_part/manipulator/femto = 2,
/obj/item/stack/sheet/glass = 1,
/obj/item/stock_parts/cell/bluespace = 1,
)
@@ -680,9 +680,9 @@
build_path = /obj/machinery/chem_dispenser/abductor
specific_parts = TRUE
req_components = list(
- /obj/item/stock_parts/matter_bin/bluespace = 2,
- /obj/item/stock_parts/capacitor/quadratic = 2,
- /obj/item/stock_parts/manipulator/femto = 2,
+ /datum/stock_part/matter_bin/bluespace = 2,
+ /datum/stock_part/capacitor/quadratic = 2,
+ /datum/stock_part/manipulator/femto = 2,
/obj/item/stack/sheet/glass = 1,
/obj/item/stock_parts/cell/bluespace = 1,
)
@@ -693,7 +693,7 @@
greyscale_colors = CIRCUIT_COLOR_MEDICAL
build_path = /obj/machinery/chem_heater
req_components = list(
- /obj/item/stock_parts/micro_laser = 1,
+ /datum/stock_part/micro_laser = 1,
/obj/item/stack/sheet/glass = 1)
/obj/item/circuitboard/machine/chem_mass_spec
@@ -701,7 +701,7 @@
greyscale_colors = CIRCUIT_COLOR_MEDICAL
build_path = /obj/machinery/chem_mass_spec
req_components = list(
- /obj/item/stock_parts/micro_laser = 1,
+ /datum/stock_part/micro_laser = 1,
/obj/item/stack/cable_coil = 5)
/obj/item/circuitboard/machine/chem_master
@@ -711,7 +711,7 @@
desc = "You can turn the \"mode selection\" dial using a screwdriver."
req_components = list(
/obj/item/reagent_containers/cup/beaker = 2,
- /obj/item/stock_parts/manipulator = 1,
+ /datum/stock_part/manipulator = 1,
/obj/item/stack/sheet/glass = 1)
needs_anchored = FALSE
@@ -733,7 +733,7 @@
greyscale_colors = CIRCUIT_COLOR_MEDICAL
build_path = /obj/machinery/atmospherics/components/unary/cryo_cell
req_components = list(
- /obj/item/stock_parts/matter_bin = 1,
+ /datum/stock_part/matter_bin = 1,
/obj/item/stack/cable_coil = 1,
/obj/item/stack/sheet/glass = 4)
@@ -741,14 +741,14 @@
name = "Lipid Extractor"
greyscale_colors = CIRCUIT_COLOR_MEDICAL
build_path = /obj/machinery/fat_sucker
- req_components = list(/obj/item/stock_parts/micro_laser = 1,
+ req_components = list(/datum/stock_part/micro_laser = 1,
/obj/item/kitchen/fork = 1)
/obj/item/circuitboard/machine/harvester
name = "Harvester"
greyscale_colors = CIRCUIT_COLOR_MEDICAL
build_path = /obj/machinery/harvester
- req_components = list(/obj/item/stock_parts/micro_laser = 4)
+ req_components = list(/datum/stock_part/micro_laser = 4)
/obj/item/circuitboard/machine/medical_kiosk
name = "Medical Kiosk"
@@ -779,7 +779,7 @@
greyscale_colors = CIRCUIT_COLOR_MEDICAL
build_path = /obj/machinery/limbgrower
req_components = list(
- /obj/item/stock_parts/manipulator = 1,
+ /datum/stock_part/manipulator = 1,
/obj/item/reagent_containers/cup/beaker = 2,
/obj/item/stack/sheet/glass = 1)
@@ -788,7 +788,7 @@
greyscale_colors = CIRCUIT_COLOR_MEDICAL
build_path = /obj/machinery/limbgrower
req_components = list(
- /obj/item/stock_parts/manipulator/femto = 1,
+ /datum/stock_part/manipulator/femto = 1,
/obj/item/reagent_containers/cup/beaker/bluespace = 2,
/obj/item/stack/sheet/glass = 1)
@@ -802,16 +802,16 @@
greyscale_colors = CIRCUIT_COLOR_MEDICAL
build_path = /obj/machinery/sleeper
req_components = list(
- /obj/item/stock_parts/matter_bin = 1,
- /obj/item/stock_parts/manipulator = 1,
+ /datum/stock_part/matter_bin = 1,
+ /datum/stock_part/manipulator = 1,
/obj/item/stack/cable_coil = 1,
/obj/item/stack/sheet/glass = 2)
/obj/item/circuitboard/machine/sleeper/fullupgrade
build_path = /obj/machinery/sleeper/syndie/fullupgrade
req_components = list(
- /obj/item/stock_parts/matter_bin/bluespace = 1,
- /obj/item/stock_parts/manipulator/femto = 1,
+ /datum/stock_part/matter_bin/bluespace = 1,
+ /datum/stock_part/manipulator/femto = 1,
/obj/item/stack/cable_coil = 1,
/obj/item/stack/sheet/glass = 2)
@@ -824,9 +824,9 @@
greyscale_colors = CIRCUIT_COLOR_MEDICAL
build_path = /obj/machinery/smoke_machine
req_components = list(
- /obj/item/stock_parts/matter_bin = 2,
- /obj/item/stock_parts/capacitor = 1,
- /obj/item/stock_parts/manipulator = 1,
+ /datum/stock_part/matter_bin = 2,
+ /datum/stock_part/capacitor = 1,
+ /datum/stock_part/manipulator = 1,
/obj/item/stack/sheet/glass = 1,
/obj/item/stock_parts/cell = 1)
needs_anchored = FALSE
@@ -837,15 +837,15 @@
build_path = /obj/machinery/stasis
req_components = list(
/obj/item/stack/cable_coil = 3,
- /obj/item/stock_parts/manipulator = 1,
- /obj/item/stock_parts/capacitor = 1)
+ /datum/stock_part/manipulator = 1,
+ /datum/stock_part/capacitor = 1)
/obj/item/circuitboard/machine/medipen_refiller
name = "Medipen Refiller"
greyscale_colors = CIRCUIT_COLOR_MEDICAL
build_path = /obj/machinery/medipen_refiller
req_components = list(
- /obj/item/stock_parts/matter_bin = 1)
+ /datum/stock_part/matter_bin = 1)
/obj/item/circuitboard/machine/techfab/department/medical
name = "\improper Departmental Techfab - Medical"
@@ -864,9 +864,9 @@
greyscale_colors = CIRCUIT_COLOR_SCIENCE
build_path = /obj/machinery/recharge_station
req_components = list(
- /obj/item/stock_parts/capacitor = 2,
+ /datum/stock_part/capacitor = 2,
/obj/item/stock_parts/cell = 1,
- /obj/item/stock_parts/manipulator = 1)
+ /datum/stock_part/manipulator = 1)
def_components = list(/obj/item/stock_parts/cell = /obj/item/stock_parts/cell/high)
/obj/item/circuitboard/machine/destructive_analyzer
@@ -875,8 +875,8 @@
build_path = /obj/machinery/rnd/destructive_analyzer
req_components = list(
/datum/stock_part/scanning_module = 1,
- /obj/item/stock_parts/manipulator = 1,
- /obj/item/stock_parts/micro_laser = 1)
+ /datum/stock_part/manipulator = 1,
+ /datum/stock_part/micro_laser = 1)
/obj/item/circuitboard/machine/experimentor
name = "E.X.P.E.R.I-MENTOR"
@@ -884,8 +884,8 @@
build_path = /obj/machinery/rnd/experimentor
req_components = list(
/datum/stock_part/scanning_module = 1,
- /obj/item/stock_parts/manipulator = 2,
- /obj/item/stock_parts/micro_laser = 2)
+ /datum/stock_part/manipulator = 2,
+ /datum/stock_part/micro_laser = 2)
/obj/item/circuitboard/machine/mech_recharger
name = "Mechbay Recharger"
@@ -893,16 +893,16 @@
build_path = /obj/machinery/mech_bay_recharge_port
req_components = list(
/obj/item/stack/cable_coil = 2,
- /obj/item/stock_parts/capacitor = 5)
+ /datum/stock_part/capacitor = 5)
/obj/item/circuitboard/machine/mechfab
name = "Exosuit Fabricator"
greyscale_colors = CIRCUIT_COLOR_SCIENCE
build_path = /obj/machinery/mecha_part_fabricator
req_components = list(
- /obj/item/stock_parts/matter_bin = 2,
- /obj/item/stock_parts/manipulator = 1,
- /obj/item/stock_parts/micro_laser = 1,
+ /datum/stock_part/matter_bin = 2,
+ /datum/stock_part/manipulator = 1,
+ /datum/stock_part/micro_laser = 1,
/obj/item/stack/sheet/glass = 1)
/obj/item/circuitboard/machine/monkey_recycler
@@ -910,8 +910,8 @@
greyscale_colors = CIRCUIT_COLOR_SCIENCE
build_path = /obj/machinery/monkey_recycler
req_components = list(
- /obj/item/stock_parts/matter_bin = 1,
- /obj/item/stock_parts/manipulator = 1)
+ /datum/stock_part/matter_bin = 1,
+ /datum/stock_part/manipulator = 1)
needs_anchored = FALSE
/obj/item/circuitboard/machine/processor/slime
@@ -930,8 +930,8 @@
build_path = /obj/machinery/quantumpad
req_components = list(
/obj/item/stack/ore/bluespace_crystal = 1,
- /obj/item/stock_parts/capacitor = 1,
- /obj/item/stock_parts/manipulator = 1,
+ /datum/stock_part/capacitor = 1,
+ /datum/stock_part/manipulator = 1,
/obj/item/stack/cable_coil = 1)
def_components = list(/obj/item/stack/ore/bluespace_crystal = /obj/item/stack/ore/bluespace_crystal/artificial)
@@ -954,7 +954,7 @@
build_path = /obj/machinery/teleport/hub
req_components = list(
/obj/item/stack/ore/bluespace_crystal = 3,
- /obj/item/stock_parts/matter_bin = 1)
+ /datum/stock_part/matter_bin = 1)
def_components = list(/obj/item/stack/ore/bluespace_crystal = /obj/item/stack/ore/bluespace_crystal/artificial)
/obj/item/circuitboard/machine/teleporter_station
@@ -963,7 +963,7 @@
build_path = /obj/machinery/teleport/station
req_components = list(
/obj/item/stack/ore/bluespace_crystal = 2,
- /obj/item/stock_parts/capacitor = 2,
+ /datum/stock_part/capacitor = 2,
/obj/item/stack/sheet/glass = 1)
def_components = list(/obj/item/stack/ore/bluespace_crystal = /obj/item/stack/ore/bluespace_crystal/artificial)
@@ -973,8 +973,8 @@
build_path = /obj/machinery/dna_scannernew
req_components = list(
/datum/stock_part/scanning_module = 1,
- /obj/item/stock_parts/matter_bin = 1,
- /obj/item/stock_parts/micro_laser = 1,
+ /datum/stock_part/matter_bin = 1,
+ /datum/stock_part/micro_laser = 1,
/obj/item/stack/sheet/glass = 1,
/obj/item/stack/cable_coil = 2)
@@ -984,8 +984,8 @@
build_path = /obj/machinery/dna_infuser
req_components = list(
/datum/stock_part/scanning_module = 1,
- /obj/item/stock_parts/matter_bin = 1,
- /obj/item/stock_parts/micro_laser = 1,
+ /datum/stock_part/matter_bin = 1,
+ /datum/stock_part/micro_laser = 1,
/obj/item/stack/cable_coil = 2,
)
@@ -1012,7 +1012,7 @@
name = "Weapon Recharger"
greyscale_colors = CIRCUIT_COLOR_SECURITY
build_path = /obj/machinery/recharger
- req_components = list(/obj/item/stock_parts/capacitor = 1)
+ req_components = list(/datum/stock_part/capacitor = 1)
needs_anchored = FALSE
/obj/item/circuitboard/machine/techfab/department/security
@@ -1027,8 +1027,8 @@
greyscale_colors = CIRCUIT_COLOR_SERVICE
build_path = /obj/machinery/biogenerator
req_components = list(
- /obj/item/stock_parts/matter_bin = 1,
- /obj/item/stock_parts/manipulator = 1,
+ /datum/stock_part/matter_bin = 1,
+ /datum/stock_part/manipulator = 1,
/obj/item/stack/cable_coil = 1,
/obj/item/stack/sheet/glass = 1)
@@ -1040,9 +1040,9 @@
/obj/item/circuitboard/machine/chem_dispenser/drinks/fullupgrade
build_path = /obj/machinery/chem_dispenser/drinks/fullupgrade
req_components = list(
- /obj/item/stock_parts/matter_bin/bluespace = 2,
- /obj/item/stock_parts/capacitor/quadratic = 2,
- /obj/item/stock_parts/manipulator/femto = 2,
+ /datum/stock_part/matter_bin/bluespace = 2,
+ /datum/stock_part/capacitor/quadratic = 2,
+ /datum/stock_part/manipulator/femto = 2,
/obj/item/stack/sheet/glass = 1,
/obj/item/stock_parts/cell/bluespace = 1,
)
@@ -1055,9 +1055,9 @@
/obj/item/circuitboard/machine/chem_dispenser/drinks/beer/fullupgrade
build_path = /obj/machinery/chem_dispenser/drinks/beer/fullupgrade
req_components = list(
- /obj/item/stock_parts/matter_bin/bluespace = 2,
- /obj/item/stock_parts/capacitor/quadratic = 2,
- /obj/item/stock_parts/manipulator/femto = 2,
+ /datum/stock_part/matter_bin/bluespace = 2,
+ /datum/stock_part/capacitor/quadratic = 2,
+ /datum/stock_part/manipulator/femto = 2,
/obj/item/stack/sheet/glass = 1,
/obj/item/stock_parts/cell/bluespace = 1,
)
@@ -1071,21 +1071,21 @@
name = "Deep Fryer"
greyscale_colors = CIRCUIT_COLOR_SERVICE
build_path = /obj/machinery/deepfryer
- req_components = list(/obj/item/stock_parts/micro_laser = 1)
+ req_components = list(/datum/stock_part/micro_laser = 1)
needs_anchored = FALSE
/obj/item/circuitboard/machine/griddle
name = "Griddle"
greyscale_colors = CIRCUIT_COLOR_SERVICE
build_path = /obj/machinery/griddle
- req_components = list(/obj/item/stock_parts/micro_laser = 1)
+ req_components = list(/datum/stock_part/micro_laser = 1)
needs_anchored = FALSE
/obj/item/circuitboard/machine/oven
name = "Oven"
greyscale_colors = CIRCUIT_COLOR_SERVICE
build_path = /obj/machinery/oven
- req_components = list(/obj/item/stock_parts/micro_laser = 1)
+ req_components = list(/datum/stock_part/micro_laser = 1)
needs_anchored = FALSE
/obj/item/circuitboard/machine/dish_drive
@@ -1094,8 +1094,8 @@
build_path = /obj/machinery/dish_drive
req_components = list(
/obj/item/stack/sheet/glass = 1,
- /obj/item/stock_parts/manipulator = 1,
- /obj/item/stock_parts/matter_bin = 2)
+ /datum/stock_part/manipulator = 1,
+ /datum/stock_part/matter_bin = 2)
var/suction = TRUE
var/transmit = TRUE
needs_anchored = FALSE
@@ -1120,8 +1120,8 @@
greyscale_colors = CIRCUIT_COLOR_SERVICE
build_path = /obj/machinery/gibber
req_components = list(
- /obj/item/stock_parts/matter_bin = 1,
- /obj/item/stock_parts/manipulator = 1)
+ /datum/stock_part/matter_bin = 1,
+ /datum/stock_part/manipulator = 1)
needs_anchored = FALSE
/obj/item/circuitboard/machine/hydroponics
@@ -1129,8 +1129,8 @@
greyscale_colors = CIRCUIT_COLOR_SERVICE
build_path = /obj/machinery/hydroponics/constructable
req_components = list(
- /obj/item/stock_parts/matter_bin = 2,
- /obj/item/stock_parts/manipulator = 1,
+ /datum/stock_part/matter_bin = 2,
+ /datum/stock_part/manipulator = 1,
/obj/item/stack/sheet/glass = 1)
needs_anchored = FALSE
@@ -1139,8 +1139,8 @@
greyscale_colors = CIRCUIT_COLOR_SERVICE
build_path = /obj/machinery/microwave
req_components = list(
- /obj/item/stock_parts/micro_laser = 1,
- /obj/item/stock_parts/matter_bin = 1,
+ /datum/stock_part/micro_laser = 1,
+ /datum/stock_part/matter_bin = 1,
/obj/item/stack/cable_coil = 2,
/obj/item/stack/sheet/glass = 2)
needs_anchored = FALSE
@@ -1150,8 +1150,8 @@
greyscale_colors = CIRCUIT_COLOR_SERVICE
build_path = /obj/machinery/processor
req_components = list(
- /obj/item/stock_parts/matter_bin = 1,
- /obj/item/stock_parts/manipulator = 1)
+ /datum/stock_part/matter_bin = 1,
+ /datum/stock_part/manipulator = 1)
needs_anchored = FALSE
/obj/item/circuitboard/machine/processor/screwdriver_act(mob/living/user, obj/item/tool)
@@ -1175,7 +1175,7 @@
greyscale_colors = CIRCUIT_COLOR_SERVICE
build_path = /obj/machinery/recycler
req_components = list(
- /obj/item/stock_parts/manipulator = 1)
+ /datum/stock_part/manipulator = 1)
needs_anchored = FALSE
/obj/item/circuitboard/machine/seed_extractor
@@ -1183,8 +1183,8 @@
greyscale_colors = CIRCUIT_COLOR_SERVICE
build_path = /obj/machinery/seed_extractor
req_components = list(
- /obj/item/stock_parts/matter_bin = 1,
- /obj/item/stock_parts/manipulator = 1)
+ /datum/stock_part/matter_bin = 1,
+ /datum/stock_part/manipulator = 1)
needs_anchored = FALSE
/obj/item/circuitboard/machine/techfab/department/service
@@ -1197,7 +1197,7 @@
greyscale_colors = CIRCUIT_COLOR_SERVICE
build_path = /obj/structure/displaycase/forsale
req_components = list(
- /obj/item/stock_parts/card_reader = 1)
+ /datum/stock_part/card_reader = 1)
//Supply
/obj/item/circuitboard/machine/ore_redemption
@@ -1206,9 +1206,9 @@
build_path = /obj/machinery/mineral/ore_redemption
req_components = list(
/obj/item/stack/sheet/glass = 1,
- /obj/item/stock_parts/matter_bin = 1,
- /obj/item/stock_parts/micro_laser = 1,
- /obj/item/stock_parts/manipulator = 1,
+ /datum/stock_part/matter_bin = 1,
+ /datum/stock_part/micro_laser = 1,
+ /datum/stock_part/manipulator = 1,
/obj/item/assembly/igniter = 1)
needs_anchored = FALSE
@@ -1228,8 +1228,8 @@
greyscale_colors = CIRCUIT_COLOR_SUPPLY
build_path = /obj/machinery/mineral/stacking_machine
req_components = list(
- /obj/item/stock_parts/manipulator = 2,
- /obj/item/stock_parts/matter_bin = 2)
+ /datum/stock_part/manipulator = 2,
+ /datum/stock_part/matter_bin = 2)
/obj/item/circuitboard/machine/stacking_unit_console
name = "Stacking Machine Console"
@@ -1250,9 +1250,9 @@
build_path = /obj/machinery/rnd/bepis
req_components = list(
/obj/item/stack/cable_coil = 5,
- /obj/item/stock_parts/capacitor = 1,
- /obj/item/stock_parts/manipulator = 1,
- /obj/item/stock_parts/micro_laser = 1,
+ /datum/stock_part/capacitor = 1,
+ /datum/stock_part/manipulator = 1,
+ /datum/stock_part/micro_laser = 1,
/datum/stock_part/scanning_module = 1)
//Misc
@@ -1261,8 +1261,8 @@
greyscale_colors = CIRCUIT_COLOR_SUPPLY
build_path = /obj/machinery/sheetifier
req_components = list(
- /obj/item/stock_parts/manipulator = 2,
- /obj/item/stock_parts/matter_bin = 2)
+ /datum/stock_part/manipulator = 2,
+ /datum/stock_part/matter_bin = 2)
needs_anchored = FALSE
/obj/item/circuitboard/machine/restaurant_portal
@@ -1280,19 +1280,19 @@
name_extension = "(Void Core)"
build_path = /obj/machinery/power/rtg/abductor
req_components = list(
- /obj/item/stock_parts/capacitor = 1,
- /obj/item/stock_parts/micro_laser = 1,
+ /datum/stock_part/capacitor = 1,
+ /datum/stock_part/micro_laser = 1,
/obj/item/stock_parts/cell/infinite/abductor = 1)
def_components = list(
- /obj/item/stock_parts/capacitor = /obj/item/stock_parts/capacitor/quadratic,
- /obj/item/stock_parts/micro_laser = /obj/item/stock_parts/micro_laser/quadultra)
+ /datum/stock_part/capacitor = /datum/stock_part/capacitor/quadratic,
+ /datum/stock_part/micro_laser = /datum/stock_part/micro_laser/quadultra)
/obj/item/circuitboard/machine/hypnochair
name = "Enhanced Interrogation Chamber"
greyscale_colors = CIRCUIT_COLOR_SECURITY
build_path = /obj/machinery/hypnochair
req_components = list(
- /obj/item/stock_parts/micro_laser = 2,
+ /datum/stock_part/micro_laser = 2,
/datum/stock_part/scanning_module = 2
)
@@ -1302,7 +1302,7 @@
build_path = /obj/machinery/plumbing/receiver
req_components = list(
/obj/item/stack/ore/bluespace_crystal = 1,
- /obj/item/stock_parts/capacitor = 2,
+ /datum/stock_part/capacitor = 2,
/obj/item/stack/sheet/glass = 1)
def_components = list(/obj/item/stack/ore/bluespace_crystal = /obj/item/stack/ore/bluespace_crystal/artificial)
needs_anchored = FALSE
@@ -1311,8 +1311,8 @@
name = "Skill Station"
build_path = /obj/machinery/skill_station
req_components = list(
- /obj/item/stock_parts/matter_bin = 2,
- /obj/item/stock_parts/micro_laser = 2,
+ /datum/stock_part/matter_bin = 2,
+ /datum/stock_part/micro_laser = 2,
/datum/stock_part/scanning_module = 2
)
@@ -1321,16 +1321,16 @@
greyscale_colors = CIRCUIT_COLOR_SCIENCE
build_path = /obj/machinery/destructive_scanner
req_components = list(
- /obj/item/stock_parts/micro_laser = 2,
- /obj/item/stock_parts/matter_bin = 1,
- /obj/item/stock_parts/manipulator = 2)
+ /datum/stock_part/micro_laser = 2,
+ /datum/stock_part/matter_bin = 1,
+ /datum/stock_part/manipulator = 2)
/obj/item/circuitboard/machine/doppler_array
name = "Tachyon-Doppler Research Array"
greyscale_colors = CIRCUIT_COLOR_SCIENCE
build_path = /obj/machinery/doppler_array
req_components = list(
- /obj/item/stock_parts/micro_laser = 2,
+ /datum/stock_part/micro_laser = 2,
/datum/stock_part/scanning_module = 4)
/obj/item/circuitboard/machine/exoscanner
@@ -1338,7 +1338,7 @@
greyscale_colors = CIRCUIT_COLOR_SCIENCE
build_path = /obj/machinery/exoscanner
req_components = list(
- /obj/item/stock_parts/micro_laser = 4,
+ /datum/stock_part/micro_laser = 4,
/datum/stock_part/scanning_module = 4)
/obj/item/circuitboard/machine/exodrone_launcher
@@ -1346,7 +1346,7 @@
greyscale_colors = CIRCUIT_COLOR_SCIENCE
build_path = /obj/machinery/exodrone_launcher
req_components = list(
- /obj/item/stock_parts/micro_laser = 4,
+ /datum/stock_part/micro_laser = 4,
/datum/stock_part/scanning_module = 4)
/obj/item/circuitboard/machine/ecto_sniffer
@@ -1363,7 +1363,7 @@
req_components = list(
/obj/item/stack/sheet/plasteel = 15,
/datum/stock_part/scanning_module = 1,
- /obj/item/stock_parts/manipulator = 1,
+ /datum/stock_part/manipulator = 1,
)
/obj/item/circuitboard/machine/tank_compressor
@@ -1382,9 +1382,9 @@
req_components = list(
/obj/item/stack/sheet/glass = 1,
/obj/item/reagent_containers/cup/beaker = 2,
- /obj/item/stock_parts/water_recycler = 1,
- /obj/item/stock_parts/capacitor = 1,
- /obj/item/stock_parts/micro_laser = 1,
+ /datum/stock_part/water_recycler = 1,
+ /datum/stock_part/capacitor = 1,
+ /datum/stock_part/micro_laser = 1,
)
/obj/item/circuitboard/machine/coffeemaker/impressa
@@ -1394,7 +1394,7 @@
req_components = list(
/obj/item/stack/sheet/glass = 1,
/obj/item/reagent_containers/cup/beaker = 2,
- /obj/item/stock_parts/water_recycler = 1,
- /obj/item/stock_parts/capacitor/adv = 1,
- /obj/item/stock_parts/micro_laser/high = 2,
+ /datum/stock_part/water_recycler = 1,
+ /datum/stock_part/capacitor/adv = 1,
+ /datum/stock_part/micro_laser/high = 2,
)
diff --git a/code/modules/atmospherics/machinery/components/electrolyzer/electrolyzer.dm b/code/modules/atmospherics/machinery/components/electrolyzer/electrolyzer.dm
index 7002f644339..89486599740 100644
--- a/code/modules/atmospherics/machinery/components/electrolyzer/electrolyzer.dm
+++ b/code/modules/atmospherics/machinery/components/electrolyzer/electrolyzer.dm
@@ -144,14 +144,14 @@
/obj/machinery/electrolyzer/RefreshParts()
. = ..()
- var/manipulator = 0
+ var/power = 0
var/cap = 0
- for(var/obj/item/stock_parts/manipulator/M in component_parts)
- manipulator += M.rating
- for(var/obj/item/stock_parts/capacitor/M in component_parts)
- cap += M.rating
+ for(var/datum/stock_part/manipulator/manipulator in component_parts)
+ power += manipulator.tier
+ for(var/datum/stock_part/capacitor/capacitor in component_parts)
+ cap += capacitor.tier
- working_power = manipulator //used in the amount of moles processed
+ working_power = power //used in the amount of moles processed
efficiency = (cap + 1) * 0.5 //used in the amount of charge in power cell uses
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm
index 2ed200d399c..5607cdb4331 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm
@@ -153,8 +153,8 @@
/obj/machinery/atmospherics/components/unary/cryo_cell/RefreshParts()
. = ..()
var/C
- for(var/obj/item/stock_parts/matter_bin/M in component_parts)
- C += M.rating
+ for(var/datum/stock_part/matter_bin/M in component_parts)
+ C += M.tier
efficiency = initial(efficiency) * C
sleep_factor = initial(sleep_factor) * C
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm
index 111380b92d3..7245efbbc1a 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm
@@ -63,13 +63,13 @@
/obj/machinery/atmospherics/components/unary/thermomachine/RefreshParts()
. = ..()
var/calculated_bin_rating = 0
- for(var/obj/item/stock_parts/matter_bin/bin in component_parts)
- calculated_bin_rating += bin.rating
+ for(var/datum/stock_part/matter_bin/bin in component_parts)
+ calculated_bin_rating += bin.tier
heat_capacity = 5000 * ((calculated_bin_rating - 1) ** 2)
var/calculated_laser_rating = 0
- for(var/obj/item/stock_parts/micro_laser/laser in component_parts)
- calculated_laser_rating += laser.rating
+ for(var/datum/stock_part/micro_laser/laser in component_parts)
+ calculated_laser_rating += laser.tier
min_temperature = max(T0C - (base_cooling + calculated_laser_rating * 15), TCMB) //73.15K with T1 stock parts
max_temperature = T20C + (base_heating * calculated_laser_rating) //573.15K with T1 stock parts
diff --git a/code/modules/cargo/markets/market_telepad.dm b/code/modules/cargo/markets/market_telepad.dm
index 707c1e158a5..f5a3e412917 100644
--- a/code/modules/cargo/markets/market_telepad.dm
+++ b/code/modules/cargo/markets/market_telepad.dm
@@ -4,8 +4,8 @@
build_path = /obj/machinery/ltsrbt
req_components = list(
/obj/item/stack/ore/bluespace_crystal = 2,
- /obj/item/stock_parts/subspace/ansible = 1,
- /obj/item/stock_parts/micro_laser = 1,
+ /datum/stock_part/ansible = 1,
+ /datum/stock_part/micro_laser = 1,
/datum/stock_part/scanning_module = 2)
def_components = list(/obj/item/stack/ore/bluespace_crystal = /obj/item/stack/ore/bluespace_crystal/artificial)
@@ -56,8 +56,8 @@
recharge_cooldown = recharge_time
power_efficiency = 0
- for(var/obj/item/stock_parts/micro_laser/laser in component_parts)
- power_efficiency += laser.rating
+ for(var/datum/stock_part/micro_laser/laser in component_parts)
+ power_efficiency += laser.tier
// Shouldn't happen but you never know.
if(!power_efficiency)
power_efficiency = 1
diff --git a/code/modules/experisci/experiment/experiments.dm b/code/modules/experisci/experiment/experiments.dm
index f707d10efda..843314f9ea4 100644
--- a/code/modules/experisci/experiment/experiments.dm
+++ b/code/modules/experisci/experiment/experiments.dm
@@ -262,7 +262,7 @@
/obj/machinery/chem_heater = 3,
/obj/machinery/power/emitter = 3
)
- required_stock_part = /obj/item/stock_parts/micro_laser/high
+ required_stock_part = /datum/stock_part/micro_laser/high
/datum/experiment/scanning/points/machinery_pinpoint_scan/tier2_capacitors
name = "Advanced Capacitors Benchmark"
@@ -278,7 +278,7 @@
/obj/machinery/chem_dispenser/drinks = 3, /*actually having only the chem dispenser works for scanning soda/booze dispensers but im not quite sure how would i go about actually pointing that out w/o these two lines*/
/obj/machinery/chem_dispenser/drinks/beer = 3
)
- required_stock_part = /obj/item/stock_parts/capacitor/adv
+ required_stock_part = /datum/stock_part/capacitor/adv
/datum/experiment/scanning/points/machinery_pinpoint_scan/tier2_scanmodules
name = "Advanced Scanning Modules Calibration"
@@ -291,7 +291,7 @@
/obj/machinery/piratepad/civilian = 2,
/obj/machinery/rnd/bepis = 3
)
- required_stock_part = /obj/item/stock_parts/scanning_module/adv
+ required_stock_part = /datum/stock_part/scanning_module/adv
/datum/experiment/scanning/points/machinery_pinpoint_scan/tier3_cells
name = "Power Cells Capacity Test"
@@ -319,7 +319,7 @@
/obj/machinery/chem_heater = 2,
/obj/machinery/chem_mass_spec = 3
)
- required_stock_part = /obj/item/stock_parts/micro_laser/ultra
+ required_stock_part = /datum/stock_part/micro_laser/ultra
/datum/experiment/scanning/random/mecha_damage_scan
name = "Exosuit Materials 1: Stress Failure Test"
diff --git a/code/modules/food_and_drinks/machinery/coffeemaker.dm b/code/modules/food_and_drinks/machinery/coffeemaker.dm
index 8a56cd127cc..59078a5d692 100644
--- a/code/modules/food_and_drinks/machinery/coffeemaker.dm
+++ b/code/modules/food_and_drinks/machinery/coffeemaker.dm
@@ -65,8 +65,8 @@
/obj/machinery/coffeemaker/RefreshParts()
. = ..()
speed = 0
- for(var/obj/item/stock_parts/micro_laser/laser in component_parts)
- speed += laser.rating
+ for(var/datum/stock_part/micro_laser/laser in component_parts)
+ speed += laser.tier
/obj/machinery/coffeemaker/examine(mob/user)
. = ..()
diff --git a/code/modules/food_and_drinks/machinery/deep_fryer.dm b/code/modules/food_and_drinks/machinery/deep_fryer.dm
index 59bdb34b343..5e1b4c48acb 100644
--- a/code/modules/food_and_drinks/machinery/deep_fryer.dm
+++ b/code/modules/food_and_drinks/machinery/deep_fryer.dm
@@ -68,8 +68,8 @@ GLOBAL_LIST_INIT(oilfry_blacklisted_items, typecacheof(list(
/obj/machinery/deepfryer/RefreshParts()
. = ..()
var/oil_efficiency = 0
- for(var/obj/item/stock_parts/micro_laser/laser in component_parts)
- oil_efficiency += laser.rating
+ for(var/datum/stock_part/micro_laser/laser in component_parts)
+ oil_efficiency += laser.tier
oil_use = initial(oil_use) - (oil_efficiency * 0.00475)
fry_speed = oil_efficiency
diff --git a/code/modules/food_and_drinks/machinery/gibber.dm b/code/modules/food_and_drinks/machinery/gibber.dm
index f7b3d60d4ee..04a04d6c8cc 100644
--- a/code/modules/food_and_drinks/machinery/gibber.dm
+++ b/code/modules/food_and_drinks/machinery/gibber.dm
@@ -27,19 +27,19 @@
. = ..()
gibtime = 40
meat_produced = initial(meat_produced)
- for(var/obj/item/stock_parts/matter_bin/B in component_parts)
- meat_produced += B.rating
- for(var/obj/item/stock_parts/manipulator/M in component_parts)
- gibtime -= 5 * M.rating
- if(M.rating >= 2)
+ for(var/datum/stock_part/matter_bin/matter_bin in component_parts)
+ meat_produced += matter_bin.tier
+ for(var/datum/stock_part/manipulator/manipulator in component_parts)
+ gibtime -= 5 * manipulator.tier
+ if(manipulator.tier >= 2)
ignore_clothing = TRUE
/obj/machinery/gibber/examine(mob/user)
. = ..()
if(in_range(user, src) || isobserver(user))
. += span_notice("The status display reads: Outputting [meat_produced] meat slab(s) after [gibtime*0.1] seconds of processing.")
- for(var/obj/item/stock_parts/manipulator/M in component_parts)
- if(M.rating >= 2)
+ for(var/datum/stock_part/manipulator/manipulator in component_parts)
+ if(manipulator.tier >= 2)
. += span_notice("[src] has been upgraded to process inorganic materials.")
/obj/machinery/gibber/update_overlays()
diff --git a/code/modules/food_and_drinks/machinery/microwave.dm b/code/modules/food_and_drinks/machinery/microwave.dm
index 6a455cd8a61..dec71cc6a1f 100644
--- a/code/modules/food_and_drinks/machinery/microwave.dm
+++ b/code/modules/food_and_drinks/machinery/microwave.dm
@@ -85,10 +85,10 @@
/obj/machinery/microwave/RefreshParts()
. = ..()
efficiency = 0
- for(var/obj/item/stock_parts/micro_laser/M in component_parts)
- efficiency += M.rating
- for(var/obj/item/stock_parts/matter_bin/M in component_parts)
- max_n_of_items = 10 * M.rating
+ for(var/datum/stock_part/micro_laser/micro_laser in component_parts)
+ efficiency += micro_laser.tier
+ for(var/datum/stock_part/matter_bin/matter_bin in component_parts)
+ max_n_of_items = 10 * matter_bin.tier
break
/obj/machinery/microwave/examine(mob/user)
diff --git a/code/modules/food_and_drinks/machinery/monkeyrecycler.dm b/code/modules/food_and_drinks/machinery/monkeyrecycler.dm
index be112bf5b95..a11a0b8c3db 100644
--- a/code/modules/food_and_drinks/machinery/monkeyrecycler.dm
+++ b/code/modules/food_and_drinks/machinery/monkeyrecycler.dm
@@ -28,11 +28,10 @@ GLOBAL_LIST_EMPTY(monkey_recyclers)
/obj/machinery/monkey_recycler/RefreshParts() //Ranges from 0.2 to 0.8 per monkey recycled
. = ..()
cube_production = 0
- for(var/obj/item/stock_parts/manipulator/B in component_parts)
- //cube_production += B.rating * 0.1 //ORIGINAL
- cube_production += B.rating * 0.2 //SKYRAT EDIT CHANGE - buffs to allow 1.2 cubes per monkey at T4
- for(var/obj/item/stock_parts/matter_bin/M in component_parts)
- cube_production += M.rating * 0.1
+ for(var/datum/stock_part/manipulator/manipulator in component_parts)
+ cube_production += manipulator.tier * 0.2 // SKYRAT EDIT CHANGE - buffs to allow 1.2 cubes per monkey at T4 - ORIGINAL: cube_production += manipulator.tier * 0.1
+ for(var/datum/stock_part/matter_bin/matter_bin in component_parts)
+ cube_production += matter_bin.tier * 0.2 // SKYRAT EDIT CHANGE - buffs to allow 1.2 cubes per monkey at T4 - ORIGINAL: cube_production += matter_bin.tier * 0.1
/obj/machinery/monkey_recycler/examine(mob/user)
. = ..()
diff --git a/code/modules/food_and_drinks/machinery/processor.dm b/code/modules/food_and_drinks/machinery/processor.dm
index a8283f9d746..b26e5714175 100644
--- a/code/modules/food_and_drinks/machinery/processor.dm
+++ b/code/modules/food_and_drinks/machinery/processor.dm
@@ -40,10 +40,10 @@
/obj/machinery/processor/RefreshParts()
. = ..()
- for(var/obj/item/stock_parts/matter_bin/B in component_parts)
- rating_amount = B.rating
- for(var/obj/item/stock_parts/manipulator/M in component_parts)
- rating_speed = M.rating
+ for(var/datum/stock_part/matter_bin/matter_bin in component_parts)
+ rating_amount = matter_bin.tier
+ for(var/datum/stock_part/manipulator/manipulator in component_parts)
+ rating_speed = manipulator.tier
/obj/machinery/processor/examine(mob/user)
. = ..()
diff --git a/code/modules/food_and_drinks/machinery/smartfridge.dm b/code/modules/food_and_drinks/machinery/smartfridge.dm
index 1010efb3ec7..d32afbe79a0 100644
--- a/code/modules/food_and_drinks/machinery/smartfridge.dm
+++ b/code/modules/food_and_drinks/machinery/smartfridge.dm
@@ -34,8 +34,8 @@
/obj/machinery/smartfridge/RefreshParts()
. = ..()
- for(var/obj/item/stock_parts/matter_bin/B in component_parts)
- max_n_of_items = 1500 * B.rating
+ for(var/datum/stock_part/matter_bin/matter_bin in component_parts)
+ max_n_of_items = 1500 * matter_bin.tier
/obj/machinery/smartfridge/examine(mob/user)
. = ..()
@@ -269,19 +269,6 @@
base_build_path = /obj/machinery/smartfridge/drying_rack //should really be seeing this without admin fuckery.
var/drying = FALSE
-/obj/machinery/smartfridge/drying_rack/Initialize(mapload)
- . = ..()
-
- // Cache the old_parts first, we'll delete it after we've changed component_parts to a new list.
- // This stops handle_atom_del being called on every part when not necessary.
- var/list/old_parts = component_parts.Copy()
-
- component_parts = null
- circuit = null
-
- QDEL_LIST(old_parts)
- RefreshParts()
-
/obj/machinery/smartfridge/drying_rack/on_deconstruction()
new /obj/item/stack/sheet/mineral/wood(drop_location(), 10)
..()
@@ -458,9 +445,9 @@
/obj/machinery/smartfridge/organ/RefreshParts()
. = ..()
- for(var/obj/item/stock_parts/matter_bin/B in component_parts)
- max_n_of_items = 20 * B.rating
- repair_rate = max(0, STANDARD_ORGAN_HEALING * (B.rating - 1) * 0.5)
+ for(var/datum/stock_part/matter_bin/matter_bin in component_parts)
+ max_n_of_items = 20 * matter_bin.tier
+ repair_rate = max(0, STANDARD_ORGAN_HEALING * (matter_bin.tier - 1) * 0.5)
/obj/machinery/smartfridge/organ/process(delta_time)
for(var/obj/item/organ/organ in contents)
diff --git a/code/modules/hydroponics/biogenerator.dm b/code/modules/hydroponics/biogenerator.dm
index 5edd7944e3e..3c9b76764b3 100644
--- a/code/modules/hydroponics/biogenerator.dm
+++ b/code/modules/hydroponics/biogenerator.dm
@@ -86,13 +86,13 @@
var/new_max_items = 10
var/new_processed_items_per_cycle = 0
- for(var/obj/item/stock_parts/matter_bin/bin in component_parts)
- new_max_items += MAX_ITEMS_PER_RATING * bin.rating
+ for(var/datum/stock_part/matter_bin/bin in component_parts)
+ new_max_items += MAX_ITEMS_PER_RATING * bin.tier
- for(var/obj/item/stock_parts/manipulator/manipulator in component_parts)
- new_productivity += manipulator.rating
- new_efficiency += manipulator.rating
- new_processed_items_per_cycle += PROCESSED_ITEMS_PER_RATING * manipulator.rating
+ for(var/datum/stock_part/manipulator/manipulator in component_parts)
+ new_productivity += manipulator.tier
+ new_efficiency += manipulator.tier
+ new_processed_items_per_cycle += PROCESSED_ITEMS_PER_RATING * manipulator.tier
max_items = new_max_items
efficiency = new_efficiency
diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm
index e229d461a79..000eabb1716 100644
--- a/code/modules/hydroponics/hydroponics.dm
+++ b/code/modules/hydroponics/hydroponics.dm
@@ -162,10 +162,10 @@
/obj/machinery/hydroponics/constructable/RefreshParts()
. = ..()
var/tmp_capacity = 0
- for (var/obj/item/stock_parts/matter_bin/M in component_parts)
- tmp_capacity += M.rating
- for (var/obj/item/stock_parts/manipulator/M in component_parts)
- rating = M.rating
+ for (var/datum/stock_part/matter_bin/matter_bin in component_parts)
+ tmp_capacity += matter_bin.tier
+ for (var/datum/stock_part/manipulator/manipulator in component_parts)
+ rating = manipulator.tier
maxwater = tmp_capacity * 50 // Up to 300
maxnutri = (tmp_capacity * 5) + STATIC_NUTRIENT_CAPACITY // Up to 50 Maximum
reagents.maximum_volume = maxnutri
diff --git a/code/modules/hydroponics/seed_extractor.dm b/code/modules/hydroponics/seed_extractor.dm
index 1d418e30e67..3520ebf3827 100644
--- a/code/modules/hydroponics/seed_extractor.dm
+++ b/code/modules/hydroponics/seed_extractor.dm
@@ -90,10 +90,10 @@
/obj/machinery/seed_extractor/RefreshParts()
. = ..()
- for(var/obj/item/stock_parts/matter_bin/B in component_parts)
- max_seeds = initial(max_seeds) * B.rating
- for(var/obj/item/stock_parts/manipulator/M in component_parts)
- seed_multiplier = initial(seed_multiplier) * M.rating
+ for(var/datum/stock_part/matter_bin/matter_bin in component_parts)
+ max_seeds = initial(max_seeds) * matter_bin.tier
+ for(var/datum/stock_part/manipulator/manipulator in component_parts)
+ seed_multiplier = initial(seed_multiplier) * manipulator.tier
/obj/machinery/seed_extractor/examine(mob/user)
. = ..()
diff --git a/code/modules/power/rtg.dm b/code/modules/power/rtg.dm
index 4982de1a750..fa9130d114c 100644
--- a/code/modules/power/rtg.dm
+++ b/code/modules/power/rtg.dm
@@ -28,8 +28,8 @@
/obj/machinery/power/rtg/RefreshParts()
. = ..()
var/part_level = 0
- for(var/obj/item/stock_parts/SP in component_parts)
- part_level += SP.rating
+ for(var/datum/stock_part/stock_part in component_parts)
+ part_level += stock_part.tier
power_gen = initial(power_gen) * part_level
diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm
index 9ef6428fd81..a8d78769a4b 100644
--- a/code/modules/power/singularity/emitter.dm
+++ b/code/modules/power/singularity/emitter.dm
@@ -87,15 +87,15 @@
var/fire_shoot_delay = 12 SECONDS
var/min_fire_delay = 2.4 SECONDS
var/power_usage = 350
- for(var/obj/item/stock_parts/micro_laser/laser in component_parts)
- max_fire_delay -= 2 SECONDS * laser.rating
- min_fire_delay -= 0.4 SECONDS * laser.rating
- fire_shoot_delay -= 2 SECONDS * laser.rating
+ for(var/datum/stock_part/micro_laser/laser in component_parts)
+ max_fire_delay -= 2 SECONDS * laser.tier
+ min_fire_delay -= 0.4 SECONDS * laser.tier
+ fire_shoot_delay -= 2 SECONDS * laser.tier
maximum_fire_delay = max_fire_delay
minimum_fire_delay = min_fire_delay
fire_delay = fire_shoot_delay
- for(var/obj/item/stock_parts/manipulator/manipulator in component_parts)
- power_usage -= 50 * manipulator.rating
+ for(var/datum/stock_part/manipulator/manipulator in component_parts)
+ power_usage -= 50 * manipulator.tier
update_mode_power_usage(ACTIVE_POWER_USE, power_usage)
/obj/machinery/power/emitter/examine(mob/user)
diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm
index 8a0e62f516e..f30a20bd7aa 100644
--- a/code/modules/power/smes.dm
+++ b/code/modules/power/smes.dm
@@ -65,8 +65,8 @@
var/IO = 0
var/MC = 0
var/C
- for(var/obj/item/stock_parts/capacitor/CP in component_parts)
- IO += CP.rating
+ for(var/datum/stock_part/capacitor/capacitor in component_parts)
+ IO += capacitor.tier
input_level_max = initial(input_level_max) * IO
output_level_max = initial(output_level_max) * IO
for(var/obj/item/stock_parts/cell/PC in component_parts)
diff --git a/code/modules/power/tesla/coil.dm b/code/modules/power/tesla/coil.dm
index ff4e3bec14c..93a15708bfa 100644
--- a/code/modules/power/tesla/coil.dm
+++ b/code/modules/power/tesla/coil.dm
@@ -42,9 +42,9 @@
. = ..()
var/power_multiplier = 0
zap_cooldown = 100
- for(var/obj/item/stock_parts/capacitor/C in component_parts)
- power_multiplier += C.rating
- zap_cooldown -= (C.rating * 20)
+ for(var/datum/stock_part/capacitor/capacitor in component_parts)
+ power_multiplier += capacitor.tier
+ zap_cooldown -= (capacitor.tier * 20)
input_power_multiplier = max(1 * (power_multiplier / 8), 0.25) //Max out at 50% efficency.
/obj/machinery/power/energy_accumulator/tesla_coil/examine(mob/user)
diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm
index 950c987d94f..926699d54f1 100644
--- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm
+++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm
@@ -471,24 +471,28 @@
recharge_amount = initial(recharge_amount)
var/newpowereff = 0.0666666
var/parts_rating = 0
- for(var/obj/item/stock_parts/cell/P in component_parts)
- cell = P
- for(var/obj/item/stock_parts/matter_bin/M in component_parts)
- newpowereff += 0.0166666666*M.rating
- parts_rating += M.rating
- for(var/obj/item/stock_parts/capacitor/C in component_parts)
- recharge_amount *= C.rating
- parts_rating += C.rating
- for(var/obj/item/stock_parts/manipulator/M in component_parts)
- if (M.rating > 1)
+ for(var/obj/item/stock_parts/cell/stock_cell in component_parts)
+ cell = stock_cell
+ for(var/datum/stock_part/matter_bin/matter_bin in component_parts)
+ newpowereff += 0.0166666666 * matter_bin.tier
+ parts_rating += matter_bin.tier
+ for(var/datum/stock_part/capacitor/capacitor in component_parts)
+ recharge_amount *= capacitor.tier
+ parts_rating += capacitor.tier
+ for(var/datum/stock_part/manipulator/manipulator in component_parts)
+ /* SKYRAT EDIT - ORIGINAL
+ if (manipulator.tier > 3)
dispensable_reagents |= upgrade_reagents
+ */
//SKYRAT EDIT START
- if (M.rating > 2)
+ if (manipulator.tier > 1)
+ dispensable_reagents |= upgrade_reagents
+ if (manipulator.tier > 2)
dispensable_reagents |= upgrade_reagents2
- if (M.rating > 3)
+ if (manipulator.tier > 3)
dispensable_reagents |= upgrade_reagents3
//SKYRAT EDIT END
- parts_rating += M.rating
+ parts_rating += manipulator.tier
powerefficiency = round(newpowereff, 0.01)
/obj/machinery/chem_dispenser/proc/replace_beaker(mob/living/user, obj/item/reagent_containers/new_beaker)
diff --git a/code/modules/reagents/chemistry/machinery/chem_heater.dm b/code/modules/reagents/chemistry/machinery/chem_heater.dm
index 3ca1c7a2673..a7e3276be16 100644
--- a/code/modules/reagents/chemistry/machinery/chem_heater.dm
+++ b/code/modules/reagents/chemistry/machinery/chem_heater.dm
@@ -91,8 +91,8 @@
/obj/machinery/chem_heater/RefreshParts()
. = ..()
heater_coefficient = 0.1
- for(var/obj/item/stock_parts/micro_laser/M in component_parts)
- heater_coefficient *= M.rating
+ for(var/datum/stock_part/micro_laser/micro_laser in component_parts)
+ heater_coefficient *= micro_laser.tier
/obj/machinery/chem_heater/examine(mob/user)
. = ..()
diff --git a/code/modules/reagents/chemistry/machinery/chem_mass_spec.dm b/code/modules/reagents/chemistry/machinery/chem_mass_spec.dm
index 2205cf784ee..612d221d3b2 100644
--- a/code/modules/reagents/chemistry/machinery/chem_mass_spec.dm
+++ b/code/modules/reagents/chemistry/machinery/chem_mass_spec.dm
@@ -55,8 +55,8 @@ This will not clean any inverted reagents. Inverted reagents will still be corre
/obj/machinery/chem_mass_spec/RefreshParts()
. = ..()
cms_coefficient = 1
- for(var/obj/item/stock_parts/micro_laser/laser in component_parts)
- cms_coefficient /= laser.rating
+ for(var/datum/stock_part/micro_laser/laser in component_parts)
+ cms_coefficient /= laser.tier
/obj/machinery/chem_mass_spec/deconstruct(disassembled)
if(beaker1)
diff --git a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm
index 03433ed4ca3..3f2e7bec6d6 100644
--- a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm
+++ b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm
@@ -67,8 +67,8 @@
/obj/machinery/reagentgrinder/RefreshParts()
. = ..()
speed = 1
- for(var/obj/item/stock_parts/manipulator/M in component_parts)
- speed = M.rating
+ for(var/datum/stock_part/manipulator/manipulator in component_parts)
+ speed = manipulator.tier
/obj/machinery/reagentgrinder/examine(mob/user)
. = ..()
diff --git a/code/modules/reagents/chemistry/machinery/smoke_machine.dm b/code/modules/reagents/chemistry/machinery/smoke_machine.dm
index 768a3edf2ed..160e0aa1788 100644
--- a/code/modules/reagents/chemistry/machinery/smoke_machine.dm
+++ b/code/modules/reagents/chemistry/machinery/smoke_machine.dm
@@ -38,8 +38,8 @@
. = ..()
create_reagents(REAGENTS_BASE_VOLUME, INJECTABLE)
AddComponent(/datum/component/plumbing/simple_demand)
- for(var/obj/item/stock_parts/matter_bin/B in component_parts)
- reagents.maximum_volume += REAGENTS_BASE_VOLUME * B.rating
+ for(var/datum/stock_part/matter_bin/B in component_parts)
+ reagents.maximum_volume += REAGENTS_BASE_VOLUME * B.tier
if(is_operational)
begin_processing()
@@ -54,8 +54,8 @@
/obj/machinery/smoke_machine/RefreshParts()
. = ..()
var/new_volume = REAGENTS_BASE_VOLUME
- for(var/obj/item/stock_parts/matter_bin/B in component_parts)
- new_volume += REAGENTS_BASE_VOLUME * B.rating
+ for(var/datum/stock_part/matter_bin/B in component_parts)
+ new_volume += REAGENTS_BASE_VOLUME * B.tier
if(!reagents)
create_reagents(new_volume, INJECTABLE)
reagents.maximum_volume = new_volume
@@ -63,11 +63,11 @@
reagents.expose(loc, TOUCH) // if someone manages to downgrade it without deconstructing
reagents.clear_reagents()
efficiency = 18
- for(var/obj/item/stock_parts/capacitor/C in component_parts)
- efficiency += 2 * C.rating
+ for(var/datum/stock_part/capacitor/C in component_parts)
+ efficiency += 2 * C.tier
max_range = 1
- for(var/obj/item/stock_parts/manipulator/M in component_parts)
- max_range += M.rating
+ for(var/datum/stock_part/manipulator/M in component_parts)
+ max_range += M.tier
max_range = max(3, max_range)
/obj/machinery/smoke_machine/on_set_is_operational(old_value)
diff --git a/code/modules/research/bepis.dm b/code/modules/research/bepis.dm
index a7f94a65831..d875543e6f1 100644
--- a/code/modules/research/bepis.dm
+++ b/code/modules/research/bepis.dm
@@ -92,14 +92,14 @@
var/M = 0
var/L = 0
var/S = 0
- for(var/obj/item/stock_parts/capacitor/Cap in component_parts)
- C += ((Cap.rating - 1) * 0.1)
+ for(var/datum/stock_part/capacitor/capacitor in component_parts)
+ C += ((capacitor.tier - 1) * 0.1)
power_saver = 1 - C
- for(var/obj/item/stock_parts/manipulator/Manip in component_parts)
- M += ((Manip.rating - 1) * PART_CASH_OFFSET_AMOUNT)
+ for(var/datum/stock_part/manipulator/manipulator in component_parts)
+ M += ((manipulator.tier - 1) * PART_CASH_OFFSET_AMOUNT)
positive_cash_offset = M
- for(var/obj/item/stock_parts/micro_laser/Laser in component_parts)
- L += ((Laser.rating - 1) * PART_CASH_OFFSET_AMOUNT)
+ for(var/datum/stock_part/micro_laser/Laser in component_parts)
+ L += ((Laser.tier - 1) * PART_CASH_OFFSET_AMOUNT)
negative_cash_offset = L
for(var/datum/stock_part/scanning_module/scanning_module in component_parts)
S += ((scanning_module.tier - 1) * 0.25)
diff --git a/code/modules/research/destructive_analyzer.dm b/code/modules/research/destructive_analyzer.dm
index 200576794a5..2d1e786208c 100644
--- a/code/modules/research/destructive_analyzer.dm
+++ b/code/modules/research/destructive_analyzer.dm
@@ -16,8 +16,8 @@ Note: Must be placed within 3 tiles of the R&D Console
/obj/machinery/rnd/destructive_analyzer/RefreshParts()
. = ..()
var/T = 0
- for(var/obj/item/stock_parts/S in component_parts)
- T += S.rating
+ for(var/datum/stock_part/stock_part in component_parts)
+ T += stock_part.tier
decon_mod = T
/obj/machinery/rnd/destructive_analyzer/proc/ConvertReqString2List(list/source_list)
diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm
index 18444656670..269a65eb32f 100644
--- a/code/modules/research/experimentor.dm
+++ b/code/modules/research/experimentor.dm
@@ -110,12 +110,12 @@
. = ..()
malfunction_probability_coeff = malfunction_probability_coeff_modifier
resetTime = initial(resetTime)
- for(var/obj/item/stock_parts/manipulator/M in component_parts)
- resetTime = max(1, resetTime - M.rating)
+ for(var/datum/stock_part/manipulator/manipulator in component_parts)
+ resetTime = max(1, resetTime - manipulator.tier)
for(var/datum/stock_part/scanning_module/scanning_module in component_parts)
malfunction_probability_coeff += scanning_module.tier * 2
- for(var/obj/item/stock_parts/micro_laser/M in component_parts)
- malfunction_probability_coeff += M.rating
+ for(var/datum/stock_part/micro_laser/micro_laser in component_parts)
+ malfunction_probability_coeff += micro_laser.tier
/obj/machinery/rnd/experimentor/examine(mob/user)
. = ..()
diff --git a/code/modules/research/machinery/_production.dm b/code/modules/research/machinery/_production.dm
index a1c0da557d2..d80691d2f65 100644
--- a/code/modules/research/machinery/_production.dm
+++ b/code/modules/research/machinery/_production.dm
@@ -200,15 +200,15 @@
if(materials)
var/total_storage = 0
- for(var/obj/item/stock_parts/matter_bin/bin in component_parts)
- total_storage += bin.rating * 75000
+ for(var/datum/stock_part/matter_bin/bin in component_parts)
+ total_storage += bin.tier * 75000
materials.set_local_size(total_storage)
var/total_rating = 1.2
- for(var/obj/item/stock_parts/manipulator/manipulator in component_parts)
- total_rating -= manipulator.rating * 0.1
+ for(var/datum/stock_part/manipulator/manipulator in component_parts)
+ total_rating -= manipulator.tier * 0.1
efficiency_coeff = max(total_rating, 0)
diff --git a/code/modules/research/machinery/circuit_imprinter.dm b/code/modules/research/machinery/circuit_imprinter.dm
index 0691f035528..850393eb85f 100644
--- a/code/modules/research/machinery/circuit_imprinter.dm
+++ b/code/modules/research/machinery/circuit_imprinter.dm
@@ -11,8 +11,8 @@
var/rating = 0
- for(var/obj/item/stock_parts/manipulator/manipulator in component_parts)
- rating += manipulator.rating // There is only one.
+ for(var/datum/stock_part/manipulator/manipulator in component_parts)
+ rating += manipulator.tier // There is only one.
efficiency_coeff = 0.5 ** max(rating - 1, 0) // One sheet, half sheet, quarter sheet, eighth sheet.
diff --git a/code/modules/research/stock_parts/stock_part_datum.dm b/code/modules/research/stock_parts/stock_part_datum.dm
index eb8780979d5..b0ce031ae98 100644
--- a/code/modules/research/stock_parts/stock_part_datum.dm
+++ b/code/modules/research/stock_parts/stock_part_datum.dm
@@ -72,14 +72,129 @@ GLOBAL_LIST_INIT(stock_part_datums, generate_stock_part_datums())
physical_object_type = /obj/item/stock_parts/scanning_module
physical_object_base_type = /obj/item/stock_parts/scanning_module
-/datum/stock_part/scanning_module/tier2
+/datum/stock_part/scanning_module/adv
tier = 2
physical_object_type = /obj/item/stock_parts/scanning_module/adv
-/datum/stock_part/scanning_module/tier3
+/datum/stock_part/scanning_module/phasic
tier = 3
physical_object_type = /obj/item/stock_parts/scanning_module/phasic
-/datum/stock_part/scanning_module/tier4
+/datum/stock_part/scanning_module/triphasic
tier = 4
physical_object_type = /obj/item/stock_parts/scanning_module/triphasic
+
+/datum/stock_part/capacitor
+ tier = 1
+ physical_object_type = /obj/item/stock_parts/capacitor
+ physical_object_base_type = /obj/item/stock_parts/capacitor
+
+/datum/stock_part/capacitor/adv
+ tier = 2
+ physical_object_type = /obj/item/stock_parts/capacitor/adv
+
+/datum/stock_part/capacitor/super
+ tier = 3
+ physical_object_type = /obj/item/stock_parts/capacitor/super
+
+/datum/stock_part/capacitor/quadratic
+ tier = 4
+ physical_object_type = /obj/item/stock_parts/capacitor/quadratic
+
+/datum/stock_part/manipulator
+ tier = 1
+ physical_object_type = /obj/item/stock_parts/manipulator
+ physical_object_base_type = /obj/item/stock_parts/manipulator
+
+/datum/stock_part/manipulator/nano
+ tier = 2
+ physical_object_type = /obj/item/stock_parts/manipulator/nano
+
+/datum/stock_part/manipulator/pico
+ tier = 3
+ physical_object_type = /obj/item/stock_parts/manipulator/pico
+
+/datum/stock_part/manipulator/femto
+ tier = 4
+ physical_object_type = /obj/item/stock_parts/manipulator/femto
+
+/datum/stock_part/micro_laser
+ tier = 1
+ physical_object_type = /obj/item/stock_parts/micro_laser
+ physical_object_base_type = /obj/item/stock_parts/micro_laser
+
+/datum/stock_part/micro_laser/high
+ tier = 2
+ physical_object_type = /obj/item/stock_parts/micro_laser/high
+
+/datum/stock_part/micro_laser/ultra
+ tier = 3
+ physical_object_type = /obj/item/stock_parts/micro_laser/ultra
+
+/datum/stock_part/micro_laser/quadultra
+ tier = 4
+ physical_object_type = /obj/item/stock_parts/micro_laser/quadultra
+
+/datum/stock_part/matter_bin
+ tier = 1
+ physical_object_type = /obj/item/stock_parts/matter_bin
+ physical_object_base_type = /obj/item/stock_parts/matter_bin
+
+/datum/stock_part/matter_bin/adv
+ tier = 2
+ physical_object_type = /obj/item/stock_parts/matter_bin/adv
+
+/datum/stock_part/matter_bin/super
+ tier = 3
+ physical_object_type = /obj/item/stock_parts/matter_bin/super
+
+/datum/stock_part/matter_bin/bluespace
+ tier = 4
+ physical_object_type = /obj/item/stock_parts/matter_bin/bluespace
+
+/// Subspace stock parts
+
+/datum/stock_part/ansible
+ tier = 1
+ physical_object_type = /obj/item/stock_parts/subspace/ansible
+ physical_object_base_type = /obj/item/stock_parts/subspace/ansible
+
+/datum/stock_part/filter
+ tier = 1
+ physical_object_type = /obj/item/stock_parts/subspace/filter
+ physical_object_base_type = /obj/item/stock_parts/subspace/filter
+
+/datum/stock_part/amplifier
+ tier = 1
+ physical_object_type = /obj/item/stock_parts/subspace/amplifier
+ physical_object_base_type = /obj/item/stock_parts/subspace/amplifier
+
+/datum/stock_part/treatment
+ tier = 1
+ physical_object_type = /obj/item/stock_parts/subspace/treatment
+ physical_object_base_type = /obj/item/stock_parts/subspace/treatment
+
+/datum/stock_part/analyzer
+ tier = 1
+ physical_object_type = /obj/item/stock_parts/subspace/analyzer
+ physical_object_base_type = /obj/item/stock_parts/subspace/analyzer
+
+/datum/stock_part/crystal
+ tier = 1
+ physical_object_type = /obj/item/stock_parts/subspace/crystal
+ physical_object_base_type = /obj/item/stock_parts/subspace/crystal
+
+/datum/stock_part/transmitter
+ tier = 1
+ physical_object_type = /obj/item/stock_parts/subspace/transmitter
+ physical_object_base_type = /obj/item/stock_parts/subspace/transmitter
+
+/datum/stock_part/card_reader
+ tier = 1
+ physical_object_type = /obj/item/stock_parts/card_reader
+ physical_object_base_type = /obj/item/stock_parts/card_reader
+
+/datum/stock_part/water_recycler
+ tier = 1
+ physical_object_type = /obj/item/stock_parts/water_recycler
+ physical_object_base_type = /obj/item/stock_parts/water_recycler
diff --git a/code/modules/vehicles/mecha/mech_bay.dm b/code/modules/vehicles/mecha/mech_bay.dm
index fe735d9510f..f61aec92718 100644
--- a/code/modules/vehicles/mecha/mech_bay.dm
+++ b/code/modules/vehicles/mecha/mech_bay.dm
@@ -43,8 +43,8 @@
/obj/machinery/mech_bay_recharge_port/RefreshParts()
. = ..()
var/total_rating = 0
- for(var/obj/item/stock_parts/capacitor/cap in component_parts)
- total_rating += cap.rating
+ for(var/datum/stock_part/capacitor/capacitor in component_parts)
+ total_rating += capacitor.tier
recharge_power = total_rating * 12.5
/obj/machinery/mech_bay_recharge_port/examine(mob/user)
diff --git a/code/modules/vehicles/mecha/mech_fabricator.dm b/code/modules/vehicles/mecha/mech_fabricator.dm
index 529a0cb07d4..10bec406234 100644
--- a/code/modules/vehicles/mecha/mech_fabricator.dm
+++ b/code/modules/vehicles/mecha/mech_fabricator.dm
@@ -90,20 +90,20 @@
var/T = 0
//maximum stocking amount (default 300000, 600000 at T4)
- for(var/obj/item/stock_parts/matter_bin/M in component_parts)
- T += M.rating
- rmat.set_local_size((200000 + (T*50000)))
+ for(var/datum/stock_part/matter_bin/matter_bin in component_parts)
+ T += matter_bin.tier
+ rmat.set_local_size((200000 + (T * 50000)))
//resources adjustment coefficient (1 -> 0.85 -> 0.7 -> 0.55)
T = 1.15
- for(var/obj/item/stock_parts/micro_laser/Ma in component_parts)
- T -= Ma.rating*0.15
+ for(var/datum/stock_part/micro_laser/micro_laser in component_parts)
+ T -= micro_laser.tier * 0.15
component_coeff = T
//building time adjustment coefficient (1 -> 0.8 -> 0.6)
T = -1
- for(var/obj/item/stock_parts/manipulator/Ml in component_parts)
- T += Ml.rating
+ for(var/datum/stock_part/manipulator/manipulator in component_parts)
+ T += manipulator.tier
time_coeff = round(initial(time_coeff) - (initial(time_coeff)*(T))/5,0.01)
// Adjust the build time of any item currently being built.
diff --git a/code/modules/vehicles/motorized_wheelchair.dm b/code/modules/vehicles/motorized_wheelchair.dm
index 9dadc016893..32c0c9ec9d1 100644
--- a/code/modules/vehicles/motorized_wheelchair.dm
+++ b/code/modules/vehicles/motorized_wheelchair.dm
@@ -15,40 +15,49 @@
var/panel_open = FALSE
///Parts used in building the wheelchair
var/list/required_parts = list(
- /obj/item/stock_parts/manipulator,
- /obj/item/stock_parts/manipulator,
- /obj/item/stock_parts/capacitor,
+ /datum/stock_part/manipulator,
+ /datum/stock_part/manipulator,
+ /datum/stock_part/capacitor,
)
///power cell we draw power from
var/obj/item/stock_parts/cell/power_cell
+ ///stock parts for this chair
+ var/list/component_parts = list()
/obj/vehicle/ridden/wheelchair/motorized/make_ridable()
AddElement(/datum/element/ridable, /datum/component/riding/vehicle/wheelchair/motorized)
/obj/vehicle/ridden/wheelchair/motorized/CheckParts(list/parts_list)
- . = ..()
+ for(var/obj/item/stock_parts/part in parts_list)
+ // find macthing datum/stock_part for this part and add to component list
+ var/datum/stock_part/newstockpart = GLOB.stock_part_datums_per_object[part.type]
+ if(isnull(newstockpart))
+ CRASH("No corresponding datum/stock_part for [part.type]")
+ component_parts += newstockpart
+ // delete this part
+ part.moveToNullspace()
+ qdel(part)
refresh_parts()
/obj/vehicle/ridden/wheelchair/motorized/proc/refresh_parts()
speed = 1 // Should never be under 1
- for(var/obj/item/stock_parts/manipulator/M in contents)
- speed += M.rating
+ for(var/datum/stock_part/manipulator/manipulator in component_parts)
+ speed += manipulator.tier
var/chair_icon = "motorized_wheelchair[speed > delay_multiplier ? "_fast" : ""]"
if(icon_state != chair_icon)
- wheels_overlay = image(icon, chair_icon + "_overlay", ABOVE_MOB_LAYER)
+ wheels_overlay = image(icon, chair_icon + "_overlay", ABOVE_MOB_LAYER)
icon_state = chair_icon
- for(var/obj/item/stock_parts/capacitor/C in contents)
- power_efficiency = C.rating
+ for(var/datum/stock_part/capacitor/capacitor in component_parts)
+ power_efficiency = capacitor.tier
/obj/vehicle/ridden/wheelchair/motorized/get_cell()
return power_cell
/obj/vehicle/ridden/wheelchair/motorized/atom_destruction(damage_flag)
- var/turf/T = get_turf(src)
- for(var/atom/movable/atom_content as anything in contents)
- atom_content.forceMove(T)
+ for(var/datum/stock_part/part in component_parts)
+ new part.physical_object_type(drop_location())
return ..()
/obj/vehicle/ridden/wheelchair/motorized/relaymove(mob/living/user, direction)
@@ -93,18 +102,27 @@
if(!istype(I, /obj/item/stock_parts))
return ..()
- var/obj/item/stock_parts/newstockpart = I
- for(var/obj/item/stock_parts/oldstockpart in contents)
+ var/datum/stock_part/newstockpart = GLOB.stock_part_datums_per_object[I.type]
+ if(isnull(newstockpart))
+ CRASH("No corresponding datum/stock_part for [newstockpart.type]")
+ for(var/datum/stock_part/oldstockpart in component_parts)
var/type_to_check
for(var/pathtype in required_parts)
if(ispath(oldstockpart.type, pathtype))
type_to_check = pathtype
break
if(istype(newstockpart, type_to_check) && istype(oldstockpart, type_to_check))
- if(newstockpart.get_part_rating() > oldstockpart.get_part_rating())
- newstockpart.forceMove(src)
- user.put_in_hands(oldstockpart)
- user.visible_message(span_notice("[user] replaces [oldstockpart] with [newstockpart] in [src]."), span_notice("You replace [oldstockpart] with [newstockpart]."))
+ if(newstockpart.tier > oldstockpart.tier)
+ // delete the part in the users hand and add the datum part to the component_list
+ I.moveToNullspace()
+ qdel(I)
+ component_parts += newstockpart
+ // create an new instance of the old datum stock part physical type & put it in the users hand
+ var/obj/item/stock_parts/part = new oldstockpart.physical_object_type
+ user.put_in_hands(part)
+ component_parts -= oldstockpart
+ // user message
+ user.visible_message(span_notice("[user] replaces [oldstockpart.name()] with [newstockpart.name()] in [src]."), span_notice("You replace [oldstockpart.name()] with [newstockpart.name()]."))
break
refresh_parts()
@@ -115,9 +133,8 @@
to_chat(user, span_notice("You detach the wheels and deconstruct the chair."))
new /obj/item/stack/rods(drop_location(), 8)
new /obj/item/stack/sheet/iron(drop_location(), 10)
- var/turf/T = get_turf(src)
- for(var/atom/movable/atom_content as anything in contents)
- atom_content.forceMove(T)
+ for(var/datum/stock_part/part in component_parts)
+ new part.physical_object_type(drop_location())
qdel(src)
return TRUE
diff --git a/code/modules/wiremod/core/component_printer.dm b/code/modules/wiremod/core/component_printer.dm
index c5662bbeda8..1fe030da568 100644
--- a/code/modules/wiremod/core/component_printer.dm
+++ b/code/modules/wiremod/core/component_printer.dm
@@ -77,9 +77,9 @@
/obj/machinery/component_printer/proc/calculate_efficiency()
var/rating = 0
- for(var/obj/item/stock_parts/manipulator/manipulator in component_parts)
+ for(var/datum/stock_part/manipulator/manipulator in component_parts)
///we do -1 because normal manipulators rating of 1 gives us 1-1=0 i.e no decrement in cost
- rating += manipulator.rating-1
+ rating += manipulator.tier-1
///linear interpolation between full cost i.e 1 & 1/8th the cost i.e 0.125
///we do it in 6 steps because maximum rating of 2 manipulators is 8 but -1 gives us 6
@@ -89,8 +89,8 @@
if(materials)
var/total_storage = 0
- for(var/obj/item/stock_parts/matter_bin/bin in component_parts)
- total_storage += bin.rating * 75000
+ for(var/datum/stock_part/matter_bin/bin in component_parts)
+ total_storage += bin.tier * 75000
materials.set_local_size(total_storage)
@@ -223,8 +223,8 @@
greyscale_colors = CIRCUIT_COLOR_SCIENCE
build_path = /obj/machinery/component_printer
req_components = list(
- /obj/item/stock_parts/matter_bin = 2,
- /obj/item/stock_parts/manipulator = 2,
+ /datum/stock_part/matter_bin = 2,
+ /datum/stock_part/manipulator = 2,
)
/obj/machinery/debug_component_printer
@@ -350,20 +350,20 @@
if(materials)
var/total_storage = 0
- for(var/obj/item/stock_parts/matter_bin/bin in component_parts)
- total_storage += bin.rating * 75000
+ for(var/datum/stock_part/matter_bin/bin in component_parts)
+ total_storage += bin.tier * 75000
materials.set_local_size(total_storage)
var/rating = 0
- for(var/obj/item/stock_parts/manipulator/manipulator in component_parts)
+ for(var/datum/stock_part/manipulator/manipulator in component_parts)
///we do -1 because normal manipulators rating of 1 gives us 1-1=0 i.e no decrement in cost
- rating += manipulator.rating-1
+ rating += manipulator.tier - 1
///linear interpolation between full cost i.e 1 & 1/8th the cost i.e 0.125
///we do it in 6 steps because maximum rating of 2 manipulators is 8 but -1 gives us 6
- var/coff=1.0+((0.125-1.0)*(rating/6))
+ var/coff = 1.0 + ((0.125 - 1.0) * (rating/6))
return coff
@@ -535,6 +535,6 @@
greyscale_colors = CIRCUIT_COLOR_SCIENCE
build_path = /obj/machinery/module_duplicator
req_components = list(
- /obj/item/stock_parts/matter_bin = 2,
- /obj/item/stock_parts/manipulator = 2,
+ /datum/stock_part/matter_bin = 2,
+ /datum/stock_part/manipulator = 2,
)
diff --git a/tools/ci/check_grep.sh b/tools/ci/check_grep.sh
index 2a0a193999b..630b263f38f 100644
--- a/tools/ci/check_grep.sh
+++ b/tools/ci/check_grep.sh
@@ -409,13 +409,13 @@ if [ "$pcre2_support" -eq 1 ]; then
echo
echo -e "${RED}ERROR: TIMER_OVERRIDE used without TIMER_UNIQUE.${NC}"
st=1
- fi
+ fi;
part "trailing newlines"
if $grep -PU '[^\n]$(?!\n)' $code_files; then
echo
echo -e "${RED}ERROR: File(s) with no trailing newline detected, please add one.${NC}"
st=1
- fi
+ fi;
part "docking_port varedits"
if $grep -PU '^/obj/docking_port/mobile.*\{\n[^}]*(width|height|dwidth|dheight)[^}]*[}]' $map_files; then
echo
@@ -423,10 +423,16 @@ if [ "$pcre2_support" -eq 1 ]; then
echo -e "\t\tPlease remove the width, height, dwidth, and dheight varedits from the docking_port.${NC}"
st=1
fi;
+ part "datum stockpart sanity"
+ if $grep -P 'for\b.*/obj/item/stock_parts/(?!cell)(?![\w_]+ in )' $code_files; then
+ echo
+ echo -e "${RED}ERROR: Should be using datum/stock_part instead"
+ st=1
+ fi;
else
echo -e "${RED}pcre2 not supported, skipping checks requiring pcre2"
echo -e "if you want to run these checks install ripgrep with pcre2 support.${NC}"
-fi
+fi;
if [ $st = 0 ]; then
echo