Skip to content

Commit

Permalink
[MIRROR] Completely deprecates reagents in protolathe/circuit imprint…
Browse files Browse the repository at this point in the history
…er/techfab designs [MDB IGNORE] (#235)

* Completely deprecates reagents in protolathe/circuit imprinter/techfab designs (#78939)

* medigun reagent removal

---------

Co-authored-by: GPeckman <[email protected]>
Co-authored-by: lessthanthree <[email protected]>
Co-authored-by: Iajret <[email protected]>
  • Loading branch information
4 people authored Oct 24, 2023
1 parent 8ea75cb commit b01a027
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion code/modules/mining/lavaland/tendril_loot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/modules/research/designs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion code/modules/research/designs/misc_designs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 1 addition & 21 deletions code/modules/research/machinery/_production.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
TRUE, \
)

create_reagents(0, OPENCONTAINER)
RefreshParts()
update_icon(UPDATE_OVERLAYS)

Expand Down Expand Up @@ -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

Expand All @@ -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))
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions code/modules/unit_tests/designs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
30 changes: 15 additions & 15 deletions modular_skyrat/modules/cellguns/code/medigun_research.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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//
Expand All @@ -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
Expand All @@ -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

0 comments on commit b01a027

Please sign in to comment.