package turgen.plugin.kblock;
import turgen.generator.PulseCrate;
import turgen.plugin.*;


public class KBlockPlayListItem extends SimplePlaylistItem {

    int loader;

    public KBlockPlayListItem() {
        
    }

    public KBlockPlayListItem(String inF,String outF,PulseCrate speed,String fname,int[] pauses,int loader) {
        this.inFile=inF;
        this.outFile=outF;
        this.pulses=speed;
        this.pauses=pauses;
        this.fname=fname;
        this.loader=loader;

    }

    public String toString() {

        String ldr="BL + ";
        if (loader==KBlockPlugin.BL_NONE) ldr="";

        return ldr+fname;
    }

    public boolean validate() {
        if (this.inFile==null) return false;
        if (this.outFile==null) this.outFile="";
        if (this.fname==null) this.fname="NONAME";
        if (this.pulses==null) return false;
        if (this.pauses==null) pauses=new int[0];
        if (this.loader<0 || this.loader>KBlockPlugin.BL_NANOTBL_UR) this.loader=KBlockPlugin.BL_NONE;
        return true;
    }
}
