1package com.fs.starfarer.api.impl.campaign.intel.misc;
4import java.util.ArrayList;
8import org.lwjgl.input.Keyboard;
10import com.fs.starfarer.api.Global;
11import com.fs.starfarer.api.campaign.FactionAPI;
12import com.fs.starfarer.api.campaign.SectorEntityToken;
13import com.fs.starfarer.api.campaign.TextPanelAPI;
14import com.fs.starfarer.api.campaign.comm.IntelInfoPlugin;
15import com.fs.starfarer.api.campaign.econ.MarketAPI;
16import com.fs.starfarer.api.impl.campaign.ids.Factions;
17import com.fs.starfarer.api.impl.campaign.ids.Tags;
18import com.fs.starfarer.api.impl.campaign.intel.BaseIntelPlugin;
19import com.fs.starfarer.api.impl.campaign.missions.luddic.LuddicPilgrimsPath;
20import com.fs.starfarer.api.loading.Description;
21import com.fs.starfarer.api.loading.Description.Type;
22import com.fs.starfarer.api.ui.ButtonAPI;
23import com.fs.starfarer.api.ui.IntelUIAPI;
24import com.fs.starfarer.api.ui.SectorMapAPI;
25import com.fs.starfarer.api.ui.TooltipMakerAPI;
26import com.fs.starfarer.api.util.Misc;
30 public static String
VISITED =
"$visitedShrine";
62 (
entity.getMarket() !=
null &&
63 entity.getMarket().getMemoryWithoutUpdate().getBoolean(
VISITED));
74 public static SectorEntityToken
getEntity(String
id) {
77 if (market.getPlanetEntity() !=
null) {
78 return market.getPlanetEntity();
80 return market.getPrimaryEntity();
94 Color h = Misc.getHighlightColor();
95 Color g = Misc.getGrayColor();
100 if (mode == ListInfoMode.IN_DESC) initPad = opad;
115 Color c =
Global.
getSector().getFaction(Factions.LUDDIC_CHURCH).getBaseUIColor();
116 info.addPara(
"Visited", c, initPad);
119 info.addPara(
"Not visited", tc, initPad);
123 if (mode == ListInfoMode.INTEL) {
136 if (mode == ListInfoMode.MESSAGES) {
137 pre =
"Discovered: ";
139 if (mode == ListInfoMode.INTEL) {
144 info.addPara(pre +
getName() + post, c, 0f);
150 Color h = Misc.getHighlightColor();
151 Color g = Misc.getGrayColor();
152 Color tc = Misc.getTextColor();
156 String
id =
entity.getId();
157 if (
entity.getMarket() !=
null && !
entity.getMarket().isPlanetConditionMarketOnly()) {
158 id =
entity.getMarket().getId();
163 if (
id.equals(
"jangala")) {
168 info.addPara(desc.getText1(), opad);
169 }
else if (
id.equals(
"volturn")) {
174 info.addPara(desc.getText1(), opad);
175 }
else if (
id.equals(
"hesperus")) {
180 info.addPara(desc.getText1(), opad);
181 }
else if (
id.equals(
"gilead")) {
186 info.addPara(desc.getText1(), opad);
187 }
else if (
id.equals(
"beholder_station")) {
196 info.addPara(desc.getText1(), opad);
198 }
else if (
id.equals(
"killa")) {
204 info.addPara(desc.getText1(), opad);
229 Set<String> tags = super.getIntelTags(map);
230 tags.add(Tags.INTEL_SHRINES);
244 return "Luddic Shrine - " +
entity.getName();
269 return "ui_discovered_entity";
283 super.buttonPressConfirmed(buttonId, ui);
286 public static void addShowShrinesButton(IntelInfoPlugin curr,
float width,
float height, TooltipMakerAPI info) {
287 if (!
Global.
getSector().getIntelManager().hasIntelOfClass(LuddicPilgrimsPath.class))
return;
289 if (!info.getIntelUI().isShowingCustomIntelSubset() &&
294 String buttonText =
"Show shrines";
295 if (info.getIntelUI().isShowingCustomIntelSubset()) {
296 buttonText =
"Go back";
299 info.addSpacer(height - info.getHeightSoFar() - 20f - 20f);
301 button.setShortcut(Keyboard.KEY_T,
true);
305 if (ui.isShowingCustomIntelSubset()) {
306 ui.updateIntelList(
true);
307 ui.updateUIForItem(curr);
309 for (IntelInfoPlugin intel :
Global.
getSector().getIntelManager().getIntel(LuddicPilgrimsPath.class)) {
310 ui.selectItem(intel);
314 List<IntelInfoPlugin> show =
new ArrayList<IntelInfoPlugin>();
315 for (IntelInfoPlugin intel :
Global.
getSector().getIntelManager().getIntel(LuddicPilgrimsPath.class)) {
322 ui.updateIntelList(
true, show);
323 ui.updateUIForItem(curr);
static SettingsAPI getSettings()
static SectorAPI getSector()
void unindent(TooltipMakerAPI info)
Object getListInfoParam()
Color getBulletColorForMode(ListInfoMode mode)
void bullet(TooltipMakerAPI info)
Color getTitleColor(ListInfoMode mode)
FactionAPI getFactionForUIColors()
static void setVisited(SectorEntityToken entity, TextPanelAPI text)
void addBulletPoints(TooltipMakerAPI info, ListInfoMode mode)
Set< String > getIntelTags(SectorMapAPI map)
static void addShrineIntelIfNeeded(SectorEntityToken entity, TextPanelAPI text)
String getSmallDescriptionTitle()
static SectorEntityToken getEntity(String id)
static LuddicShrineIntel getShrineIntel(SectorEntityToken entity)
void createSmallDescription(TooltipMakerAPI info, float width, float height)
SectorEntityToken getEntity()
LuddicShrineIntel(SectorEntityToken entity)
String getCommMessageSound()
void buttonPressConfirmed(Object buttonId, IntelUIAPI ui)
static void addShowShrinesButton(IntelInfoPlugin curr, float width, float height, TooltipMakerAPI info)
static void addShrineIntelIfNeeded(String id, TextPanelAPI text)
static void toggleShrineList(IntelInfoPlugin curr, IntelUIAPI ui)
static String BUTTON_SHOW_SHRINES
void createIntelInfo(TooltipMakerAPI info, ListInfoMode mode)
boolean shouldRemoveIntel()
SectorEntityToken getMapLocation(SectorMapAPI map)
static boolean isVisited(SectorEntityToken entity)
static void addShrineIntelIfNeeded(SectorEntityToken entity, TextPanelAPI text, boolean quiet)
Description getDescription(String id, Type type)
String getSpriteName(String category, String id)