Design Transfer Blueprints Protolathe->Autolathe

This commit is contained in:
Fox-McCloud
2016-03-20 03:53:11 -04:00
parent 16f66499e5
commit 42f494aa7e
2 changed files with 25 additions and 1 deletions
+14 -1
View File
@@ -43,7 +43,8 @@
"Medical",
"Miscellaneous",
"Security",
"Tools"
"Tools",
"Imported"
)
/obj/machinery/autolathe/New()
@@ -128,6 +129,18 @@
if (stat)
return 1
if(istype(O, /obj/item/weapon/disk/design_disk))
user.visible_message("[user] begins to load \the [O] in \the [src]...",
"You begin to load a design from \the [O]...",
"You hear the chatter of a floppy drive.")
busy = 1
var/obj/item/weapon/disk/design_disk/D = O
if(do_after(user, 14.4, target = src))
files.AddDesign2Known(D.blueprint)
busy = 0
return
var/material_amount = materials.get_item_material_amount(O)
if(!material_amount)
user << "<span class='warning'>This object does not contain sufficient amounts of metal or glass to be accepted by the autolathe.</span>"
+11
View File
@@ -246,6 +246,17 @@ proc/CallMaterialName(ID)
else if(href_list["copy_design"]) //Copy design data from the research holder to the design disk.
for(var/datum/design/D in files.known_designs)
if(href_list["copy_design_ID"] == D.id)
var/autolathe_friendly = 1
for(var/x in D.materials)
if( !(x in list(MAT_METAL, MAT_GLASS)))
autolathe_friendly = 0
D.category -= "Imported"
if(D.locked)
autolathe_friendly = 0
D.category -= "Imported"
if(D.build_type & (AUTOLATHE|PROTOLATHE|CRAFTLATHE)) // Specifically excludes circuit imprinter and mechfab
D.build_type = autolathe_friendly ? (D.build_type | AUTOLATHE) : D.build_type
D.category |= "Imported"
d_disk.blueprint = D
break
screen = 1.4