001package com.fs.starfarer.api.combat;
002
003import java.util.List;
004
005import org.lwjgl.util.vector.Vector2f;
006
007import com.fs.starfarer.api.combat.CombatFleetManagerAPI.AssignmentInfo;
008
009public interface CombatTaskManagerAPI {
010        /**
011         * Returns the current assignment for a ship (the assignment type, and the target, if any).
012         * Returns null if there isn't one (i.e. the ship is on a default search-and-destroy).
013         * 
014         * For fighter wings, can pass in any fighter from the wing to get the assignment.
015         * 
016         * @param ship
017         * @return
018         */
019        AssignmentInfo getAssignmentFor(ShipAPI ship);
020        List<AssignmentInfo> getAllAssignments();
021        
022        
023        /**
024         * target should be one of:
025         *      BattleObjectiveAPI
026         *      DeployedFleetMemberAPI
027         *      the result of createWaypoint()
028         * 
029         * @param type
030         * @param target
031         * @param useCommandPointIfNeeded
032         * @return
033         */
034        AssignmentInfo createAssignment(CombatAssignmentType type, AssignmentTargetAPI target, boolean useCommandPoint);
035        
036        void giveAssignment(DeployedFleetMemberAPI member, AssignmentInfo assignment, boolean useCommandPointIfNeeded);
037        void orderRetreat(DeployedFleetMemberAPI member, boolean useCommandPointIfNeeded, boolean direct);
038        void orderSearchAndDestroy(DeployedFleetMemberAPI member, boolean useCommandPointIfNeeded);
039        
040        /**
041         * Cancels all assignments. New assignments can still be created.
042         */
043        void orderSearchAndDestroy();
044        
045        /**
046         * Cancels all assignment and orders all ships to retreat. Can not be aborted.
047         */
048        void orderFullRetreat();
049        
050        boolean isInFullRetreat();
051        MutableStat getCommandPointsStat();
052        int getCommandPointsLeft();
053        boolean isPreventFullRetreat();
054        void setPreventFullRetreat(boolean preventFullRetreat);
055        
056        boolean isFullAssault();
057        void setFullAssault(boolean explicitSearchAndDestroy);
058        
059        float getSecondsUntilNextPoint();
060        float getCPRateMult();
061        float getCPInterval();
062        MutableStat getCPRateModifier();
063        void removeAssignment(AssignmentInfo info);
064        void clearEmptyWaypoints();
065        AssignmentTargetAPI createWaypoint2(Vector2f loc, boolean ally);
066        void setAssignmentWeight(AssignmentInfo info, float weight);
067        void reassign();
068        AssignmentTargetAPI getAssignmentTargetFor(ShipAPI ship);
069        void clearTasks();
070        AssignmentInfo getAssignmentInfoForTarget(AssignmentTargetAPI target);
071}