some fixes

This commit is contained in:
circle-gon 2022-12-19 02:31:18 +00:00
parent 5bb365dac1
commit c077a28c6e

View file

@ -238,6 +238,7 @@ const factory = createLayer(id, () => {
}
}
});
window.internal = compInternalData
globalBus.on("update", async diff => {
// will change soon:tm:
@ -452,11 +453,12 @@ const factory = createLayer(id, () => {
productionStock:
type === "conveyor" ? undefined : structuredClone(factoryBaseData.productionStock)
} as FactoryComponent;
const isConveyor = compSelected.value === "conveyor";
const isConveyor = type === "conveyor";
compInternalData[y][x] = {
type,
packages: isConveyor ? [] : undefined,
nextPackages: isConveyor ? [] : undefined,
startingFrom: "right",
canProduce: computed(() => {
if (type === "conveyor") return true;
if (!(factoryBaseData.canProduce?.value ?? true)) return false;