diff --git a/code/game/objects/items/circuitboards/machines/machine_circuitboards.dm b/code/game/objects/items/circuitboards/machines/machine_circuitboards.dm index 2fd3714342c..c7ba71596a6 100644 --- a/code/game/objects/items/circuitboards/machines/machine_circuitboards.dm +++ b/code/game/objects/items/circuitboards/machines/machine_circuitboards.dm @@ -462,7 +462,7 @@ req_components = list( /datum/stock_part/matter_bin = 1, /datum/stock_part/servo = 1, - /obj/item/reagent_containers/cup/beaker = 2) + ) /obj/item/circuitboard/machine/circuit_imprinter/offstation name = "Ancient Circuit Imprinter" @@ -513,7 +513,7 @@ req_components = list( /datum/stock_part/matter_bin = 2, /datum/stock_part/servo = 2, - /obj/item/reagent_containers/cup/beaker = 2) + ) /obj/item/circuitboard/machine/protolathe/offstation name = "Ancient Protolathe" @@ -601,7 +601,7 @@ req_components = list( /datum/stock_part/matter_bin = 2, /datum/stock_part/servo = 2, - /obj/item/reagent_containers/cup/beaker = 2) + ) /obj/item/circuitboard/machine/techfab/department name = "\improper Departmental Techfab" diff --git a/code/modules/mining/lavaland/tendril_loot.dm b/code/modules/mining/lavaland/tendril_loot.dm index 07079516fc1..28c51a38c86 100644 --- a/code/modules/mining/lavaland/tendril_loot.dm +++ b/code/modules/mining/lavaland/tendril_loot.dm @@ -60,7 +60,6 @@ desc = "A device which causes kinetic accelerators to permanently gain damage against creature types killed with it." id = "bountymod" materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT*2, /datum/material/silver = SHEET_MATERIAL_AMOUNT*2, /datum/material/gold = SHEET_MATERIAL_AMOUNT*2, /datum/material/bluespace = SHEET_MATERIAL_AMOUNT*2) - reagents_list = list(/datum/reagent/blood = 40) build_path = /obj/item/borg/upgrade/modkit/bounty //Spooky special loot diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index c7c2d1d1d58..a7124bf122b 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -39,7 +39,7 @@ other types of metals and chemistry for reagents). var/make_reagent /// What categories this design falls under. Used for sorting in production machines. var/list/category = list() - /// List of reagents required to create one unit of the product. + /// List of reagents required to create one unit of the product. Currently only supported by the limb grower. var/list/reagents_list = list() /// The maximum number of units of whatever is produced by this can be produced in one go. var/maxstack = 1 diff --git a/code/modules/research/designs/misc_designs.dm b/code/modules/research/designs/misc_designs.dm index 3f4d4b8f8ec..fcbf39ec794 100644 --- a/code/modules/research/designs/misc_designs.dm +++ b/code/modules/research/designs/misc_designs.dm @@ -588,7 +588,6 @@ id = "paint_remover" build_type = PROTOLATHE | AWAY_LATHE materials = list(/datum/material/iron =HALF_SHEET_MATERIAL_AMOUNT) - reagents_list = list(/datum/reagent/acetone = 60) build_path = /obj/item/paint/paint_remover category = list( RND_CATEGORY_TOOLS + RND_SUBCATEGORY_TOOLS_JANITORIAL diff --git a/code/modules/research/machinery/_production.dm b/code/modules/research/machinery/_production.dm index e5a426d3a1e..4668753f048 100644 --- a/code/modules/research/machinery/_production.dm +++ b/code/modules/research/machinery/_production.dm @@ -45,7 +45,6 @@ TRUE, \ ) - create_reagents(0, OPENCONTAINER) RefreshParts() update_icon(UPDATE_OVERLAYS) @@ -185,13 +184,6 @@ /obj/machinery/rnd/production/proc/calculate_efficiency() efficiency_coeff = 1 - if(reagents) - reagents.maximum_volume = 0 - - for(var/obj/item/reagent_containers/cup/beaker in component_parts) - reagents.maximum_volume += beaker.volume - beaker.reagents.trans_to(src, beaker.reagents.total_volume) - if(materials) var/total_storage = 0 @@ -207,12 +199,6 @@ efficiency_coeff = max(total_rating, 0) -/obj/machinery/rnd/production/on_deconstruction() - for(var/obj/item/reagent_containers/cup/G in component_parts) - reagents.trans_to(G, G.reagents.maximum_volume) - - return ..() - /obj/machinery/rnd/production/proc/do_print(path, amount) for(var/i in 1 to amount) new path(get_turf(src)) @@ -263,14 +249,10 @@ print_quantity = clamp(print_quantity, 1, 50) var/coefficient = build_efficiency(design.build_path) - //check if sufficient materials/reagents are available + //check if sufficient materials are available if(!materials.mat_container.has_materials(design.materials, coefficient, print_quantity)) say("Not enough materials to complete prototype[print_quantity > 1? "s" : ""].") return FALSE - for(var/reagent in design.reagents_list) - if(!reagents.has_reagent(reagent, design.reagents_list[reagent] * print_quantity * coefficient)) - say("Not enough reagents to complete prototype[print_quantity > 1? "s" : ""].") - return FALSE //use power var/power = active_power_usage @@ -305,8 +287,6 @@ //consume materials materials.use_materials(design.materials, coefficient, print_quantity, "built", "[design.name]") - for(var/reagent in design.reagents_list) - reagents.remove_reagent(reagent, design.reagents_list[reagent] * print_quantity * coefficient) //produce item busy = TRUE if(production_animation) diff --git a/code/modules/unit_tests/designs.dm b/code/modules/unit_tests/designs.dm index a9cda144649..0495ebdc7d9 100644 --- a/code/modules/unit_tests/designs.dm +++ b/code/modules/unit_tests/designs.dm @@ -18,6 +18,8 @@ TEST_FAIL("Design [current_design.type] requires materials but does not have have any build_path or make_reagent set") else if (!isnull(current_design.build_path) || !isnull(current_design.build_path)) // //Design requires no materials but creates stuff TEST_FAIL("Design [current_design.type] requires NO materials but has build_path or make_reagent set") + if (length(current_design.reagents_list) && !(current_design.build_type & LIMBGROWER)) + TEST_FAIL("Design [current_design.type] requires reagents but isn't a limb grower design. Reagent costs are only supported by limb grower designs") for(var/path in subtypesof(/datum/design/surgery)) var/datum/design/surgery/current_design = new path //Create an instance of each design diff --git a/modular_skyrat/modules/cellguns/code/medigun_research.dm b/modular_skyrat/modules/cellguns/code/medigun_research.dm index 86d20adb73a..3971455e44e 100644 --- a/modular_skyrat/modules/cellguns/code/medigun_research.dm +++ b/modular_skyrat/modules/cellguns/code/medigun_research.dm @@ -25,28 +25,28 @@ name = "Brute II Medicell" desc = "Gives cell-loaded mediguns improved brute damage healing functionality." id = "brute2medicell" - materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT, /datum/material/glass = SHEET_MATERIAL_AMOUNT, /datum/material/plasma = HALF_SHEET_MATERIAL_AMOUNT) + materials = list(/datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT, /datum/material/gold = SMALL_MATERIAL_AMOUNT * 3, /datum/material/silver = SMALL_MATERIAL_AMOUNT * 3, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 3, /datum/material/uranium = SMALL_MATERIAL_AMOUNT * 3) build_path = /obj/item/weaponcell/medical/brute/tier_2 /datum/design/medicell/burn2 name = "Burn II Medicell" desc = "Gives cell-loaded mediguns improved burn damage healing functionality." id = "burn2medicell" - materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT, /datum/material/glass = SHEET_MATERIAL_AMOUNT, /datum/material/plasma = HALF_SHEET_MATERIAL_AMOUNT) + materials = list(/datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT, /datum/material/gold = SMALL_MATERIAL_AMOUNT * 3, /datum/material/silver = SMALL_MATERIAL_AMOUNT * 3, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 3, /datum/material/uranium = SMALL_MATERIAL_AMOUNT * 3) build_path = /obj/item/weaponcell/medical/burn/tier_2 /datum/design/medicell/toxin2 name = "Toxin II Medicell" desc = "Gives cell-loaded mediguns improved toxin damage healing functionality." id = "toxin2medicell" - materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT, /datum/material/glass = SHEET_MATERIAL_AMOUNT, /datum/material/plasma = HALF_SHEET_MATERIAL_AMOUNT) + materials = list(/datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT, /datum/material/gold = SMALL_MATERIAL_AMOUNT * 3, /datum/material/silver = SMALL_MATERIAL_AMOUNT * 3, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 3, /datum/material/uranium = SMALL_MATERIAL_AMOUNT * 3) build_path = /obj/item/weaponcell/medical/toxin/tier_2 /datum/design/medicell/oxy2 name = "Oxygen II Medicell" desc = "Gives cell-loaded mediguns improved oxygen deprivation healing functionality." id = "oxy2medicell" - materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT, /datum/material/glass = SHEET_MATERIAL_AMOUNT, /datum/material/plasma = HALF_SHEET_MATERIAL_AMOUNT) + materials = list(/datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT, /datum/material/gold = SMALL_MATERIAL_AMOUNT * 3, /datum/material/silver = SMALL_MATERIAL_AMOUNT * 3, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 3, /datum/material/uranium = SMALL_MATERIAL_AMOUNT * 3) build_path = /obj/item/weaponcell/medical/oxygen/tier_2 //Tier 3 Medicells// @@ -55,28 +55,28 @@ name = "Brute III Medicell" desc = "Gives cell-loaded mediguns advanced brute damage healing functionality." id = "brute3medicell" - materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT, /datum/material/glass = SHEET_MATERIAL_AMOUNT, /datum/material/plasma = HALF_SHEET_MATERIAL_AMOUNT, /datum/material/diamond = SMALL_MATERIAL_AMOUNT * 5) + materials = list(/datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT, /datum/material/gold = SMALL_MATERIAL_AMOUNT * 3, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 3, /datum/material/diamond = SMALL_MATERIAL_AMOUNT * 3, /datum/material/uranium = SMALL_MATERIAL_AMOUNT * 3, /datum/material/titanium = SMALL_MATERIAL_AMOUNT * 3, /datum/material/bluespace = SMALL_MATERIAL_AMOUNT * 3) build_path = /obj/item/weaponcell/medical/brute/tier_3 /datum/design/medicell/burn3 name = "Burn III Medicell" desc = "Gives cell-loaded mediguns advanced burn damage healing functionality." id = "burn3medicell" - materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT, /datum/material/glass = SHEET_MATERIAL_AMOUNT, /datum/material/plasma = HALF_SHEET_MATERIAL_AMOUNT, /datum/material/diamond = SMALL_MATERIAL_AMOUNT * 5) + materials = list(/datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT, /datum/material/gold = SMALL_MATERIAL_AMOUNT * 3, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 3, /datum/material/diamond = SMALL_MATERIAL_AMOUNT * 3, /datum/material/uranium = SMALL_MATERIAL_AMOUNT * 3, /datum/material/titanium = SMALL_MATERIAL_AMOUNT * 3, /datum/material/bluespace = SMALL_MATERIAL_AMOUNT * 3) build_path = /obj/item/weaponcell/medical/burn/tier_3 /datum/design/medicell/toxin3 name = "Toxin III Medicell" desc = "Gives cell-loaded mediguns advanced toxin damage healing functionality." id = "toxin3medicell" - materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT, /datum/material/glass = SHEET_MATERIAL_AMOUNT, /datum/material/plasma = HALF_SHEET_MATERIAL_AMOUNT, /datum/material/diamond = SMALL_MATERIAL_AMOUNT * 5) + materials = list(/datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT, /datum/material/gold = SMALL_MATERIAL_AMOUNT * 3, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 3, /datum/material/diamond = SMALL_MATERIAL_AMOUNT * 3, /datum/material/uranium = SMALL_MATERIAL_AMOUNT * 3, /datum/material/titanium = SMALL_MATERIAL_AMOUNT * 3, /datum/material/bluespace = SMALL_MATERIAL_AMOUNT * 3) build_path = /obj/item/weaponcell/medical/toxin/tier_3 /datum/design/medicell/oxy3 name = "Oxygen III Medicell" desc = "Gives cell-loaded mediguns advanced oxygen deprivation healing functionality." id = "oxy3medicell" - materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT, /datum/material/glass = SHEET_MATERIAL_AMOUNT, /datum/material/plasma = HALF_SHEET_MATERIAL_AMOUNT, /datum/material/diamond = SMALL_MATERIAL_AMOUNT * 5) + materials = list(/datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT, /datum/material/gold = SMALL_MATERIAL_AMOUNT * 3, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 3, /datum/material/diamond = SMALL_MATERIAL_AMOUNT * 3, /datum/material/uranium = SMALL_MATERIAL_AMOUNT * 3, /datum/material/titanium = SMALL_MATERIAL_AMOUNT * 3, /datum/material/bluespace = SMALL_MATERIAL_AMOUNT * 3) build_path = /obj/item/weaponcell/medical/oxygen/tier_3 //Utility Medicells @@ -89,47 +89,47 @@ name = "Clotting Medicell" desc = "Gives cell-loaded mediguns projectile-based coagulation functionality." id = "clotmedicell" - materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT, /datum/material/glass = SHEET_MATERIAL_AMOUNT, /datum/material/plasma = HALF_SHEET_MATERIAL_AMOUNT, /datum/material/diamond = SMALL_MATERIAL_AMOUNT * 5) + materials = list(/datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT, /datum/material/plastic = SHEET_MATERIAL_AMOUNT, /datum/material/gold = SMALL_MATERIAL_AMOUNT * 3, /datum/material/silver = SMALL_MATERIAL_AMOUNT * 3, /datum/material/uranium = SMALL_MATERIAL_AMOUNT * 3, /datum/material/diamond = SMALL_MATERIAL_AMOUNT * 5) build_path = /obj/item/weaponcell/medical/utility/clotting /datum/design/medicell/utility/temp name = "Temperature Adjustment Medicell" desc = "Gives cell loaded-mediguns projectile-based body temperature regulation functionality." id = "tempmedicell" - materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT, /datum/material/glass = SHEET_MATERIAL_AMOUNT, /datum/material/plasma = HALF_SHEET_MATERIAL_AMOUNT, /datum/material/diamond = SMALL_MATERIAL_AMOUNT * 5) + materials = list(/datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT, /datum/material/plastic = SHEET_MATERIAL_AMOUNT, /datum/material/gold = SMALL_MATERIAL_AMOUNT * 3, /datum/material/silver = SMALL_MATERIAL_AMOUNT * 3, /datum/material/uranium = SMALL_MATERIAL_AMOUNT * 3, /datum/material/diamond = SMALL_MATERIAL_AMOUNT * 5) build_path = /obj/item/weaponcell/medical/utility/temperature /datum/design/medicell/utility/gown name = "Hardlight Gown Medicell" desc = "Gives cell-loaded mediguns projectile-based hardlight gown deployment functionality." id = "gownmedicell" - materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT, /datum/material/glass = SHEET_MATERIAL_AMOUNT) + materials = list(/datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT, /datum/material/plastic = SHEET_MATERIAL_AMOUNT, /datum/material/glass = SHEET_MATERIAL_AMOUNT) build_path = /obj/item/weaponcell/medical/utility/hardlight_gown /datum/design/medicell/utility/bed name = "Hardlight Roller Bed Medicell" desc = "Gives cell-loaded mediguns projectile-based hardlight roller bed deployment functionality. Best used on already-horizontal patients." id = "bedmedicell" - materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT, /datum/material/glass = SHEET_MATERIAL_AMOUNT) + materials = list(/datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT, /datum/material/plastic = SHEET_MATERIAL_AMOUNT, /datum/material/glass = SHEET_MATERIAL_AMOUNT, /datum/material/titanium = SMALL_MATERIAL_AMOUNT * 3, /datum/material/bluespace = SMALL_MATERIAL_AMOUNT * 3) build_path = /obj/item/weaponcell/medical/utility/bed /datum/design/medicell/utility/salve name = "Empty Salve Medicell" desc = "An incomplete medicell that requires a leaf of aloe to fully realize its potential to provide projectile-embedding-based healing-over-time functionality." id = "salvemedicell" - materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT, /datum/material/glass = SHEET_MATERIAL_AMOUNT) + materials = list(/datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT, /datum/material/plastic = SHEET_MATERIAL_AMOUNT, /datum/material/glass = SHEET_MATERIAL_AMOUNT) build_path = /obj/item/device/custom_kit/empty_cell /datum/design/medicell/utility/body name = "Empty Body Teleporter Medicell" desc = "An incomplete medicell that requires a bluespace slime extract in order to provide projectile-based corpse retrieval functionality." id = "bodymedicell" - materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT, /datum/material/glass = SHEET_MATERIAL_AMOUNT, /datum/material/plasma = HALF_SHEET_MATERIAL_AMOUNT, /datum/material/diamond = SMALL_MATERIAL_AMOUNT * 5, /datum/material/bluespace = SHEET_MATERIAL_AMOUNT) + materials = list(/datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT, /datum/material/plastic = SHEET_MATERIAL_AMOUNT, /datum/material/glass = SHEET_MATERIAL_AMOUNT, /datum/material/plasma = HALF_SHEET_MATERIAL_AMOUNT, /datum/material/diamond = SMALL_MATERIAL_AMOUNT * 5, /datum/material/bluespace = SHEET_MATERIAL_AMOUNT) build_path = /obj/item/device/custom_kit/empty_cell/body_teleporter /datum/design/medicell/utility/relocation name = "Oppressive Force Relocation Medicell" desc = "Gives cell-loaded mediguns projectile-based rubbernecker relocation functionality, by dumping them into the Medbay lobby via eigenstate manipulation. Only works in Medbay when fired by authorized users." id = "relocatemedicell" - materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT, /datum/material/glass = SHEET_MATERIAL_AMOUNT, /datum/material/plasma = HALF_SHEET_MATERIAL_AMOUNT, /datum/material/diamond = SMALL_MATERIAL_AMOUNT * 5, /datum/material/bluespace = SHEET_MATERIAL_AMOUNT) + materials = list(/datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT, /datum/material/plastic = SHEET_MATERIAL_AMOUNT, /datum/material/glass = SHEET_MATERIAL_AMOUNT, /datum/material/plasma = HALF_SHEET_MATERIAL_AMOUNT, /datum/material/diamond = SMALL_MATERIAL_AMOUNT * 5, /datum/material/bluespace = SHEET_MATERIAL_AMOUNT) build_path = /obj/item/device/custom_kit/empty_cell/relocator