1package com.fs.starfarer.api.impl.campaign.abilities;
5import org.lwjgl.util.vector.Vector2f;
7import com.fs.starfarer.api.Global;
8import com.fs.starfarer.api.campaign.BattleAPI;
9import com.fs.starfarer.api.campaign.CampaignFleetAPI;
10import com.fs.starfarer.api.fleet.FleetMemberViewAPI;
11import com.fs.starfarer.api.impl.campaign.ids.Stats;
12import com.fs.starfarer.api.ui.LabelAPI;
13import com.fs.starfarer.api.ui.TooltipMakerAPI;
14import com.fs.starfarer.api.util.Misc;
33 return super.getActivationText();
41 if (fleet ==
null)
return;
51 if (fleet ==
null)
return;
67 float acc = Math.max(speed, 200f)/activateSeconds + fleet.
getAcceleration();
68 float ds = acc * amount;
69 if (ds > speed) ds = speed;
86 burnModifier = (int)((b) *
level);
111 if (diff < 0) diff = 0;
112 accImpact = 1f - 0.5f * Math.min(1f, (diff / (180f - pad)));
123 view.getContrailColor().shift(
getModId(), view.getEngineColor().getBase(), 1f, 1f, 0.5f *
level);
124 view.getEngineGlowSizeMult().shift(
getModId(), 1.5f, 1f, 1f, 1f *
level);
125 view.getEngineHeightMult().shift(
getModId(), 3f, 1f, 1f, 1f *
level);
126 view.getEngineWidthMult().shift(
getModId(), 2f, 1f, 1f, 1f *
level);
143 if (fleet ==
null)
return;
153 return super.showProgressIndicator();
168 String status =
" (off)";
184 tooltip.
addPara(
"Switch the drives of all ships in the fleet to a mode suited for long-distance travel. " +
185 "The fleet has to stop briefly to make the switch-over. ", pad);
191 tooltip.
addPara(
"Increases the maximum burn level by %s, at the expense of lower acceleration, " +
192 "especially in the direction of the fleet's movement. " +
193 "Also increases the range at which the fleet can be detected by %s.", pad,
200 tooltip.
addPara(
"The burn level increase does not apply to flat burn bonuses, " +
201 "such as those from Nav Buoys or tugs.", pad);
226 if (!super.isUsable())
return false;
227 if (
getFleet() ==
null)
return false;
static boolean CODEX_TOOLTIP_MODE
static SectorAPI getSector()
void modifyMult(String source, float value)
void modifyMult(String source, float value)
void modifyPercent(String source, float value)
void modifyFlat(String source, float value)
CampaignFleetAPI getFleet()
void addIncompatibleToTooltip(TooltipMakerAPI tooltip, boolean expanded)
float getActivationDays()
boolean showActiveIndicator()
void applyEffect(float amount, float level)
static float ACCELERATION_MULT
static float MAX_BURN_PERCENT
void createTooltip(TooltipMakerAPI tooltip, boolean expanded)
static float DETECTABILITY_PERCENT
void fleetLeftBattle(BattleAPI battle, boolean engagedInHostilities)
boolean showProgressIndicator()
String getActivationText()
void fleetJoinedBattle(BattleAPI battle)
static final String SUSTAINED_BURN_BONUS
static Vector2f getUnitVectorAtDegreeAngle(float degrees)
static float getDesiredMoveDir(CampaignFleetAPI fleet)
static Color getNegativeHighlightColor()
static Color getGrayColor()
static float getAngleDiff(float from, float to)
static Color getHighlightColor()
static float getBurnLevelForSpeed(float speed)
static float getAngleInDegrees(Vector2f v)
boolean isPlayerInvolved()
LocationAPI getContainingLocation()
void setVelocity(float x, float y)
List< FleetMemberViewAPI > getViews()
MutableFleetStatsAPI getStats()
CampaignClockAPI getClock()
MemoryAPI getMemoryWithoutUpdate()
void set(String key, Object value)
boolean is(String key, Object value)
StatBonus getFleetwideMaxBurnMod()
StatBonus getDetectedRangeMod()
MutableStat getAccelerationMult()
DynamicStatsAPI getDynamic()
void setHighlightColor(Color color)
void highlightLast(String substring)
float getValue(String id)