Porting a couple material datums code updates and fixes.
This commit is contained in:
@@ -190,10 +190,10 @@
|
||||
var/cost = 400
|
||||
if(ispath(build_type, /obj/item/electronic_assembly))
|
||||
var/obj/item/electronic_assembly/E = SScircuit.cached_assemblies[build_type]
|
||||
cost = E.custom_materials[getmaterialref(/datum/material/iron)]
|
||||
cost = E.custom_materials[SSmaterials.GetMaterialRef(/datum/material/iron)]
|
||||
else if(ispath(build_type, /obj/item/integrated_circuit))
|
||||
var/obj/item/integrated_circuit/IC = SScircuit.cached_components[build_type]
|
||||
cost = IC.custom_materials[getmaterialref(/datum/material/iron)]
|
||||
cost = IC.custom_materials[SSmaterials.GetMaterialRef(/datum/material/iron)]
|
||||
else if(!(build_type in SScircuit.circuit_fabricator_recipe_list["Tools"]))
|
||||
return
|
||||
|
||||
|
||||
@@ -260,7 +260,7 @@
|
||||
blocks["max_space"] = assembly.max_components
|
||||
|
||||
// Start keeping track of total metal cost
|
||||
blocks["metal_cost"] = assembly.custom_materials[getmaterialref(/datum/material/iron)]
|
||||
blocks["metal_cost"] = assembly.custom_materials[SSmaterials.GetMaterialRef(/datum/material/iron)]
|
||||
|
||||
|
||||
// Block 2. Components.
|
||||
@@ -291,7 +291,7 @@
|
||||
// Update estimated assembly complexity, taken space and material cost
|
||||
blocks["complexity"] += component.complexity
|
||||
blocks["used_space"] += component.size
|
||||
blocks["metal_cost"] += component.custom_materials[getmaterialref(/datum/material/iron)]
|
||||
blocks["metal_cost"] += component.custom_materials[SSmaterials.GetMaterialRef(/datum/material/iron)]
|
||||
|
||||
// Check if the assembly requires printer upgrades
|
||||
if(!(component.spawn_flags & IC_SPAWN_DEFAULT))
|
||||
|
||||
Reference in New Issue
Block a user