Class TaskScript

  • All Implemented Interfaces:
    java.lang.Runnable, java.util.EventListener, PaintListener

    public abstract class TaskScript
    extends AbstractScript
    New replacement for NodeScript. More appropriately named thanks to Harold.

    Created with IntelliJ IDEA. User: NotoriousPP Date: 11/25/2014 Time: 5:05 PM

    • Constructor Detail

      • TaskScript

        public TaskScript()
    • Method Detail

      • addNodes

        public void addNodes​(TaskNode... nodes)
        Add nodes to task list.
        nodes - the nodes
      • removeNodes

        public void removeNodes​(TaskNode... nodes)
        Remove select nodes from task list.
        nodes - the nodes
      • getNodes

        public TaskNode[] getNodes()
        Get task list nodes as an array.
        the task node [ ]
      • onLoop

        public int onLoop()
        See AbstractScript.onLoop() Checks all accepted nodes and executes the one with the highest priority value If no nodes are found, failCount is incremented by 1 If failCount goes above the failLimit, the script will stop. failCount is reset to 0 on successfully finding a node to execute. See setFailLimit(int)
        Specified by:
        onLoop in class AbstractScript
        highest priority TaskNode.execute() value, if no nodes found returns 1000
      • getLastTaskNode

        public TaskNode getLastTaskNode()
        Gets the last task node that has been found valid to be executed.
        last accepted task node to execute.
      • setFailLimit

        public void setFailLimit​(int failLimit)
        Sets the amount the node selector is allowed to fail before stopping the script.

        Any value less than 0 is considered unlimited.

        failLimit - the amount allowed to fail