1package com.fs.starfarer.api.impl.campaign.abilities;
5import com.fs.starfarer.api.Global;
6import com.fs.starfarer.api.campaign.CampaignFleetAPI;
7import com.fs.starfarer.api.campaign.SectorEntityToken.VisibilityLevel;
8import com.fs.starfarer.api.impl.campaign.ids.MemFlags;
9import com.fs.starfarer.api.impl.campaign.ids.Pings;
10import com.fs.starfarer.api.ui.LabelAPI;
11import com.fs.starfarer.api.ui.TooltipMakerAPI;
12import com.fs.starfarer.api.util.Misc;
32 if (
entity.isInCurrentLocation()) {
35 VisibilityLevel
level =
entity.getVisibilityLevelToPlayerFleet();
36 if (
level != VisibilityLevel.NONE) {
64 if (fleet ==
null)
return;
66 if (
entity.isInCurrentLocation()) {
67 Global.
getSector().getMemoryWithoutUpdate().set(MemFlags.GLOBAL_SENSOR_BURST_JUST_USED_IN_CURRENT_LOCATION,
true, 0.1f);
69 fleet.getMemoryWithoutUpdate().set(MemFlags.JUST_DID_SENSOR_BURST,
true, 0.1f);
86 fleet.goSlowOneFrame();
97 if (fleet ==
null)
return;
99 fleet.getStats().getSensorRangeMod().unmodify(
getModId());
100 fleet.getStats().getDetectedRangeMod().unmodify(
getModId());
127 Color gray = Misc.getGrayColor();
128 Color highlight = Misc.getHighlightColor();
130 LabelAPI title = tooltip.addTitle(
spec.getName());
135 tooltip.addPara(
"Turn off engines to reduce interference and link all sensors in the fleet into a single network.", pad);
136 tooltip.addPara(
"Increases sensor range by %s* units and" +
137 " increases the range at which the fleet can be detected by %s* units." +
138 " The fleet is only able to %s** while the ability is active.",
145 tooltip.addPara(
"*2000 units = 1 map grid cell", gray, pad);
146 tooltip.addPara(
"**A fleet is considered slow-moving at a burn level of half that of its slowest ship.", gray, 0f);
static SectorAPI getSector()
transient AbilitySpecAPI spec
CampaignFleetAPI getFleet()
void addIncompatibleToTooltip(TooltipMakerAPI tooltip, boolean expanded)
static final float DETECTABILITY_RANGE_BONUS
void applyEffect(float amount, float level)
static final float SENSOR_RANGE_BONUS
void createTooltip(TooltipMakerAPI tooltip, boolean expanded)