mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Fix tslint
This commit is contained in:
parent
b19b87a6c8
commit
20718ca05c
@ -436,9 +436,6 @@ export class HubGoals extends BasicSerializableObject {
|
|||||||
globalConfig.buildingSpeeds[processorType]
|
globalConfig.buildingSpeeds[processorType]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
case enumItemProcessorTypes.advancedProcessor: {
|
|
||||||
return globalConfig.beltSpeedItemsPerSecond * globalConfig.buildingSpeeds[processorType];
|
|
||||||
}
|
|
||||||
default:
|
default:
|
||||||
assertAlways(false, "invalid processor type: " + processorType);
|
assertAlways(false, "invalid processor type: " + processorType);
|
||||||
}
|
}
|
||||||
|
@ -281,16 +281,6 @@ export class ItemEjectorSystem extends GameSystemWithFilter {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const energyConsumerComp = receiver.components.EnergyConsumer;
|
|
||||||
if (energyConsumerComp) {
|
|
||||||
if (energyConsumerComp.tryAcceptItem(item, slotIndex)) {
|
|
||||||
// All good
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Energy consumer can have more components
|
|
||||||
}
|
|
||||||
|
|
||||||
const itemProcessorComp = receiver.components.ItemProcessor;
|
const itemProcessorComp = receiver.components.ItemProcessor;
|
||||||
if (itemProcessorComp) {
|
if (itemProcessorComp) {
|
||||||
// Its an item processor ..
|
// Its an item processor ..
|
||||||
|
@ -70,16 +70,7 @@ export class ItemProcessorSystem extends GameSystemWithFilter {
|
|||||||
// Check if we have an empty queue and can start a new charge
|
// Check if we have an empty queue and can start a new charge
|
||||||
if (processorComp.itemsToEject.length === 0) {
|
if (processorComp.itemsToEject.length === 0) {
|
||||||
if (processorComp.inputSlots.length >= processorComp.inputsPerCharge) {
|
if (processorComp.inputSlots.length >= processorComp.inputsPerCharge) {
|
||||||
const energyConsumerComp = entity.components.EnergyConsumer;
|
this.startNewCharge(entity);
|
||||||
if (energyConsumerComp) {
|
|
||||||
// Check if we have enough energy
|
|
||||||
if (energyConsumerComp.tryStartNextCharge()) {
|
|
||||||
this.startNewCharge(entity);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// No further checks required
|
|
||||||
this.startNewCharge(entity);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,8 @@ function tick() {
|
|||||||
const delta = now - lastTick;
|
const delta = now - lastTick;
|
||||||
lastTick = now;
|
lastTick = now;
|
||||||
|
|
||||||
postMessage({ delta });
|
// @ts-ignore
|
||||||
|
self.postMessage({ delta });
|
||||||
}
|
}
|
||||||
|
|
||||||
setInterval(tick, desiredMsDelay);
|
setInterval(tick, desiredMsDelay);
|
||||||
|
@ -17,6 +17,8 @@ self.addEventListener("message", event => {
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const { jobId, job, data } = event.data;
|
const { jobId, job, data } = event.data;
|
||||||
const result = performJob(job, data);
|
const result = performJob(job, data);
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
self.postMessage({ jobId, result });
|
self.postMessage({ jobId, result });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user