RnD Deconstruction Fix (#2081)

changes:

Fixed a bug where the Circuit Imprinter & the Protolathe tried to new() a material name instead of the material's type on deconstruct. This fixes a runtime preventing deconstruction when the machine contained materials.
Fixes #2080.
This commit is contained in:
Lohikar
2017-04-13 23:31:19 +03:00
committed by skull132
parent 078420769e
commit efc668fa89
3 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -102,7 +102,7 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid).
if(materials[f] >= SHEET_MATERIAL_AMOUNT)
var/path = getMaterialType(f)
if(path)
var/obj/item/stack/S = new f(loc)
var/obj/item/stack/S = new path(loc)
S.amount = round(materials[f] / SHEET_MATERIAL_AMOUNT)
..()
+1 -1
View File
@@ -90,7 +90,7 @@
if(materials[f] >= SHEET_MATERIAL_AMOUNT)
var/path = getMaterialType(f)
if(path)
var/obj/item/stack/S = new f(loc)
var/obj/item/stack/S = new path(loc)
S.amount = round(materials[f] / SHEET_MATERIAL_AMOUNT)
..()