From efc668fa893c2de15365f129ba35586117a515de Mon Sep 17 00:00:00 2001 From: Lohikar Date: Thu, 13 Apr 2017 15:31:19 -0500 Subject: [PATCH] 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. --- code/modules/research/circuitprinter.dm | 2 +- code/modules/research/protolathe.dm | 2 +- html/changelogs/lohikar-rndfix.yml | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 html/changelogs/lohikar-rndfix.yml diff --git a/code/modules/research/circuitprinter.dm b/code/modules/research/circuitprinter.dm index 9e1bad6ab37..cd3b49b55cc 100644 --- a/code/modules/research/circuitprinter.dm +++ b/code/modules/research/circuitprinter.dm @@ -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) ..() diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm index bb6c989bcd9..b27db2ac745 100644 --- a/code/modules/research/protolathe.dm +++ b/code/modules/research/protolathe.dm @@ -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) ..() diff --git a/html/changelogs/lohikar-rndfix.yml b/html/changelogs/lohikar-rndfix.yml new file mode 100644 index 00000000000..a598acc2ae3 --- /dev/null +++ b/html/changelogs/lohikar-rndfix.yml @@ -0,0 +1,4 @@ +author: Lohikar +delete-after: True +changes: + - bugfix: "Fixed a bug where RnD machinery with materials inserted could not be disassembled."