mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2024-11-24 09:21:48 +00:00
Whoops
This commit is contained in:
parent
ed16506ab2
commit
56fb26dcad
1 changed files with 4 additions and 7 deletions
|
@ -288,7 +288,6 @@ const factory = createLayer(id, () => {
|
||||||
} else {
|
} else {
|
||||||
for (const id in components.value) {
|
for (const id in components.value) {
|
||||||
const data = components.value[id];
|
const data = components.value[id];
|
||||||
console.log(id, data);
|
|
||||||
if (data?.type === undefined) {
|
if (data?.type === undefined) {
|
||||||
delete components.value[id];
|
delete components.value[id];
|
||||||
continue;
|
continue;
|
||||||
|
@ -305,9 +304,8 @@ const factory = createLayer(id, () => {
|
||||||
(window as any).blocks = movingBlocks;
|
(window as any).blocks = movingBlocks;
|
||||||
let taskIsRunning = false;
|
let taskIsRunning = false;
|
||||||
|
|
||||||
globalBus.on("update", async diff => {
|
globalBus.on("update", diff => {
|
||||||
if (taskIsRunning || !loaded) return;
|
if (taskIsRunning || !loaded) return;
|
||||||
taskIsRunning = true;
|
|
||||||
//debugger
|
//debugger
|
||||||
// will change soon:tm:
|
// will change soon:tm:
|
||||||
const tick = diff;
|
const tick = diff;
|
||||||
|
@ -325,7 +323,6 @@ const factory = createLayer(id, () => {
|
||||||
if (compData.type !== "conveyor") throw new TypeError("this should not happen");
|
if (compData.type !== "conveyor") throw new TypeError("this should not happen");
|
||||||
// conveyor part
|
// conveyor part
|
||||||
// use a copy
|
// use a copy
|
||||||
//console.log(compData);
|
|
||||||
compData.packages = compData.packages.concat(compData.nextPackages);
|
compData.packages = compData.packages.concat(compData.nextPackages);
|
||||||
compData.nextPackages = [];
|
compData.nextPackages = [];
|
||||||
for (const [key, block] of [...compData.packages].entries()) {
|
for (const [key, block] of [...compData.packages].entries()) {
|
||||||
|
@ -439,8 +436,8 @@ const factory = createLayer(id, () => {
|
||||||
xInc = -1;
|
xInc = -1;
|
||||||
}
|
}
|
||||||
// no suitable location to dump stuff in
|
// no suitable location to dump stuff in
|
||||||
console.log(x, y);
|
// console.log(x, y);
|
||||||
debugger;
|
// debugger;
|
||||||
if (xInc === 0 && yInc === 0) continue;
|
if (xInc === 0 && yInc === 0) continue;
|
||||||
let itemToMove: [string, number] | undefined = undefined;
|
let itemToMove: [string, number] | undefined = undefined;
|
||||||
for (const [name, amt] of Object.entries(data.productionStock)) {
|
for (const [name, amt] of Object.entries(data.productionStock)) {
|
||||||
|
|
Loading…
Reference in a new issue