Update circuitprinter.dm
This commit is contained in:
@@ -94,50 +94,3 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
|
||||
use_power(max(1000, (MINERAL_MATERIAL_AMOUNT * M.last_amount_inserted / 10)))
|
||||
add_overlay("protolathe_[stack_name]")
|
||||
addtimer(CALLBACK(src, /atom/proc/cut_overlay, "protolathe_[stack_name]"), 10)
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
/obj/machinery/rnd/circuit_imprinter/proc/user_try_print_id(id)
|
||||
if((!linked_console && requires_console) || !id)
|
||||
return FALSE
|
||||
var/datum/design/D = (linked_console || requires_console)? linked_console.stored_research.researched_designs[id] : get_techweb_design_by_id(id)
|
||||
if(!istype(D))
|
||||
return FALSE
|
||||
|
||||
var/power = 1000
|
||||
for(var/M in D.materials)
|
||||
power += round(D.materials[M] / 5)
|
||||
power = max(4000, power)
|
||||
use_power(power)
|
||||
|
||||
var/list/efficient_mats = list()
|
||||
for(var/MAT in D.materials)
|
||||
efficient_mats[MAT] = D.materials[MAT]/efficiency_coeff
|
||||
|
||||
if(!materials.has_materials(efficient_mats))
|
||||
say("Not enough materials to complete prototype.")
|
||||
return FALSE
|
||||
for(var/R in D.reagents_list)
|
||||
if(!reagents.has_reagent(R, D.reagents_list[R]/efficiency_coeff))
|
||||
say("Not enough reagents to complete prototype.")
|
||||
return FALSE
|
||||
|
||||
busy = TRUE
|
||||
flick("circuit_imprinter_ani", src)
|
||||
materials.use_amount(efficient_mats)
|
||||
for(var/R in D.reagents_list)
|
||||
reagents.remove_reagent(R, D.reagents_list[R]/efficiency_coeff)
|
||||
|
||||
var/P = D.build_path
|
||||
addtimer(CALLBACK(src, .proc/reset_busy), 16)
|
||||
addtimer(CALLBACK(src, .proc/do_print, P, efficient_mats, D.dangerous_construction), 16)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/rnd/circuit_imprinter/proc/do_print(path, list/matlist, notify_admins)
|
||||
if(notify_admins && usr)
|
||||
investigate_log("[key_name(usr)] built [path] at a circuit imprinter.", INVESTIGATE_RESEARCH)
|
||||
message_admins("[ADMIN_LOOKUPFLW(usr)] has built [path] at a circuit imprinter.")
|
||||
var/obj/item/I = new path(get_turf(src))
|
||||
I.materials = matlist.Copy()
|
||||
SSblackbox.record_feedback("nested_tally", "circuit_printed", 1, list("[type]", "[path]"))
|
||||
>>>>>>> b09b1c3... A few investigate_log and message_admin fixes (#32993)
|
||||
|
||||
Reference in New Issue
Block a user