1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-13 13:04:03 +00:00

Energy Generator can discard the received Negative Energy in the built-in Trash.

This commit is contained in:
isaisstillalive 2020-07-03 13:17:15 +09:00
parent dd3bfe70e0
commit b9647731ba

View File

@ -8,6 +8,7 @@ import { Entity } from "../entity";
import { MetaBuilding } from "../meta_building";
import { enumLayer, GameRoot } from "../root";
import { enumHubGoalRewards } from "../tutorial_goals";
import { ItemProcessorComponent, enumItemProcessorTypes } from "../components/item_processor";
export class MetaEnergyGenerator extends MetaBuilding {
constructor() {
@ -68,6 +69,7 @@ export class MetaEnergyGenerator extends MetaBuilding {
directions: [enumDirection.top],
layer: enumLayer.wires,
filter: enumItemType.negativeEnergy,
processor: "ItemProcessor",
},
],
})
@ -109,5 +111,12 @@ export class MetaEnergyGenerator extends MetaBuilding {
],
})
);
entity.addComponent(
new ItemProcessorComponent({
inputsPerCharge: 1,
processorType: enumItemProcessorTypes.trash,
})
);
}
}