Starsector API
Loading...
Searching...
No Matches
RemnantNexusIntel.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.CampaignFleetAPI;
7import com.fs.starfarer.api.campaign.FactionAPI;
8import com.fs.starfarer.api.campaign.SectorEntityToken;
9import com.fs.starfarer.api.campaign.comm.IntelInfoPlugin;
10import com.fs.starfarer.api.impl.campaign.ids.Factions;
11import com.fs.starfarer.api.impl.campaign.ids.Tags;
12import com.fs.starfarer.api.loading.Description;
13import com.fs.starfarer.api.loading.Description.Type;
14import com.fs.starfarer.api.ui.SectorMapAPI;
15import com.fs.starfarer.api.ui.TooltipMakerAPI;
16import com.fs.starfarer.api.util.Misc;
17
18public class RemnantNexusIntel extends MapMarkerIntel {
19
21
22 //String icon = Global.getSettings().getSpriteName("intel", "remnant_nexus");
23 String title = entity.getNameWithFactionKeepCase();
24
25 String text = null;
26// if (entity.getStarSystem() != null) {
27// text = "Located in the " + entity.getStarSystem().getNameWithLowercaseTypeShort();
28// }
29 setSound("ui_discovered_entity");
30
32 //setWithTimestamp(false);
33
34 init(entity, title, text, null, true);
35 }
36
37 @Override
38 public String getIcon() {
39 return Global.getSettings().getSpriteName("intel", "remnant_nexus");
40 }
41
42 @Override
44 return entity.getFaction();
45 }
46
47 public boolean isDamaged() {
48 return entity.getMemoryWithoutUpdate().getBoolean("$damagedStation");
49 }
50
51 @Override
52 protected boolean withTextInDesc() {
53 return false;
54 }
55
56 @Override
57 protected boolean withCustomVisual() {
58 return true;
59 }
60
61 @Override
62 protected boolean withCustomDescription() {
63 return true;
64 }
65
66 @Override
67 protected void addCustomVisual(TooltipMakerAPI info, float width, float height) {
69 }
70
71
72 @Override
73 protected void addCustomDescription(TooltipMakerAPI info, float width, float height) {
74 Description desc = Global.getSettings().getDescription("remnant_station2", Type.SHIP);
75 if (desc != null) {
76 float opad = 10f;
77 info.addPara(desc.getText1FirstPara(), opad);
78 if (isDamaged()) {
79 info.addPara("The station's long arc gapes with empty sockets where weapons platforms "
80 + "and citadels were once present. Despite the obvious damage, "
81 + "the station is armed and operational.", opad);
82 }
83 }
84 }
85
86
89 if (((RemnantNexusIntel)intel).getEntity() == entity) return (RemnantNexusIntel)intel;
90 }
91 return null;
92 }
93
94 @Override
95 public Set<String> getIntelTags(SectorMapAPI map) {
96 Set<String> tags = super.getIntelTags(map);
97 //tags.remove(Tags.INTEL_FLEET_LOG);
98 tags.add(Factions.REMNANTS);
100 tags.add(Tags.INTEL_COLONIES);
101 }
102 return tags;
103 }
104
105
106}
107
108
109
110
static SettingsAPI getSettings()
Definition Global.java:57
static SectorAPI getSector()
Definition Global.java:65
void init(SectorEntityToken entity, String title, String text, String icon, boolean withDesc)
static RemnantNexusIntel getNexusIntel(SectorEntityToken entity)
void addCustomDescription(TooltipMakerAPI info, float width, float height)
void addCustomVisual(TooltipMakerAPI info, float width, float height)
static List< MarketAPI > getMarketsInLocation(LocationAPI location, String factionId)
Definition Misc.java:936
Description getDescription(String id, Type type)
String getSpriteName(String category, String id)
FactionAPI getFaction(String factionId)
void addImage(String spriteName, float pad)
LabelAPI addPara(String format, float pad, Color hl, String... highlights)