Fixed dev bug with destructive analyzer and null matter lists.

This commit is contained in:
Zuhayr
2014-06-29 10:25:03 +09:30
parent 48f02db5a0
commit bd02a78f9c

View File

@@ -261,7 +261,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
files.UpdateTech(T, temp_tech[T])
if(linked_destroy.loaded_item.reliability < 100 && linked_destroy.loaded_item.crit_fail)
files.UpdateDesign(linked_destroy.loaded_item.type)
if(linked_lathe) //Also sends salvaged materials to a linked protolathe, if any.
if(linked_lathe && linked_destroy.loaded_item.matter) //Also sends salvaged materials to a linked protolathe, if any.
linked_lathe.m_amount += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.matter["metal"]*linked_destroy.decon_mod))
linked_lathe.g_amount += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.matter["glass"]*linked_destroy.decon_mod))
linked_destroy.loaded_item = null