Fix tslint

This commit is contained in:
tobspr 2020-08-11 13:29:47 +02:00
parent b19b87a6c8
commit 20718ca05c
5 changed files with 5 additions and 24 deletions

View File

@ -436,9 +436,6 @@ export class HubGoals extends BasicSerializableObject {
globalConfig.buildingSpeeds[processorType]
);
}
case enumItemProcessorTypes.advancedProcessor: {
return globalConfig.beltSpeedItemsPerSecond * globalConfig.buildingSpeeds[processorType];
}
default:
assertAlways(false, "invalid processor type: " + processorType);
}

View File

@ -281,16 +281,6 @@ export class ItemEjectorSystem extends GameSystemWithFilter {
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;
if (itemProcessorComp) {
// Its an item processor ..

View File

@ -70,16 +70,7 @@ export class ItemProcessorSystem extends GameSystemWithFilter {
// Check if we have an empty queue and can start a new charge
if (processorComp.itemsToEject.length === 0) {
if (processorComp.inputSlots.length >= processorComp.inputsPerCharge) {
const energyConsumerComp = entity.components.EnergyConsumer;
if (energyConsumerComp) {
// Check if we have enough energy
if (energyConsumerComp.tryStartNextCharge()) {
this.startNewCharge(entity);
}
} else {
// No further checks required
this.startNewCharge(entity);
}
this.startNewCharge(entity);
}
}
}

View File

@ -9,7 +9,8 @@ function tick() {
const delta = now - lastTick;
lastTick = now;
postMessage({ delta });
// @ts-ignore
self.postMessage({ delta });
}
setInterval(tick, desiredMsDelay);

View File

@ -17,6 +17,8 @@ self.addEventListener("message", event => {
// @ts-ignore
const { jobId, job, data } = event.data;
const result = performJob(job, data);
// @ts-ignore
self.postMessage({ jobId, result });
});