mirror of
https://github.com/tobspr/shapez.io.git
synced 2026-03-02 03:39:21 +00:00
Fix tslint
This commit is contained in:
@@ -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 ..
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user