Screw commit history.
This commit is contained in:
@@ -52,14 +52,14 @@ Nothing else in the console has ID requirements.
|
||||
research_control = FALSE
|
||||
|
||||
/proc/CallMaterialName(ID)
|
||||
if (copytext(ID, 1, 2) == "$" && GLOB.materials_list[ID])
|
||||
var/datum/material/material = GLOB.materials_list[ID]
|
||||
if (istype(ID, /datum/material))
|
||||
var/datum/material/material = ID
|
||||
return material.name
|
||||
|
||||
else if(GLOB.chemical_reagents_list[ID])
|
||||
var/datum/reagent/reagent = GLOB.chemical_reagents_list[ID]
|
||||
return reagent.name
|
||||
return "ERROR: Report This"
|
||||
return ID
|
||||
|
||||
/obj/machinery/computer/rdconsole/proc/SyncRDevices() //Makes sure it is properly sync'ed up with the devices attached to it (if any).
|
||||
for(var/obj/machinery/rnd/D in oview(3,src))
|
||||
@@ -377,11 +377,13 @@ Nothing else in the console has ID requirements.
|
||||
l += ui_protolathe_header()
|
||||
l += "<div class='statusDisplay'><h3>Material Storage:</h3>"
|
||||
for(var/mat_id in mat_container.materials)
|
||||
var/datum/material/M = mat_container.materials[mat_id]
|
||||
l += "* [M.amount] of [M.name]: "
|
||||
if(M.amount >= MINERAL_MATERIAL_AMOUNT) l += "<A href='?src=[REF(src)];ejectsheet=[M.id];eject_amt=1'>Eject</A> [RDSCREEN_NOBREAK]"
|
||||
if(M.amount >= MINERAL_MATERIAL_AMOUNT*5) l += "<A href='?src=[REF(src)];ejectsheet=[M.id];eject_amt=5'>5x</A> [RDSCREEN_NOBREAK]"
|
||||
if(M.amount >= MINERAL_MATERIAL_AMOUNT) l += "<A href='?src=[REF(src)];ejectsheet=[M.id];eject_amt=50'>All</A>[RDSCREEN_NOBREAK]"
|
||||
var/datum/material/M = mat_id
|
||||
var/amount = mat_container.materials[mat_id]
|
||||
var/ref = REF(M)
|
||||
l += "* [amount] of [M.name]: "
|
||||
if(amount >= MINERAL_MATERIAL_AMOUNT) l += "<A href='?src=[REF(src)];ejectsheet=[ref];eject_amt=1'>Eject</A> [RDSCREEN_NOBREAK]"
|
||||
if(amount >= MINERAL_MATERIAL_AMOUNT*5) l += "<A href='?src=[REF(src)];ejectsheet=[ref];eject_amt=5'>5x</A> [RDSCREEN_NOBREAK]"
|
||||
if(amount >= MINERAL_MATERIAL_AMOUNT) l += "<A href='?src=[REF(src)];ejectsheet=[ref];eject_amt=50'>All</A>[RDSCREEN_NOBREAK]"
|
||||
l += ""
|
||||
l += "</div>[RDSCREEN_NOBREAK]"
|
||||
return l
|
||||
@@ -510,11 +512,13 @@ Nothing else in the console has ID requirements.
|
||||
l += ui_circuit_header()
|
||||
l += "<h3><div class='statusDisplay'>Material Storage:</h3>"
|
||||
for(var/mat_id in mat_container.materials)
|
||||
var/datum/material/M = mat_container.materials[mat_id]
|
||||
l += "* [M.amount] of [M.name]: "
|
||||
if(M.amount >= MINERAL_MATERIAL_AMOUNT) l += "<A href='?src=[REF(src)];imprinter_ejectsheet=[M.id];eject_amt=1'>Eject</A> [RDSCREEN_NOBREAK]"
|
||||
if(M.amount >= MINERAL_MATERIAL_AMOUNT*5) l += "<A href='?src=[REF(src)];imprinter_ejectsheet=[M.id];eject_amt=5'>5x</A> [RDSCREEN_NOBREAK]"
|
||||
if(M.amount >= MINERAL_MATERIAL_AMOUNT) l += "<A href='?src=[REF(src)];imprinter_ejectsheet=[M.id];eject_amt=50'>All</A>[RDSCREEN_NOBREAK]</div>"
|
||||
var/datum/material/M = mat_id
|
||||
var/amount = mat_container.materials[mat_id]
|
||||
var/ref = REF(M)
|
||||
l += "* [amount] of [M.name]: "
|
||||
if(amount >= MINERAL_MATERIAL_AMOUNT) l += "<A href='?src=[REF(src)];imprinter_ejectsheet=[ref];eject_amt=1'>Eject</A> [RDSCREEN_NOBREAK]"
|
||||
if(amount >= MINERAL_MATERIAL_AMOUNT*5) l += "<A href='?src=[REF(src)];imprinter_ejectsheet=[ref];eject_amt=5'>5x</A> [RDSCREEN_NOBREAK]"
|
||||
if(amount >= MINERAL_MATERIAL_AMOUNT) l += "<A href='?src=[REF(src)];imprinter_ejectsheet=[ref];eject_amt=50'>All</A>[RDSCREEN_NOBREAK]</div>"
|
||||
return l
|
||||
|
||||
/obj/machinery/computer/rdconsole/proc/ui_techdisk() //Legacy code
|
||||
@@ -616,8 +620,8 @@ Nothing else in the console has ID requirements.
|
||||
l += "</div>[RDSCREEN_NOBREAK]"
|
||||
|
||||
if(!(linked_destroy.loaded_item.resistance_flags & INDESTRUCTIBLE))
|
||||
var/list/materials = linked_destroy.loaded_item.materials
|
||||
l += "<div class='statusDisplay'><A href='?src=[REF(src)];deconstruct=[RESEARCH_MATERIAL_RECLAMATION_ID]'>[materials.len? "Material Reclamation" : "Destroy Item"]</A>"
|
||||
var/list/materials = linked_destroy.loaded_item.custom_materials
|
||||
l += "<div class='statusDisplay'><A href='?src=[REF(src)];deconstruct=[RESEARCH_MATERIAL_RECLAMATION_ID]'>[LAZYLEN(materials)? "Material Reclamation" : "Destroy Item"]</A>"
|
||||
for (var/M in materials)
|
||||
l += "* [CallMaterialName(M)] x [materials[M]]"
|
||||
l += "</div>[RDSCREEN_NOBREAK]"
|
||||
@@ -934,7 +938,8 @@ Nothing else in the console has ID requirements.
|
||||
if(!linked_lathe.materials.mat_container)
|
||||
say("No material storage linked to protolathe!")
|
||||
return
|
||||
linked_lathe.eject_sheets(ls["ejectsheet"], ls["eject_amt"])
|
||||
var/datum/material/M = locate(ls["ejectsheet"]) in linked_lathe.materials.mat_container.materials
|
||||
linked_lathe.eject_sheets(M, ls["eject_amt"])
|
||||
//Circuit Imprinter Materials
|
||||
if(ls["disposeI"]) //Causes the circuit imprinter to dispose of a single reagent (all of it)
|
||||
if(QDELETED(linked_imprinter))
|
||||
@@ -953,7 +958,8 @@ Nothing else in the console has ID requirements.
|
||||
if(!linked_imprinter.materials.mat_container)
|
||||
say("No material storage linked to circuit imprinter!")
|
||||
return
|
||||
linked_imprinter.eject_sheets(ls["imprinter_ejectsheet"], ls["eject_amt"])
|
||||
var/datum/material/M = locate(ls["imprinter_ejectsheet"]) in linked_imprinter.materials.mat_container.materials
|
||||
linked_imprinter.eject_sheets(M, ls["eject_amt"])
|
||||
if(ls["disk_slot"])
|
||||
disk_slot_selected = text2num(ls["disk_slot"])
|
||||
if(ls["research_node"])
|
||||
@@ -1016,7 +1022,7 @@ Nothing else in the console has ID requirements.
|
||||
D.category -= "Imported"
|
||||
else
|
||||
for(var/x in D.materials)
|
||||
if( !(x in list(MAT_METAL, MAT_GLASS)))
|
||||
if( !(x in list(/datum/material/iron, /datum/material/glass)))
|
||||
autolathe_friendly = FALSE
|
||||
D.category -= "Imported"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user