From 7717c49c874cc7f39510752b71c4a74b339c79cc Mon Sep 17 00:00:00 2001 From: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Date: Sun, 26 Feb 2023 19:45:45 +1000 Subject: [PATCH] Merge pull request #14565 from Heroman3003/atuolaathe Fixes hull-made items putting hull materials in my autolathe --- code/modules/clothing/shoes/miscellaneous.dm | 2 +- code/modules/materials/materials/_materials.dm | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm index 5653d79007..7221f30d8e 100644 --- a/code/modules/clothing/shoes/miscellaneous.dm +++ b/code/modules/clothing/shoes/miscellaneous.dm @@ -144,7 +144,7 @@ item_state_slots = list(slot_r_hand_str = "slippers", slot_l_hand_str = "slippers") /obj/item/clothing/shoes/laceup - name = "black oxford shoes" + name = "black oxford shoes" icon_state = "oxford_black" /obj/item/clothing/shoes/laceup/grey diff --git a/code/modules/materials/materials/_materials.dm b/code/modules/materials/materials/_materials.dm index 99027a8de7..05046ba85a 100644 --- a/code/modules/materials/materials/_materials.dm +++ b/code/modules/materials/materials/_materials.dm @@ -65,7 +65,18 @@ var/list/name_to_material . = list() for(var/mat in matter) var/datum/material/M = GET_MATERIAL_REF(mat) - .[M] = matter[mat] + if(M.composite_material && M.composite_material.len) + for(var/submat in M.composite_material) + var/datum/material/SM = GET_MATERIAL_REF(submat) + if(SM in .) + .[SM] += matter[mat]*(M.composite_material[submat]/SHEET_MATERIAL_AMOUNT) + else + .[SM] = matter[mat]*(M.composite_material[submat]/SHEET_MATERIAL_AMOUNT) + else + if(M in .) + .[M] += matter[mat] + else + .[M] = matter[mat] // Builds the datum list above. /proc/populate_material_list(force_remake=0)