mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Merge pull request #14565 from Heroman3003/atuolaathe
Fixes hull-made items putting hull materials in my autolathe
This commit is contained in:
committed by
CHOMPStation2
parent
e966a01446
commit
7717c49c87
@@ -65,6 +65,17 @@ var/list/name_to_material
|
|||||||
. = list()
|
. = list()
|
||||||
for(var/mat in matter)
|
for(var/mat in matter)
|
||||||
var/datum/material/M = GET_MATERIAL_REF(mat)
|
var/datum/material/M = GET_MATERIAL_REF(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]
|
.[M] = matter[mat]
|
||||||
|
|
||||||
// Builds the datum list above.
|
// Builds the datum list above.
|
||||||
|
|||||||
Reference in New Issue
Block a user