001package com.fs.starfarer.api.combat; 002 003 004public interface ShipAIPlugin { 005 /** 006 * Advise the AI not to fire for amount seconds. 007 * Used when fighters are taking off from a carrier to prevent bomb/torpedo friendly fire. 008 * @param amount 009 */ 010 void setDoNotFireDelay(float amount); 011 012 /** 013 * When this is called, the AI should immediately evaluate nearby threats and such, 014 * if it only does it periodically otherwise. 015 * 016 * Called when the autopilot is toggled on. 017 */ 018 void forceCircumstanceEvaluation(); 019 020 021 /** 022 * The AI should do its main work here. 023 * @param amount 024 */ 025 void advance(float amount); 026 027 028 /** 029 * Only called for fighters, not regular ships or drones. 030 * @return whether the fighter needs refit 031 */ 032 boolean needsRefit(); 033 034 ShipwideAIFlags getAIFlags(); 035 036 void cancelCurrentManeuver(); 037 038 ShipAIConfig getConfig(); 039 040 default void setTargetOverride(ShipAPI target) {}; 041} 042 043 044