mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-06-13 13:04:03 +00:00
Added can process
This commit is contained in:
parent
eb73ca0dd9
commit
f3cf68694c
@ -56,6 +56,10 @@ export const MOD_ITEM_PROCESSOR_HANDLERS = {};
|
||||
* @type {Object<string, (ProccessingRequirementsImplementationPayload) => boolean>}
|
||||
*/
|
||||
export const MODS_PROCESSING_REQUIREMENTS = {};
|
||||
/**
|
||||
* @type {Object<string, ({entity: Entity}) => boolean>}
|
||||
*/
|
||||
export const MODS_CAN_PROCESS = {};
|
||||
|
||||
export class ItemProcessorSystem extends GameSystemWithFilter {
|
||||
constructor(root) {
|
||||
@ -214,6 +218,12 @@ export class ItemProcessorSystem extends GameSystemWithFilter {
|
||||
canProcess(entity) {
|
||||
const processorComp = entity.components.ItemProcessor;
|
||||
|
||||
if (MODS_CAN_PROCESS[processorComp.processingRequirement]) {
|
||||
return MODS_CAN_PROCESS[processorComp.processingRequirement].bind(this)({
|
||||
entity,
|
||||
});
|
||||
}
|
||||
|
||||
switch (processorComp.processingRequirement) {
|
||||
// DEFAULT
|
||||
// By default, we can start processing once all inputs are there
|
||||
|
Loading…
Reference in New Issue
Block a user