mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 05:27:01 +01:00
generalize check_mat and categories
This commit is contained in:
@@ -10,7 +10,7 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
|
||||
icon_state = "circuit_imprinter"
|
||||
container_type = OPENCONTAINER
|
||||
|
||||
var/list/categories = list(
|
||||
categories = list(
|
||||
"AI Modules",
|
||||
"Computer Boards",
|
||||
"Engineering Machinery",
|
||||
@@ -62,7 +62,7 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
|
||||
T += M.rating
|
||||
efficiency_coeff = 2 ** (T - 1) //Only 1 manipulator here, you're making runtimes Razharas
|
||||
|
||||
/obj/machinery/r_n_d/circuit_imprinter/proc/check_mat(datum/design/being_built, var/M)
|
||||
/obj/machinery/r_n_d/circuit_imprinter/check_mat(datum/design/being_built, var/M)
|
||||
var/list/all_materials = being_built.reagents_list + being_built.materials
|
||||
|
||||
var/A = materials.amount(M)
|
||||
|
||||
@@ -13,7 +13,7 @@ Note: Must be placed west/left of and R&D console to function.
|
||||
icon_state = "protolathe"
|
||||
container_type = OPENCONTAINER
|
||||
|
||||
var/list/categories = list(
|
||||
categories = list(
|
||||
"Bluespace",
|
||||
"Equipment",
|
||||
"Janitorial",
|
||||
@@ -68,7 +68,7 @@ Note: Must be placed west/left of and R&D console to function.
|
||||
T -= M.rating/10
|
||||
efficiency_coeff = min(max(0, T), 1)
|
||||
|
||||
/obj/machinery/r_n_d/protolathe/proc/check_mat(datum/design/being_built, var/M) // now returns how many times the item can be built with the material
|
||||
/obj/machinery/r_n_d/protolathe/check_mat(datum/design/being_built, var/M) // now returns how many times the item can be built with the material
|
||||
var/A = materials.amount(M)
|
||||
if(!A)
|
||||
A = reagents.get_reagent_amount(M)
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
var/obj/item/loaded_item = null
|
||||
var/datum/component/material_container/materials //Store for hyper speed!
|
||||
var/efficiency_coeff = 1
|
||||
var/list/categories = list()
|
||||
|
||||
/obj/machinery/r_n_d/New()
|
||||
materials = AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TRANQUILLITE, MAT_TITANIUM, MAT_BLUESPACE, MAT_PLASTIC), 0, TRUE, /obj/item/stack, CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert))
|
||||
@@ -130,3 +131,6 @@
|
||||
overlays += "[initial(name)]_[stack_name]"
|
||||
sleep(10)
|
||||
overlays -= "[initial(name)]_[stack_name]"
|
||||
|
||||
/obj/machinery/r_n_d/proc/check_mat(datum/design/being_built, var/M)
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user