diff --git a/code/modules/research/circuitprinter.dm b/code/modules/research/circuitprinter.dm index 00f0214828c..08266ecf5a8 100644 --- a/code/modules/research/circuitprinter.dm +++ b/code/modules/research/circuitprinter.dm @@ -10,10 +10,6 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis). icon_state = "circuit_imprinter" flags = OPENCONTAINER - var/g_amount = 0 - var/gold_amount = 0 - var/diamond_amount = 0 - var/max_material_amount = 75000.0 var/efficiency_coeff var/list/categories = list( @@ -55,13 +51,16 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis). reagents.my_atom = src /obj/machinery/r_n_d/circuit_imprinter/RefreshParts() - var/T = 0 + reagents.maximum_volume = 0 for(var/obj/item/reagent_containers/glass/G in component_parts) + reagents.maximum_volume += G.volume G.reagents.trans_to(src, G.reagents.total_volume) + + materials.max_amount = 0 for(var/obj/item/stock_parts/matter_bin/M in component_parts) - T += M.rating - max_material_amount = T * 75000.0 - T = 0 + materials.max_amount += M.rating * 75000 + + var/T = 0 for(var/obj/item/stock_parts/manipulator/M in component_parts) T += M.rating efficiency_coeff = 2 ** (T - 1) //Only 1 manipulator here, you're making runtimes Razharas @@ -72,23 +71,18 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis). /obj/machinery/r_n_d/circuit_imprinter/proc/check_mat(datum/design/being_built, var/M) - switch(M) - if(MAT_GLASS) - return (g_amount - (being_built.materials[M]/efficiency_coeff) >= 0) - if(MAT_GOLD) - return (gold_amount - (being_built.materials[M]/efficiency_coeff) >= 0) - if(MAT_DIAMOND) - return (diamond_amount - (being_built.materials[M]/efficiency_coeff) >= 0) - else - return (reagents.has_reagent(M, (being_built.materials[M]/efficiency_coeff)) != 0) + var/list/all_materials = being_built.reagents_list + being_built.materials + var/A = materials.amount(M) + if(!A) + A = reagents.get_reagent_amount(M) -/obj/machinery/r_n_d/circuit_imprinter/proc/TotalMaterials() - return g_amount + gold_amount + diamond_amount + return round(A / max(1, (all_materials[M]/efficiency_coeff))) /obj/machinery/r_n_d/circuit_imprinter/attackby(var/obj/item/O as obj, var/mob/user as mob, params) if(shocked) - shock(user,50) + if(shock(user,50)) + return TRUE if(default_deconstruction_screwdriver(user, "circuit_imprinter_t", "circuit_imprinter", O)) if(linked_console) linked_console.linked_imprinter = null @@ -104,57 +98,19 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis). if(istype(I, /obj/item/reagent_containers/glass/beaker)) reagents.trans_to(I, reagents.total_volume) I.loc = src.loc - for(var/obj/item/reagent_containers/glass/G in component_parts) - reagents.trans_to(G, G.reagents.maximum_volume) - if(g_amount >= MINERAL_MATERIAL_AMOUNT) - var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(src.loc) - G.amount = round(g_amount / MINERAL_MATERIAL_AMOUNT) - if(gold_amount >= MINERAL_MATERIAL_AMOUNT) - var/obj/item/stack/sheet/mineral/gold/G = new /obj/item/stack/sheet/mineral/gold(src.loc) - G.amount = round(gold_amount / MINERAL_MATERIAL_AMOUNT) - if(diamond_amount >= MINERAL_MATERIAL_AMOUNT) - var/obj/item/stack/sheet/mineral/diamond/G = new /obj/item/stack/sheet/mineral/diamond(src.loc) - G.amount = round(diamond_amount / MINERAL_MATERIAL_AMOUNT) + materials.retrieve_all() default_deconstruction_crowbar(O) return else to_chat(user, "You can't load the [src.name] while it's opened.") return - if(disabled) - return + if(O.is_open_container()) + return FALSE + if(!linked_console) to_chat(user, "The [name] must be linked to an R&D console first!") return 1 if(O.is_open_container()) return - if(!istype(O, /obj/item/stack/sheet/glass) && !istype(O, /obj/item/stack/sheet/mineral/gold) && !istype(O, /obj/item/stack/sheet/mineral/diamond)) - to_chat(user, "You cannot insert this item into the [name]!") - return - if(stat) - return - if(busy) - to_chat(user, "The [name] is busy. Please wait for completion of previous operation.") - return - var/obj/item/stack/sheet/stack = O - if((TotalMaterials() + stack.perunit) > max_material_amount) - to_chat(user, "The [name] is full. Please remove glass from the protolathe in order to insert more.") - return - - var/amount = round(input("How many sheets do you want to add?") as num) - if(amount <= 0 || stack.amount <= 0) - return - if(amount > stack.amount) - amount = min(stack.amount, round((max_material_amount-TotalMaterials())/stack.perunit)) - - busy = 1 - use_power(max(1000, (MINERAL_MATERIAL_AMOUNT*amount/10))) - to_chat(user, "You add [amount] sheets to the [src.name].") - if(istype(stack, /obj/item/stack/sheet/glass)) - g_amount += amount * MINERAL_MATERIAL_AMOUNT - else if(istype(stack, /obj/item/stack/sheet/mineral/gold)) - gold_amount += amount * MINERAL_MATERIAL_AMOUNT - else if(istype(stack, /obj/item/stack/sheet/mineral/diamond)) - diamond_amount += amount * MINERAL_MATERIAL_AMOUNT - stack.use(amount) - busy = 0 - src.updateUsrDialog() + else + return ..() \ No newline at end of file diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index c1269def592..e7e3f1c3acd 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -42,6 +42,6 @@ other types of metals and chemistry for reagents). var/locked = 0 //If true it will spawn inside a lockbox with currently sec access var/access_requirement = list(access_armory) //What special access requirements will the lockbox have? Defaults to armory. var/category = null //Primarily used for Mech Fabricators, but can be used for anything - var/list/reagents = list() //List of reagents. Format: "id" = amount. + var/list/reagents_list = list() //List of reagents. Format: "id" = amount. var/maxstack = 1 var/lathe_time_factor = 1 //How many times faster than normal is this to build on the protolathe diff --git a/code/modules/research/designs/AI_module_designs.dm b/code/modules/research/designs/AI_module_designs.dm index 3e933bff543..af3d7e34b82 100644 --- a/code/modules/research/designs/AI_module_designs.dm +++ b/code/modules/research/designs/AI_module_designs.dm @@ -8,7 +8,7 @@ id = "freeform_module" req_tech = list("programming" = 5, "materials" = 4) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20, MAT_GOLD = 100) + materials = list(MAT_GLASS = 1000, MAT_GOLD = 100) build_path = /obj/item/aiModule/freeform category = list("AI Modules") @@ -18,7 +18,7 @@ id = "onecrewmember_module" req_tech = list("programming" = 6, "materials" = 4) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20, MAT_DIAMOND = 100) + materials = list(MAT_GLASS = 1000, MAT_DIAMOND = 100) build_path = /obj/item/aiModule/oneCrewMember category = list("AI Modules") @@ -28,7 +28,7 @@ id = "oxygen_module" req_tech = list("programming" = 4, "biotech" = 2, "materials" = 4) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20, MAT_GOLD = 100) + materials = list(MAT_GLASS = 1000, MAT_GOLD = 100) build_path = /obj/item/aiModule/oxygen category = list("AI Modules") @@ -38,7 +38,7 @@ id = "protectstation_module" req_tech = list("programming" = 5, "materials" = 4) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20, MAT_GOLD = 100) + materials = list(MAT_GLASS = 1000, MAT_GOLD = 100) build_path = /obj/item/aiModule/protectStation category = list("AI Modules") @@ -48,7 +48,7 @@ id = "purge_module" req_tech = list("programming" = 5, "materials" = 6) build_type = IMPRINTER - materials = list(MAT_GLASS = 2000, "sacid" = 20, MAT_DIAMOND = 100) + materials = list(MAT_GLASS = 1000, MAT_DIAMOND = 100) build_path = /obj/item/aiModule/purge category = list("AI Modules") @@ -58,7 +58,7 @@ id = "quarantine_module" req_tech = list("programming" = 3, "biotech" = 2, "materials" = 4) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20, MAT_GOLD = 100) + materials = list(MAT_GLASS = 1000, MAT_GOLD = 100) build_path = /obj/item/aiModule/quarantine category = list("AI Modules") @@ -68,7 +68,7 @@ id = "reset_module" req_tech = list("programming" = 4, "materials" = 6) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20, MAT_GOLD = 100) + materials = list(MAT_GLASS = 1000, MAT_GOLD = 100) build_path = /obj/item/aiModule/reset category = list("AI Modules") @@ -78,7 +78,7 @@ id = "safeguard_module" req_tech = list("programming" = 3, "materials" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20, MAT_GOLD = 100) + materials = list(MAT_GLASS = 1000, MAT_GOLD = 100) build_path = /obj/item/aiModule/safeguard category = list("AI Modules") @@ -88,7 +88,7 @@ id = "antimov_module" req_tech = list("programming" = 5, "syndicate" = 2, "materials" = 5) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20, MAT_DIAMOND = 100) + materials = list(MAT_GLASS = 1000, MAT_DIAMOND = 100) build_path = /obj/item/aiModule/antimov category = list("AI Modules") @@ -98,7 +98,7 @@ id = "asimov_module" req_tech = list("programming" = 3, "materials" = 5) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20, MAT_DIAMOND = 100) + materials = list(MAT_GLASS = 1000, MAT_DIAMOND = 100) build_path = /obj/item/aiModule/asimov category = list("AI Modules") @@ -108,7 +108,7 @@ id = "corporate_module" req_tech = list("programming" = 5, "materials" = 5) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20, MAT_DIAMOND = 100) + materials = list(MAT_GLASS = 1000, MAT_DIAMOND = 100) build_path = /obj/item/aiModule/corp category = list("AI Modules") @@ -118,7 +118,7 @@ id = "crewsimov_module" req_tech = list("programming" = 3, "materials" = 5) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20, MAT_DIAMOND = 100) + materials = list(MAT_GLASS = 1000, MAT_DIAMOND = 100) build_path = /obj/item/aiModule/crewsimov category = list("AI Modules") @@ -128,7 +128,7 @@ id = "freeformcore_module" req_tech = list("programming" = 6, "materials" = 6) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20, MAT_DIAMOND = 100) + materials = list(MAT_GLASS = 1000, MAT_DIAMOND = 100) build_path = /obj/item/aiModule/freeformcore category = list("AI Modules") @@ -138,7 +138,7 @@ id = "paladin_module" req_tech = list("programming" = 5, "materials" = 5) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20, MAT_DIAMOND = 100) + materials = list(MAT_GLASS = 1000, MAT_DIAMOND = 100) build_path = /obj/item/aiModule/paladin category = list("AI Modules") @@ -148,6 +148,6 @@ id = "tyrant_module" req_tech = list("programming" = 5, "syndicate" = 2, "materials" = 5) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20, MAT_DIAMOND = 100) + materials = list(MAT_GLASS = 1000, MAT_DIAMOND = 100) build_path = /obj/item/aiModule/tyrant category = list("AI Modules") diff --git a/code/modules/research/designs/comp_board_designs.dm b/code/modules/research/designs/comp_board_designs.dm index 4099f8457d0..57da7142b7c 100644 --- a/code/modules/research/designs/comp_board_designs.dm +++ b/code/modules/research/designs/comp_board_designs.dm @@ -8,7 +8,7 @@ id = "aicore" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/aicore category = list("Computer Boards") @@ -18,7 +18,7 @@ id = "aifixer" req_tech = list("programming" = 4, "magnets" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/aifixer category = list("Computer Boards") @@ -28,7 +28,7 @@ id = "aiupload" req_tech = list("programming" = 5, "engineering" = 4) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/aiupload category = list("Computer Boards") @@ -38,7 +38,7 @@ id = "atmosalerts" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/atmos_alert category = list("Computer Boards") @@ -48,7 +48,7 @@ id = "air_management" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/air_management category = list("Computer Boards") @@ -58,7 +58,7 @@ id = "seccamera" req_tech = list("programming" = 2, "combat" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/camera category = list("Computer Boards") @@ -68,7 +68,7 @@ id = "clonecontrol" req_tech = list("programming" = 4, "biotech" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/cloning category = list("Computer Boards") @@ -78,7 +78,7 @@ id = "comconsole" req_tech = list("programming" = 3, "magnets" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/communications category = list("Computer Boards") @@ -88,7 +88,7 @@ id = "crewconsole" req_tech = list("programming" = 3, "magnets" = 2, "biotech" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/crew category = list("Computer Boards") @@ -98,7 +98,7 @@ id = "borgupload" req_tech = list("programming" = 5, "engineering" = 4) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/borgupload category = list("Computer Boards") @@ -108,7 +108,7 @@ id = "scan_console" req_tech = list("programming" = 2, "biotech" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/scan_consolenew category = list("Computer Boards") @@ -118,7 +118,7 @@ id = "dronecontrol" req_tech = list("programming" = 4) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/drone_control category = list("Computer Boards") @@ -128,7 +128,7 @@ id = "mechacontrol" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/mecha_control category = list("Computer Boards") @@ -138,7 +138,7 @@ id = "idcardconsole" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/card category = list("Computer Boards") @@ -148,7 +148,7 @@ id = "mechapower" req_tech = list("programming" = 3, "powerstorage" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/mech_bay_power_console category = list("Computer Boards") @@ -158,7 +158,7 @@ id = "med_data" req_tech = list("programming" = 2, "biotech" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/med_data category = list("Computer Boards") @@ -168,7 +168,7 @@ id = "message_monitor" req_tech = list("programming" = 5) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/message_monitor category = list("Computer Boards") @@ -178,7 +178,7 @@ id = "operating" req_tech = list("programming" = 2, "biotech" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/operating category = list("Computer Boards") @@ -188,7 +188,7 @@ id = "pandemic" req_tech = list("programming" = 3, "biotech" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/pandemic category = list("Computer Boards") @@ -198,7 +198,7 @@ id = "powermonitor" req_tech = list("programming" = 2, "powerstorage" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/powermonitor category = list("Computer Boards") @@ -208,7 +208,7 @@ id = "prisonmanage" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/prisoner category = list("Computer Boards") @@ -218,7 +218,7 @@ id = "rdconsole" req_tech = list("programming" = 4) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/rdconsole category = list("Computer Boards") @@ -228,7 +228,7 @@ id = "rdservercontrol" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/rdservercontrol category = list("Computer Boards") @@ -238,7 +238,7 @@ id = "robocontrol" req_tech = list("programming" = 4) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/robotics category = list("Computer Boards") @@ -248,7 +248,7 @@ id = "secdata" req_tech = list("programming" = 2, "combat" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/secure_data category = list("Computer Boards") @@ -258,7 +258,7 @@ id = "solarcontrol" req_tech = list("programming" = 2, "powerstorage" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/solar_control category = list("Computer Boards") @@ -268,7 +268,7 @@ id = "spacepodc" req_tech = list("programming" = 4) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/pod_locater category = list("Computer Boards") @@ -278,7 +278,7 @@ id = "ordercomp" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/ordercomp category = list("Computer Boards") @@ -288,7 +288,7 @@ id = "supplycomp" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/supplycomp category = list("Computer Boards") @@ -298,7 +298,7 @@ id = "comm_monitor" req_tech = list("programming" = 3, "magnets" = 3, "bluespace" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/comm_monitor category = list("Computer Boards") @@ -308,7 +308,7 @@ id = "comm_server" req_tech = list("programming" = 3, "magnets" = 3, "bluespace" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/comm_server category = list("Computer Boards") @@ -318,7 +318,7 @@ id = "comm_traffic" req_tech = list("programming" = 3, "magnets" = 3, "bluespace" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/comm_traffic category = list("Computer Boards") @@ -328,7 +328,7 @@ id = "telesci_console" req_tech = list("programming" = 3, "bluespace" = 3, "plasmatech" = 4) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/telesci_console category = list("Computer Boards") @@ -338,7 +338,7 @@ id = "teleconsole" req_tech = list("programming" = 3, "bluespace" = 3, "plasmatech" = 4) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/teleporter category = list("Computer Boards") @@ -348,7 +348,7 @@ id = "GAC" req_tech = list("programming" = 3, "magnets" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/air_management category = list("Computer Boards") @@ -358,7 +358,7 @@ id = "tankcontrol" req_tech = list("programming" = 3, "magnets" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/large_tank_control category = list("Computer Boards") @@ -368,7 +368,7 @@ id = "AAC" req_tech = list("programming" = 4, "magnets" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/atmos_automation category = list("Computer Boards") @@ -378,6 +378,6 @@ id = "xenobioconsole" req_tech = list("programming" = 3, "biotech" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/xenobiology category = list("Computer Boards") diff --git a/code/modules/research/designs/computer_part_designs.dm b/code/modules/research/designs/computer_part_designs.dm index 1b2640cbfa3..1b4f831611a 100644 --- a/code/modules/research/designs/computer_part_designs.dm +++ b/code/modules/research/designs/computer_part_designs.dm @@ -63,7 +63,8 @@ id = "netcard_basic" req_tech = list("programming" = 2, "engineering" = 1) build_type = IMPRINTER - materials = list(MAT_METAL = 250, MAT_GLASS = 100, "sacid" = 20) + materials = list(MAT_METAL = 250, MAT_GLASS = 100) + reagents_list = list("sacid" = 20) build_path = /obj/item/computer_hardware/network_card category = list("Computer Parts") @@ -72,7 +73,7 @@ id = "netcard_advanced" req_tech = list("programming" = 4, "engineering" = 2) build_type = IMPRINTER - materials = list(MAT_METAL = 500, MAT_GLASS = 200, "sacid" = 20) + materials = list(MAT_METAL = 500, MAT_GLASS = 200) build_path = /obj/item/computer_hardware/network_card/advanced category = list("Computer Parts") @@ -81,7 +82,7 @@ id = "netcard_wired" req_tech = list("programming" = 5, "engineering" = 3) build_type = IMPRINTER - materials = list(MAT_METAL = 2500, MAT_GLASS = 400, "sacid" = 20) + materials = list(MAT_METAL = 2500, MAT_GLASS = 400) build_path = /obj/item/computer_hardware/network_card/wired category = list("Computer Parts") @@ -101,7 +102,7 @@ id = "portadrive_advanced" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1600, "sacid" = 20) + materials = list(MAT_GLASS = 1600) build_path = /obj/item/computer_hardware/hard_drive/portable/advanced category = list("Computer Parts") @@ -110,7 +111,7 @@ id = "portadrive_super" req_tech = list("programming" = 4) build_type = IMPRINTER - materials = list(MAT_GLASS = 3200, "sacid" = 20) + materials = list(MAT_GLASS = 3200) build_path = /obj/item/computer_hardware/hard_drive/portable/super category = list("Computer Parts") @@ -219,7 +220,7 @@ id = "cpu_normal" req_tech = list("programming" = 3, "engineering" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1600, "sacid" = 20) + materials = list(MAT_GLASS = 1600) build_path = /obj/item/computer_hardware/processor_unit category = list("Computer Parts") @@ -228,7 +229,7 @@ id = "cpu_small" req_tech = list("programming" = 2, "engineering" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 800, "sacid" = 20) + materials = list(MAT_GLASS = 800) build_path = /obj/item/computer_hardware/processor_unit/small category = list("Computer Parts") @@ -237,7 +238,7 @@ id = "pcpu_normal" req_tech = list("programming" = 5, "engineering" = 4) build_type = IMPRINTER - materials = list(MAT_GLASS= 6400, MAT_GOLD = 2000, "sacid" = 40) + materials = list(MAT_GLASS= 6400, MAT_GOLD = 2000) build_path = /obj/item/computer_hardware/processor_unit/photonic category = list("Computer Parts") @@ -246,6 +247,6 @@ id = "pcpu_small" req_tech = list("programming" = 4, "engineering" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 3200, MAT_GOLD = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 3200, MAT_GOLD = 1000) build_path = /obj/item/computer_hardware/processor_unit/photonic/small category = list("Computer Parts") \ No newline at end of file diff --git a/code/modules/research/designs/machine_designs.dm b/code/modules/research/designs/machine_designs.dm index 21a9d65aa87..fb5ff5cabd5 100644 --- a/code/modules/research/designs/machine_designs.dm +++ b/code/modules/research/designs/machine_designs.dm @@ -8,7 +8,7 @@ id = "thermomachine" req_tech = list("programming" = 3, "plasmatech" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/thermomachine category = list ("Engineering Machinery") @@ -18,7 +18,7 @@ id = "smes" req_tech = list("programming" = 4, "powerstorage" = 5, "engineering" = 4) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/smes category = list ("Engineering Machinery") @@ -28,7 +28,7 @@ id = "emitter" req_tech = list("programming" = 3, "powerstorage" = 5, "engineering" = 4) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/emitter category = list ("Engineering Machinery") @@ -38,7 +38,7 @@ id = "power_turbine_console" req_tech = list("programming" = 4, "powerstorage" = 5, "engineering" = 4) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/turbine_computer category = list ("Engineering Machinery") @@ -48,7 +48,7 @@ id = "power_compressor" req_tech = list("programming" = 4, "powerstorage" = 5, "engineering" = 4) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/power_compressor category = list ("Engineering Machinery") @@ -58,7 +58,7 @@ id = "power_turbine" req_tech = list("programming" = 4, "powerstorage" = 4, "engineering" = 5) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/power_turbine category = list ("Engineering Machinery") @@ -68,7 +68,7 @@ id = "quantumpad" req_tech = list("programming" = 4, "bluespace" = 4, "plasmatech" = 3, "engineering" = 4) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/quantumpad category = list ("Teleportation Machinery") @@ -78,7 +78,7 @@ id = "telepad" req_tech = list("programming" = 4, "bluespace" = 5, "plasmatech" = 4, "engineering" = 4) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/telesci_pad category = list ("Teleportation Machinery") @@ -88,7 +88,7 @@ id = "tele_hub" req_tech = list("programming" = 3, "bluespace" = 5, "materials" = 4, "engineering" = 5) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/teleporter_hub category = list ("Teleportation Machinery") @@ -98,7 +98,7 @@ id = "tele_station" req_tech = list("programming" = 5, "bluespace" = 4, "engineering" = 4, "plasmatech" = 4) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/teleporter_station category = list ("Teleportation Machinery") @@ -108,7 +108,7 @@ id = "tele_perma" req_tech = list("programming" = 3, "bluespace" = 5, "materials" = 4, "engineering" = 5) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/teleporter_perma category = list ("Teleportation Machinery") @@ -118,7 +118,7 @@ id = "bodyscanner" req_tech = list("programming" = 3, "biotech" = 2, "engineering" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/bodyscanner category = list("Medical Machinery") @@ -128,7 +128,7 @@ id = "bodyscanner_console" req_tech = list("programming" = 3, "biotech" = 2, "engineering" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/bodyscanner_console category = list("Medical Machinery") @@ -138,7 +138,7 @@ id = "clonepod" req_tech = list("programming" = 4, "biotech" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/clonepod category = list("Medical Machinery") @@ -148,7 +148,7 @@ id = "clonescanner" req_tech = list("programming" = 4, "biotech" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/clonescanner category = list("Medical Machinery") @@ -158,7 +158,7 @@ id = "cryotube" req_tech = list("programming" = 5, "biotech" = 3, "engineering" = 4, "plasmatech" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/cryo_tube category = list("Medical Machinery") @@ -168,7 +168,7 @@ id = "chem_dispenser" req_tech = list("programming" = 5, "biotech" = 3, "materials" = 4, "plasmatech" = 4) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/chem_dispenser category = list("Medical Machinery") @@ -178,7 +178,7 @@ id = "chem_master" req_tech = list("biotech" = 3, "materials" = 3, "programming" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/chem_master category = list("Medical Machinery") @@ -188,7 +188,7 @@ id = "chem_heater" req_tech = list("engineering" = 2, "biotech" = 2, "programming" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/chem_heater category = list ("Medical Machinery") @@ -198,7 +198,7 @@ id = "sleeper" req_tech = list("programming" = 3, "biotech" = 2, "engineering" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/sleeper category = list("Medical Machinery") @@ -208,7 +208,7 @@ id = "biogenerator" req_tech = list("programming" = 2, "biotech" = 3, "materials" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/biogenerator category = list ("Hydroponics Machinery") @@ -218,7 +218,7 @@ id = "hydro_tray" req_tech = list("biotech" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/hydroponics category = list ("Hydroponics Machinery") @@ -228,7 +228,7 @@ id = "autolathe" req_tech = list("programming" = 3, "engineering" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/autolathe category = list("Research Machinery") @@ -238,7 +238,7 @@ id = "circuit_imprinter" req_tech = list("programming" = 2, "engineering" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/circuit_imprinter category = list("Research Machinery") @@ -248,7 +248,7 @@ id = "cyborgrecharger" req_tech = list("powerstorage" = 3, "engineering" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/cyborgrecharger category = list("Research Machinery") @@ -258,7 +258,7 @@ id = "destructive_analyzer" req_tech = list("programming" = 2, "magnets" = 2, "engineering" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/destructive_analyzer category = list("Research Machinery") @@ -268,7 +268,7 @@ id = "mechfab" req_tech = list("programming" = 3, "engineering" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/mechfab category = list("Research Machinery") @@ -278,7 +278,7 @@ id = "mech_recharger" req_tech = list("programming" = 3, "powerstorage" = 4, "engineering" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/mech_recharger category = list("Research Machinery") @@ -288,7 +288,7 @@ id = "experimentor" req_tech = list("programming" = 2, "magnets" = 2, "engineering" = 2, "bluespace" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/experimentor category = list("Research Machinery") @@ -298,7 +298,7 @@ id = "protolathe" req_tech = list("programming" = 2, "engineering" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/protolathe category = list("Research Machinery") @@ -308,7 +308,7 @@ id = "rdserver" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/rdserver category = list("Research Machinery") @@ -318,7 +318,7 @@ id = "gibber" req_tech = list("programming" = 2, "engineering" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/gibber category = list ("Misc. Machinery") @@ -328,7 +328,7 @@ id = "smartfridge" req_tech = list("programming" = 1) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/smartfridge category = list ("Misc. Machinery") @@ -338,7 +338,7 @@ id = "monkey_recycler" req_tech = list("programming" = 1) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/monkey_recycler category = list ("Misc. Machinery") @@ -348,7 +348,7 @@ id = "seed_extractor" req_tech = list("programming" = 1) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/seed_extractor category = list ("Hydroponics Machinery") @@ -358,7 +358,7 @@ id = "processor" req_tech = list("programming" = 1) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/processor category = list ("Misc. Machinery") @@ -368,7 +368,7 @@ id = "recycler" req_tech = list("programming" = 2, "engineering" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/recycler category = list ("Misc. Machinery") @@ -378,7 +378,7 @@ id = "holopad" req_tech = list("programming" = 1) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/holopad category = list ("Misc. Machinery") @@ -388,7 +388,7 @@ id = "arcademachinebattle" req_tech = list("programming" = 1) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/arcade/battle category = list("Misc. Machinery") @@ -398,7 +398,7 @@ id = "microwave" req_tech = list("programming" = 2, "magnets" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/microwave category = list("Misc. Machinery") @@ -408,7 +408,7 @@ id = "oven" req_tech = list("programming" = 2, "magnets" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/oven category = list("Misc. Machinery") @@ -418,7 +418,7 @@ id = "grill" req_tech = list("programming" = 2, "magnets" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/grill category = list("Misc. Machinery") @@ -428,7 +428,7 @@ id = "candymaker" req_tech = list("programming" = 2, "magnets" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/candy_maker category = list("Misc. Machinery") @@ -438,7 +438,7 @@ id = "deepfryer" req_tech = list("programming" = 1) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/deepfryer category = list("Misc. Machinery") @@ -448,7 +448,7 @@ id = "arcademachineonion" req_tech = list("programming" = 1) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/arcade/orion_trail category = list("Misc. Machinery") @@ -458,7 +458,7 @@ id = "selunload" req_tech = list("engineering" = 1, "programming" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/programmable category = list("Misc. Machinery") @@ -468,7 +468,7 @@ id = "pod" req_tech = list("programming" = 2,"engineering" = 4) build_type = IMPRINTER - materials = list(MAT_GLASS = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/pod category = list("Misc. Machinery") @@ -478,7 +478,7 @@ id = "ore_redemption" req_tech = list("programming" = 2, "engineering" = 2, "plasmatech" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS=1000, "sacid"=20) + materials = list(MAT_GLASS=1000) build_path = /obj/item/circuitboard/ore_redemption category = list ("Misc. Machinery") @@ -488,7 +488,7 @@ id = "mining_equipment_vendor" req_tech = list("engineering" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS=1000, "sacid"=20) + materials = list(MAT_GLASS=1000) build_path = /obj/item/circuitboard/mining_equipment_vendor category = list ("Misc. Machinery") @@ -498,7 +498,7 @@ id = "clawgame" req_tech = list("programming" = 1) build_type = IMPRINTER - materials = list(MAT_GLASS=1000, "sacid"=20) + materials = list(MAT_GLASS=1000) build_path = /obj/item/circuitboard/clawgame category = list ("Misc. Machinery") @@ -508,7 +508,7 @@ id = "prize_counter" req_tech = list("programming" = 2, "materials" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS=1000, "sacid"=20) + materials = list(MAT_GLASS=1000) build_path = /obj/item/circuitboard/prize_counter category = list("Misc. Machinery") @@ -518,7 +518,7 @@ id = "gameboard" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS=1000, "sacid"=20) + materials = list(MAT_GLASS=1000) build_path = /obj/item/circuitboard/gameboard category = list("Misc. Machinery") @@ -528,7 +528,7 @@ id = "plantgenes" req_tech = list("programming" = 4, "biotech" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS=1000, "sacid"=20) + materials = list(MAT_GLASS=1000) build_path = /obj/item/circuitboard/plantgenes category = list("Hydroponics Machinery") @@ -538,6 +538,6 @@ id = "ntnet_relay" req_tech = list("programming" = 2, "engineering" = 2, "bluespace" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS=1000, "sacid"=20) + materials = list(MAT_GLASS=1000) build_path = /obj/item/circuitboard/machine/ntnet_relay category = list("Subspace Telecomms") diff --git a/code/modules/research/designs/mecha_designs.dm b/code/modules/research/designs/mecha_designs.dm index 008f3fc7a70..266d6dea0b6 100644 --- a/code/modules/research/designs/mecha_designs.dm +++ b/code/modules/research/designs/mecha_designs.dm @@ -8,7 +8,7 @@ id = "ripley_main" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/mecha/ripley/main category = list("Exosuit Modules") @@ -18,7 +18,7 @@ id = "ripley_peri" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/mecha/ripley/peripherals category = list("Exosuit Modules") @@ -29,7 +29,7 @@ id = "odysseus_main" req_tech = list("programming" = 3,"biotech" = 3, "engineering" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/mecha/odysseus/main category = list("Exosuit Modules") @@ -39,7 +39,7 @@ id = "odysseus_peri" req_tech = list("programming" = 3,"biotech" = 3, "engineering" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/mecha/odysseus/peripherals category = list("Exosuit Modules") @@ -50,7 +50,7 @@ id = "gygax_main" req_tech = list("programming" = 4, "combat" = 3, "engineering" = 4) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/mecha/gygax/main category = list("Exosuit Modules") @@ -60,7 +60,7 @@ id = "gygax_peri" req_tech = list("programming" = 4, "combat" = 3, "engineering" = 4) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/mecha/gygax/peripherals category = list("Exosuit Modules") @@ -70,7 +70,7 @@ id = "gygax_targ" req_tech = list("programming" = 4, "combat" = 4, "engineering" = 4) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/mecha/gygax/targeting category = list("Exosuit Modules") @@ -81,7 +81,7 @@ id = "durand_main" req_tech = list("programming" = 4, "combat" = 4, "engineering" = 4) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/mecha/durand/main category = list("Exosuit Modules") @@ -91,7 +91,7 @@ id = "durand_peri" req_tech = list("programming" = 4, "combat" = 4, "engineering" = 4) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/mecha/durand/peripherals category = list("Exosuit Modules") @@ -101,7 +101,7 @@ id = "durand_targ" req_tech = list("programming" = 5, "combat" = 4, "engineering" = 4) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/mecha/durand/targeting category = list("Exosuit Modules") @@ -112,7 +112,7 @@ id = "phazon_main" req_tech = list("programming" = 6, "materials" = 6, "plasmatech" = 5) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/mecha/phazon/main category = list("Exosuit Modules") @@ -122,7 +122,7 @@ id = "phazon_peri" req_tech = list("programming" = 6, "bluespace" = 5, "plasmatech" = 5) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/mecha/phazon/peripherals category = list("Exosuit Modules") @@ -132,7 +132,7 @@ id = "phazon_targ" req_tech = list("programming" = 6, "magnets" = 5, "plasmatech" = 5) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/mecha/phazon/targeting category = list("Exosuit Modules") @@ -143,7 +143,7 @@ id = "honker_main" req_tech = list("programming" = 3, "engineering" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/mecha/honker/main category = list("Exosuit Modules") @@ -153,7 +153,7 @@ id = "honker_peri" req_tech = list("programming" = 3, "engineering" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/mecha/honker/peripherals category = list("Exosuit Modules") @@ -163,7 +163,7 @@ id = "honker_targ" req_tech = list("programming" = 3, "engineering" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/mecha/honker/targeting category = list("Exosuit Modules") @@ -173,7 +173,7 @@ id = "reticence_main" req_tech = list("programming" = 3, "engineering" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/mecha/reticence/main category = list("Exosuit Modules") @@ -183,7 +183,7 @@ id = "reticence_peri" req_tech = list("programming" = 3, "engineering" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/mecha/reticence/peripherals category = list("Exosuit Modules") @@ -193,6 +193,6 @@ id = "reticence_targ" req_tech = list("programming" = 3, "engineering" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/mecha/reticence/targeting category = list("Exosuit Modules") diff --git a/code/modules/research/designs/power_designs.dm b/code/modules/research/designs/power_designs.dm index 4be4cafe874..df78a037c56 100644 --- a/code/modules/research/designs/power_designs.dm +++ b/code/modules/research/designs/power_designs.dm @@ -63,7 +63,7 @@ id = "pacman" req_tech = list("programming" = 2, "plasmatech" = 3, "powerstorage" = 3, "engineering" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/pacman category = list("Engineering Machinery") @@ -73,7 +73,7 @@ id = "mrspacman" req_tech = list("programming" = 3, "powerstorage" = 5, "engineering" = 5, "plasmatech" = 4) build_type = IMPRINTER - materials = list(MAT_GLASS = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/pacman/mrs category = list("Engineering Machinery") @@ -83,7 +83,7 @@ id = "superpacman" req_tech = list("programming" = 3, "powerstorage" = 4, "engineering" = 4) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/pacman/super category = list("Engineering Machinery") @@ -93,7 +93,7 @@ id = "tesla_coil" req_tech = list("programming" = 3, "powerstorage" = 3, "magnets" = 3) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/tesla_coil category = list("Engineering Machinery") @@ -103,6 +103,6 @@ id = "grounding_rod" req_tech = list("programming" = 3, "powerstorage" = 3, "magnets" = 3, "plasmatech" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/grounding_rod category = list("Engineering Machinery") diff --git a/code/modules/research/designs/telecomms_designs.dm b/code/modules/research/designs/telecomms_designs.dm index 997b39aff18..848349dab83 100644 --- a/code/modules/research/designs/telecomms_designs.dm +++ b/code/modules/research/designs/telecomms_designs.dm @@ -7,7 +7,7 @@ id = "s-bus" req_tech = list("programming" = 2, "engineering" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/telecomms/bus category = list("Subspace Telecomms") @@ -17,7 +17,7 @@ id = "s-hub" req_tech = list("programming" = 2, "engineering" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/telecomms/hub category = list("Subspace Telecomms") @@ -28,7 +28,7 @@ id = "s-processor" req_tech = list("programming" = 2, "engineering" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/telecomms/processor category = list("Subspace Telecomms") @@ -38,7 +38,7 @@ id = "s-relay" req_tech = list("programming" = 2, "engineering" = 2, "bluespace" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/telecomms/relay category = list("Subspace Telecomms") @@ -48,7 +48,7 @@ id = "s-server" req_tech = list("programming" = 2, "engineering" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/telecomms/server category = list("Subspace Telecomms") @@ -58,7 +58,7 @@ id = "s-broadcaster" req_tech = list("programming" = 2, "engineering" = 2) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/telecomms/broadcaster category = list("Subspace Telecomms") @@ -68,7 +68,7 @@ id = "s-receiver" req_tech = list("programming" = 2, "engineering" = 2, "bluespace" = 1) build_type = IMPRINTER - materials = list(MAT_GLASS = 1000, "sacid" = 20) + materials = list(MAT_GLASS = 1000) build_path = /obj/item/circuitboard/telecomms/receiver category = list("Subspace Telecomms") diff --git a/code/modules/research/designs/weapon_designs.dm b/code/modules/research/designs/weapon_designs.dm index 2dd864fdab6..8f724ed337f 100644 --- a/code/modules/research/designs/weapon_designs.dm +++ b/code/modules/research/designs/weapon_designs.dm @@ -20,7 +20,7 @@ req_tech = list("combat" = 5, "materials" = 5, "biotech" = 6, "plasmatech" = 7) build_type = PROTOLATHE materials = list(MAT_GOLD = 5000,MAT_URANIUM = 10000) - reagents = list("mutagen" = 40) + reagents_list = list("mutagen" = 40) build_path = /obj/item/gun/energy/decloner locked = 1 category = list("Weapons") @@ -43,7 +43,7 @@ req_tech = list("materials" = 2, "biotech" = 4) build_type = PROTOLATHE materials = list(MAT_METAL = 2000, MAT_GLASS = 500) - reagents = list("radium" = 20) + reagents_list = list("radium" = 20) build_path = /obj/item/gun/energy/floragun category = list("Weapons") diff --git a/code/modules/research/destructive_analyzer.dm b/code/modules/research/destructive_analyzer.dm index 79bbeb2a494..027a8549df4 100644 --- a/code/modules/research/destructive_analyzer.dm +++ b/code/modules/research/destructive_analyzer.dm @@ -9,7 +9,6 @@ Note: Must be placed within 3 tiles of the R&D Console name = "Destructive Analyzer" desc = "Learn science by destroying things!" icon_state = "d_analyzer" - var/obj/item/loaded_item = null var/decon_mod = 0 /obj/machinery/r_n_d/destructive_analyzer/New() @@ -46,7 +45,8 @@ Note: Must be placed within 3 tiles of the R&D Console /obj/machinery/r_n_d/destructive_analyzer/attackby(var/obj/item/O as obj, var/mob/user as mob, params) if(shocked) - shock(user,50) + if(shock(user,50)) + return TRUE if(default_deconstruction_screwdriver(user, "d_analyzer_t", "d_analyzer", O)) if(linked_console) linked_console.linked_destroy = null @@ -56,7 +56,8 @@ Note: Must be placed within 3 tiles of the R&D Console if(exchange_parts(user, O)) return - default_deconstruction_crowbar(O) + if(default_deconstruction_crowbar(O)) + return if(disabled) return @@ -84,5 +85,4 @@ Note: Must be placed within 3 tiles of the R&D Console flick("d_analyzer_la", src) spawn(10) icon_state = "d_analyzer_l" - busy = 0 - return + busy = 0 \ No newline at end of file diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index e58c1bb6994..ea3d4c7c182 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -25,7 +25,6 @@ var/recentlyExperimented = 0 var/mob/trackedIan var/mob/trackedRuntime - var/obj/item/loaded_item = null var/badThingCoeff = 0 var/resetTime = 15 var/cloneMode = FALSE diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm index c430e660178..0fa843cb8ae 100644 --- a/code/modules/research/protolathe.dm +++ b/code/modules/research/protolathe.dm @@ -27,15 +27,11 @@ Note: Must be placed west/left of and R&D console to function. "Stock Parts", "Weapons" ) - var/datum/component/material_container/materials //Store for hyper speed! + reagents = new() /obj/machinery/r_n_d/protolathe/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, - FALSE, list(/obj/item/stack, /obj/item/ore/bluespace_crystal), CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert)) - materials.precise_insertion = TRUE ..() component_parts = list() component_parts += new /obj/item/circuitboard/protolathe(null) @@ -79,7 +75,7 @@ Note: Must be placed west/left of and R&D console to function. var/A = materials.amount(M) if(!A) A = reagents.get_reagent_amount(M) - A = A / max(1, (being_built.reagents[M])) + A = A / max(1, (being_built.reagents_list[M])) else A = A / max(1, (being_built.materials[M])) return A @@ -114,39 +110,4 @@ Note: Must be placed west/left of and R&D console to function. if(O.is_open_container()) return FALSE else - return ..() - -//whether the machine can have an item inserted in its current state. -/obj/machinery/r_n_d/protolathe/proc/is_insertion_ready(mob/user) - if(panel_open) - to_chat(user, "You can't load [src] while it's opened!") - return FALSE - if(disabled) - return FALSE - if(!linked_console) - to_chat(user, "[src] must be linked to an R&D console first!") - return FALSE - if(busy) - to_chat(user, "[src] is busy right now.") - return FALSE - if(stat & BROKEN) - to_chat(user, "[src] is broken.") - return FALSE - if(stat & NOPOWER) - to_chat(user, "[src] has no power.") - return FALSE - return TRUE - -/obj/machinery/r_n_d/protolathe/proc/AfterMaterialInsert(type_inserted, id_inserted, amount_inserted) - var/stack_name - if(ispath(type_inserted, /obj/item/ore/bluespace_crystal)) - stack_name = "bluespace polycrystal" - use_power(MINERAL_MATERIAL_AMOUNT / 10) - else - var/obj/item/stack/S = type_inserted - stack_name = initial(S.name) - use_power(min(1000, (amount_inserted / 100))) - overlays += "protolathe_[stack_name]" - sleep(10) - overlays -= "protolathe_[stack_name]" - SSnanoui.update_uis(src) \ No newline at end of file + return ..() \ No newline at end of file diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index 152a1665cca..8f3df6ef37a 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -447,16 +447,16 @@ won't update every console in existence) but it's more of a hassle to do. Also, enough_materials = 0 g2g = 0 else - for(var/R in being_built.reagents) - if(!linked_lathe.reagents.has_reagent(R, being_built.reagents[R])*coeff) + for(var/R in being_built.reagents_list) + if(!linked_lathe.reagents.has_reagent(R, being_built.reagents_list[R])*coeff) src.visible_message("The [src.name] beeps, \"Not enough reagents to complete prototype.\"") enough_materials = 0 g2g = 0 if(enough_materials) linked_lathe.materials.use_amount(efficient_mats, amount) - for(var/R in being_built.reagents) - linked_lathe.reagents.remove_reagent(R, being_built.reagents[R]*coeff) + for(var/R in being_built.reagents_list) + linked_lathe.reagents.remove_reagent(R, being_built.reagents_list[R]*coeff) var/P = being_built.build_path //lets save these values before the spawn() just in case. Nobody likes runtimes. var/O = being_built.locked @@ -488,6 +488,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, else if(href_list["imprint"]) //Causes the Circuit Imprinter to build something. var/coeff = linked_imprinter.efficiency_coeff var/g2g = 1 + var/enough_materials = 1 if(linked_imprinter) if(linked_imprinter.busy) to_chat(usr, "Circuit Imprinter is busy at the moment.") @@ -509,20 +510,25 @@ won't update every console in existence) but it's more of a hassle to do. Also, flick("circuit_imprinter_ani",linked_imprinter) use_power(power) - for(var/M in being_built.materials) - if(!linked_imprinter.check_mat(being_built, M)) - src.visible_message("The [src.name] beeps, \"Not enough materials to complete prototype.\"") - g2g = 0 - break - switch(M) - if(MAT_GLASS) - linked_imprinter.g_amount = max(0, (linked_imprinter.g_amount-being_built.materials[M]/coeff)) - if(MAT_GOLD) - linked_imprinter.gold_amount = max(0, (linked_imprinter.gold_amount-being_built.materials[M]/coeff)) - if(MAT_DIAMOND) - linked_imprinter.diamond_amount = max(0, (linked_imprinter.diamond_amount-being_built.materials[M]/coeff)) - else - linked_imprinter.reagents.remove_reagent(M, being_built.materials[M]/coeff) + var/list/efficient_mats = list() + for(var/MAT in being_built.materials) + efficient_mats[MAT] = being_built.materials[MAT]/coeff + + if(!linked_imprinter.materials.has_materials(efficient_mats)) + visible_message("The [src.name] beeps, \"Not enough materials to complete prototype.\"") + enough_materials = 0 + g2g = 0 + else + for(var/R in being_built.reagents_list) + if(!linked_imprinter.reagents.has_reagent(R, being_built.reagents_list[R]/coeff)) + visible_message("The [name] beeps, \"Not enough reagents to complete prototype.\"") + enough_materials = 0 + g2g = 0 + + if(enough_materials) + linked_imprinter.materials.use_amount(efficient_mats) + for(var/R in being_built.reagents_list) + linked_imprinter.reagents.remove_reagent(R, being_built.reagents_list[R]/coeff) var/P = being_built.build_path //lets save these values before the spawn() just in case. Nobody likes runtimes. spawn(IMPRINTER_DELAY) @@ -567,25 +573,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, desired_num_sheets = round(desired_num_sheets) // No partial-sheet goofery else desired_num_sheets = text2num(href_list["imprinter_ejectsheet_amt"]) - var/res_amount, type - switch(href_list["imprinter_ejectsheet"]) - if(MAT_GLASS) - type = /obj/item/stack/sheet/glass - res_amount = "g_amount" - if(MAT_GOLD) - type = /obj/item/stack/sheet/mineral/gold - res_amount = "gold_amount" - if(MAT_DIAMOND) - type = /obj/item/stack/sheet/mineral/diamond - res_amount = "diamond_amount" - if(ispath(type) && hasvar(linked_imprinter, res_amount)) - var/obj/item/stack/sheet/sheet = new type(linked_imprinter.loc) - var/available_num_sheets = round(linked_imprinter.vars[res_amount]/sheet.perunit) - if(available_num_sheets>0) - sheet.amount = min(available_num_sheets, desired_num_sheets) - linked_imprinter.vars[res_amount] = max(0, (linked_imprinter.vars[res_amount]-sheet.amount * sheet.perunit)) - else - qdel(sheet) + linked_imprinter.materials.retrieve_sheets(desired_num_sheets, href_list["imprinter_ejectsheet"]) else if(href_list["find_device"]) //The R&D console looks for devices nearby to link up with. add_wait_message("Updating Database...", SYNC_DEVICE_DELAY) @@ -789,11 +777,11 @@ won't update every console in existence) but it's more of a hassle to do. Also, material_list["is_red"] = 0 c = min(c, t) - for(var/R in D.reagents) + for(var/R in D.reagents_list) var/list/material_list = list() materials_list[++materials_list.len] = material_list material_list["name"] = CallMaterialName(R) - material_list["amount"] = D.reagents[R]*coeff + material_list["amount"] = D.reagents_list[R]*coeff var/t = linked_lathe.check_mat(D, R) if(t < 1) @@ -828,8 +816,10 @@ won't update every console in existence) but it's more of a hassle to do. Also, loaded_chemical["id"] = R.id if(menu == 5 && linked_imprinter) - data["total_materials"] = linked_imprinter.TotalMaterials() + data["total_materials"] = linked_imprinter.materials.total_amount + data["max_materials"] = linked_imprinter.materials.max_amount data["total_chemicals"] = linked_imprinter.reagents.total_volume + data["max_chemicals"] = linked_imprinter.reagents.maximum_volume data["categories"] = linked_imprinter.categories if(submenu == 1) var/list/designs_list = list() @@ -853,13 +843,34 @@ won't update every console in existence) but it's more of a hassle to do. Also, material_list["is_red"] = 1 else material_list["is_red"] = 0 + + for(var/R in D.reagents_list) + var/list/material_list = list() + materials_list[++materials_list.len] = material_list + material_list["name"] = CallMaterialName(R) + material_list["amount"] = D.reagents_list[R]*coeff + if(!linked_imprinter.check_mat(D, R)) + check_materials = 0 + material_list["is_red"] = 1 + else + material_list["is_red"] = 0 + design_list["can_build"] = check_materials if(submenu == 2) var/list/materials_list = list() data["loaded_materials"] = materials_list - materials_list[++materials_list.len] = list("name" = "Glass", "id" = MAT_GLASS, "amount" = linked_imprinter.g_amount) - materials_list[++materials_list.len] = list("name" = "Gold", "id" = MAT_GOLD, "amount" = linked_imprinter.gold_amount) - materials_list[++materials_list.len] = list("name" = "Diamond", "id" = MAT_DIAMOND, "amount" = linked_imprinter.diamond_amount) + materials_list[++materials_list.len] = list("name" = "Metal", "id" = MAT_METAL, "amount" = linked_imprinter.materials.amount(MAT_METAL)) + materials_list[++materials_list.len] = list("name" = "Glass", "id" = MAT_GLASS, "amount" = linked_imprinter.materials.amount(MAT_GLASS)) + materials_list[++materials_list.len] = list("name" = "Gold", "id" = MAT_GOLD, "amount" = linked_imprinter.materials.amount(MAT_GOLD)) + materials_list[++materials_list.len] = list("name" = "Silver", "id" = MAT_SILVER, "amount" = linked_imprinter.materials.amount(MAT_SILVER)) + materials_list[++materials_list.len] = list("name" = "Solid Plasma", "id" = MAT_PLASMA, "amount" = linked_imprinter.materials.amount(MAT_PLASMA)) + materials_list[++materials_list.len] = list("name" = "Uranium", "id" = MAT_URANIUM, "amount" = linked_imprinter.materials.amount(MAT_URANIUM)) + materials_list[++materials_list.len] = list("name" = "Diamond", "id" = MAT_DIAMOND, "amount" = linked_imprinter.materials.amount(MAT_DIAMOND)) + materials_list[++materials_list.len] = list("name" = "Bananium", "id" = MAT_BANANIUM, "amount" = linked_imprinter.materials.amount(MAT_BANANIUM)) + materials_list[++materials_list.len] = list("name" = "Tranquillite", "id" = MAT_TRANQUILLITE, "amount" = linked_imprinter.materials.amount(MAT_TRANQUILLITE)) + materials_list[++materials_list.len] = list("name" = "Titanium", "id" = MAT_TITANIUM, "amount" = linked_imprinter.materials.amount(MAT_TITANIUM)) + materials_list[++materials_list.len] = list("name" = "Plastic", "id" = MAT_PLASTIC, "amount" = linked_imprinter.materials.amount(MAT_PLASTIC)) + materials_list[++materials_list.len] = list("name" = "Bluespace Mesh", "id" = MAT_BLUESPACE, "amount" = linked_imprinter.materials.amount(MAT_BLUESPACE)) if(submenu == 3) var/list/loaded_chemicals = list() data["loaded_chemicals"] = loaded_chemicals diff --git a/code/modules/research/rdmachines.dm b/code/modules/research/rdmachines.dm index bebddfaf6c0..fde13d4d478 100644 --- a/code/modules/research/rdmachines.dm +++ b/code/modules/research/rdmachines.dm @@ -16,8 +16,14 @@ var/disable_wire var/shock_wire var/obj/machinery/computer/rdconsole/linked_console + var/obj/item/loaded_item = null + var/datum/component/material_container/materials //Store for hyper speed! /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, + FALSE, list(/obj/item/stack, /obj/item/ore/bluespace_crystal), CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert)) + materials.precise_insertion = TRUE ..() wires["Red"] = 0 wires["Blue"] = 0 @@ -88,3 +94,40 @@ src.shocked = !src.shocked src.shock(usr,50) src.updateUsrDialog() + +//whether the machine can have an item inserted in its current state. +/obj/machinery/r_n_d/proc/is_insertion_ready(mob/user) + if(panel_open) + to_chat(user, "You can't load [src] while it's opened!") + return FALSE + if(disabled) + return FALSE + if(!linked_console) + to_chat(user, "[src] must be linked to an R&D console first!") + return FALSE + if(busy) + to_chat(user, "[src] is busy right now.") + return FALSE + if(stat & BROKEN) + to_chat(user, "[src] is broken.") + return FALSE + if(stat & NOPOWER) + to_chat(user, "[src] has no power.") + return FALSE + if(loaded_item) + to_chat(user, "[src] is already loaded.") + return FALSE + return TRUE + +/obj/machinery/r_n_d/proc/AfterMaterialInsert(type_inserted, id_inserted, amount_inserted) + var/stack_name + if(ispath(type_inserted, /obj/item/ore/bluespace_crystal)) + stack_name = "bluespace polycrystal" + use_power(MINERAL_MATERIAL_AMOUNT / 10) + else + var/obj/item/stack/S = type_inserted + stack_name = initial(S.name) + use_power(min(1000, (amount_inserted / 100))) + overlays += "protolathe_[stack_name]" + sleep(10) + overlays -= "protolathe_[stack_name]" \ No newline at end of file diff --git a/icons/obj/machines/research.dmi b/icons/obj/machines/research.dmi index c0f2dabd5b3..d5ab5866f8c 100644 Binary files a/icons/obj/machines/research.dmi and b/icons/obj/machines/research.dmi differ