@Override
public boolean isTriggerActive(Pipe pipe, IStatementParameter parameter) {
if(pipe instanceof PipeWrapper) {
if (((PipeWrapper)pipe).tile.pipe instanceof PipeItemsSupplierLogistics) {
PipeItemsSupplierLogistics supplier = (PipeItemsSupplierLogistics) ((PipeWrapper)pipe).tile.pipe;
return supplier.isRequestFailed();
}
if (((PipeWrapper)pipe).tile.pipe instanceof PipeItemsFluidSupplier) {
PipeItemsFluidSupplier supplier = (PipeItemsFluidSupplier) ((PipeWrapper)pipe).tile.pipe;
return supplier.isRequestFailed();
}
}
return false;
}