fixes computed inputs/outputs not actually checking properly

This commit is contained in:
circle-gon 2022-12-23 09:28:14 -05:00 committed by GitHub
parent ec71587eab
commit c1f6741c75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1572,7 +1572,7 @@ const factory = createLayer(id, () => {
const compData = components.value[x + "x" + y] as FactoryComponentProcessor;
if (factoryBaseData.inputs !== undefined) {
for (const [res, val] of Object.entries(factoryBaseData.inputs))
if ((compData.inputStock?.[res as ResourceNames] ?? 0) < val.amount)
if ((compData.inputStock?.[res as ResourceNames] ?? 0) < unref(val.amount))
return false;
}
if (factoryBaseData.outputs !== undefined) {