electrodynamics/archive/java/resonantinduction/electrical/armbot/TaskBaseArmbot.java
2014-01-11 17:44:07 +08:00

40 lines
855 B
Java

package resonantinduction.electrical.armbot;
import resonantinduction.old.api.IArmbot;
import resonantinduction.old.api.coding.IProgrammableMachine;
public abstract class TaskBaseArmbot extends TaskBaseProcess
{
public TaskBaseArmbot(String name)
{
super(name);
}
@Override
public ProcessReturn onMethodCalled()
{
if (super.onMethodCalled() == ProcessReturn.CONTINUE && this.program.getMachine() instanceof IArmbot)
{
return ProcessReturn.CONTINUE;
}
return ProcessReturn.GENERAL_ERROR;
}
@Override
public ProcessReturn onUpdate()
{
if (super.onUpdate() == ProcessReturn.CONTINUE && this.program.getMachine() instanceof IArmbot)
{
return ProcessReturn.CONTINUE;
}
return ProcessReturn.GENERAL_ERROR;
}
@Override
public boolean canUseTask(IProgrammableMachine device)
{
return device instanceof IArmbot;
}
}