//Equiv of nonselect, but for Targets instead of selected ships
void InputDFA::TargetSelect (KBSTATE k,int x,int y, int delx, int dely, int mod) {
    if (k==RESET)
        return;///little hack to prevent the function from being 'primed' with reset and continuing on an infinite loop again and again and again
    CurDFA->state=TARGET_SELECT;//to fool the Noneselect function into using targets
    //don't bind keys above...."quiet state update"
    if (mod&ACTIVE_CTRL) {
        mod-=ACTIVE_CTRL;
    }
    NoneSelect (k,x,y,delx,dely,mod);
    if (CurDFA->state==TARGET_SELECT) {
        //executeOrders from selected->target;
        if (k==RELEASE&&CurDFA->targetted!=NULL) {
            Unit * un;
            for(un_iter tmp = CurDFA->selected->createIterator(); un = *tmp; ++tmp) {
                Order * nAI = CurDFA->orderfac->newOrder();
                if (CurDFA->targetted) {
                    Unit *tar = CurDFA->targetted->front();
                    if (tar) {
                        nAI->AttachOrder(tar);
                    }
                }
                if (CurDFA->queueOrder) {
                    un->EnqueueAI(nAI);
                } else {
                    un->SetAI(nAI);//will take care of doing the setparent
                }
            }
            delete CurDFA->targetted;
            CurDFA->targetted=NULL;

            CurDFA->orderfac = NULL;//I know we don't dealloc
        }
        CurDFA->SetStateNone(); //go back up the heirarchy;
    }
}
void InputDFA::LocSelect (KBSTATE k, int x, int y, int delx, int dely, int mod) {
    if (k==RESET)
        return;///little hack to prevent the function from being 'primed' with reset and continuing on an infinite loop again and again and again
    CoordinateSelect::MouseMoveHandle(k,x,y,delx,dely,mod);

    if (k==PRESS) {

        Unit * un;
        Vector tmplocselvec = CurDFA->locsel->GetVector().Cast();
        for(un_iter tmp = CurDFA->selected->createIterator(); un = *tmp; ++tmp) {
            Order * nAI = CurDFA->orderfac->newOrder();
            nAI->AttachOrder(tmplocselvec.Cast());
            if (CurDFA->queueOrder) {
                un->EnqueueAI(nAI);
            } else {
                un->SetAI(nAI);//will take care of doing the setparent
            }
        }
        delete CurDFA->targetted;
        CurDFA->targetted=NULL;

        CurDFA->orderfac = NULL;//I know we don't dealloc
    }
    CurDFA->SetStateNone(); //go back up the heirarchy;
}