bool ResourceCollectorSpecialTarget(Ship *ship, void *custom)
{
    ResourceCollectorStatics *resourcestat = (ResourceCollectorStatics *)ship->staticinfo->custstatinfo;
    SelectAnyCommand *targets;
    targets = (SelectAnyCommand *)custom;
    return(refuelRepairShips(ship, targets,resourcestat->repairApproachDistance));
}
bool AdvacedSupportFrigateSpecialTarget(Ship *ship,void *custom)
{
    AdvanceSupportFrigateStatics *asfstat = (AdvanceSupportFrigateStatics *)ship->staticinfo->custstatinfo;
    SelectAnyCommand *targets;
    targets = (SelectAnyCommand *)custom;
    return(refuelRepairShips(ship, targets,asfstat->repairApproachDistance));
}
예제 #3
0
파일: Carrier.c 프로젝트: rcarmo/homeworld
bool CarrierSpecialTarget(Ship *ship,void *custom)
{
    CarrierStatics *cstat = (CarrierStatics *)ship->staticinfo->custstatinfo;
    SelectAnyCommand *targets;
    targets = (SelectAnyCommand *)custom;
    return(refuelRepairShips(ship, targets,cstat->repairApproachDistance));
}
bool ResourceControllerSpecialTarget(Ship *ship, void *custom)
{
    ResourceControllerStatics *rcstat = (ResourceControllerStatics *)ship->staticinfo->custstatinfo;
    SelectAnyCommand *targets;

    targets = (SelectAnyCommand *)custom;
    if(targets->numTargets == 0)
            return TRUE;
    //fix later: sort from closest to furthest in command layer once!
    //also need to remove non-ships from selection

    return(refuelRepairShips(ship, targets,rcstat->repairApproachDistance));

}