Removes copypaste

This commit is contained in:
Kelenius
2016-01-18 16:04:01 +03:00
parent ee531578d7
commit 671b3b2d96
3 changed files with 20 additions and 30 deletions

View File

@@ -8,8 +8,6 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid).
name = "Circuit Imprinter"
icon_state = "circuit_imprinter"
flags = OPENCONTAINER
var/list/materials = list("metal" = 0, "glass" = 0, "gold" = 0, "silver" = 0, "phoron" = 0, "uranium" = 0, "diamond" = 0)
var/list/datum/design/queue = list()
var/progress = 0
@@ -17,6 +15,8 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid).
var/mat_efficiency = 1
var/speed = 1
materials = list("metal" = 0, "glass" = 0, "gold" = 0, "silver" = 0, "phoron" = 0, "uranium" = 0, "diamond" = 0)
use_power = 1
idle_power_usage = 30
active_power_usage = 2500
@@ -201,16 +201,3 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid).
if(new_item.matter && new_item.matter.len > 0)
for(var/i in new_item.matter)
new_item.matter[i] = new_item.matter[i] * mat_efficiency
/obj/machinery/r_n_d/circuit_imprinter/proc/eject(var/material, var/amount)
if(!(material in materials))
return
var/obj/item/stack/material/sheetType = getMaterialType(material)
var/perUnit = initial(sheetType.perunit)
var/eject = round(materials[material] / perUnit)
eject = amount == -1 ? eject : min(eject, amount)
if(eject < 1)
return
var/obj/item/stack/material/S = new sheetType(loc)
S.amount = eject
materials[material] -= eject * perUnit