Starsector API
Loading...
Searching...
No Matches
CryosleeperIntel.java
Go to the documentation of this file.
1package com.fs.starfarer.api.impl.campaign.intel.misc;
2
3import java.util.Set;
4
5import com.fs.starfarer.api.Global;
6import com.fs.starfarer.api.campaign.FactionAPI;
7import com.fs.starfarer.api.campaign.SectorEntityToken;
8import com.fs.starfarer.api.campaign.TextPanelAPI;
9import com.fs.starfarer.api.campaign.comm.IntelInfoPlugin;
10import com.fs.starfarer.api.impl.campaign.econ.impl.Cryorevival;
11import com.fs.starfarer.api.impl.campaign.ids.Industries;
12import com.fs.starfarer.api.loading.IndustrySpecAPI;
13import com.fs.starfarer.api.ui.SectorMapAPI;
14import com.fs.starfarer.api.ui.TooltipMakerAPI;
15import com.fs.starfarer.api.util.Misc;
16
17public class CryosleeperIntel extends MapMarkerIntel {
18
20
21 //String icon = Global.getSettings().getSpriteName("intel", "cryosleeper");
22 String title = entity.getName();
23
24 String text = null;
25// if (entity.getStarSystem() != null) {
26// text = "Located in the " + entity.getStarSystem().getNameWithLowercaseTypeShort();
27// }
28 setSound("ui_discovered_entity");
29
31 //setWithTimestamp(false);
32
33 init(entity, title, text, null, true, textPanel);
34 }
35
36 @Override
37 public String getIcon() {
38 return Global.getSettings().getSpriteName("intel", "cryosleeper");
39 }
40
41 @Override
43 return entity.getFaction();
44 }
45
46 @Override
47 protected boolean withTextInDesc() {
48 return false;
49 }
50
51 @Override
52 protected void addPostDescriptionSection(TooltipMakerAPI info, float width, float height, float opad) {
53 if (!entity.getMemoryWithoutUpdate().getBoolean("$hasDefenders")) {
55 info.addPara("Allows colonies within %s light-years to build a %s, "
56 + "greatly increasing their population growth.",
58 }
59 }
60
63 if (((CryosleeperIntel)intel).getEntity() == entity) return (CryosleeperIntel)intel;
64 }
65 return null;
66 }
67
68 @Override
69 public Set<String> getIntelTags(SectorMapAPI map) {
70 Set<String> tags = super.getIntelTags(map);
71 //tags.add(Tags.INTEL_);
72 return tags;
73 }
74
75
76}
77
78
79
80
static SettingsAPI getSettings()
Definition Global.java:57
static SectorAPI getSector()
Definition Global.java:65
void addPostDescriptionSection(TooltipMakerAPI info, float width, float height, float opad)
CryosleeperIntel(SectorEntityToken entity, TextPanelAPI textPanel)
static CryosleeperIntel getCryosleeperIntel(SectorEntityToken entity)
void init(SectorEntityToken entity, String title, String text, String icon, boolean withDesc)
static Color getHighlightColor()
Definition Misc.java:792
String getSpriteName(String category, String id)
IndustrySpecAPI getIndustrySpec(String industryId)
LabelAPI addPara(String format, float pad, Color hl, String... highlights)