54 while (phase > 1) phase --;
56 if (
entity.isInCurrentLocation()) {
58 if (sincePing >= 6f && phase > 0.1f && phase < 0.2f) {
61 if (playerFleet !=
null &&
62 entity.getVisibilityLevelTo(playerFleet) == VisibilityLevel.COMPOSITION_AND_FACTION_DETAILS) {
64 String pingId = Pings.WARNING_BEACON1;
66 if (
entity.getMemoryWithoutUpdate().getBoolean(RemnantSystemType.SUPPRESSED.getBeaconFlag())) {
67 pingId = Pings.WARNING_BEACON2;
69 }
else if (
entity.getMemoryWithoutUpdate().getBoolean(RemnantSystemType.RESURGENT.getBeaconFlag())) {
70 pingId = Pings.WARNING_BEACON3;
84 Color pingColor =
null;
99 public void render(CampaignEngineLayers layer, ViewportAPI viewport) {
100 float alphaMult = viewport.getAlphaMult();
101 alphaMult *=
entity.getSensorFaderBrightness();
102 alphaMult *=
entity.getSensorContactFaderBrightness();
103 if (alphaMult <= 0f)
return;
105 CustomEntitySpecAPI spec =
entity.getCustomEntitySpec();
106 if (spec ==
null)
return;
108 float w = spec.getSpriteWidth();
109 float h = spec.getSpriteHeight();
111 Vector2f loc =
entity.getLocation();
113 sprite.setAngle(
entity.getFacing() - 90f);
114 sprite.setSize(w, h);
115 sprite.setAlphaMult(alphaMult);
116 sprite.setNormalBlend();
117 sprite.renderAtCenter(loc.x, loc.y);
120 float glowAlpha = 0f;
121 if (phase < 0.5f) glowAlpha = phase * 2f;
122 if (phase >= 0.5f) glowAlpha = (1f - (phase - 0.5f) * 2f);
124 float glowAngle1 = (((phase * 1.3f) % 1) - 0.5f) * 12f;
125 float glowAngle2 = (((phase * 1.9f) % 1) - 0.5f) * 12f;
129 boolean glowAsLayer =
true;
132 Color glowColor =
new Color(255,200,0,255);
139 glow.setColor(glowColor);
142 glow.setAlphaMult(alphaMult * glowAlpha);
143 glow.setAdditiveBlend();
145 glow.setAngle(
entity.getFacing() - 90f + glowAngle1);
146 glow.renderAtCenter(loc.x, loc.y);
148 glow.setAngle(
entity.getFacing() - 90f + glowAngle2);
149 glow.setAlphaMult(alphaMult * glowAlpha * 0.5f);
150 glow.renderAtCenter(loc.x, loc.y);
152 glow.setAngle(
entity.getFacing() - 90f);
153 glow.setColor(
new Color(255,165,100));
155 glow.setSize(gs, gs);
156 glow.setAdditiveBlend();
159 glow.setAlphaMult(alphaMult * glowAlpha * 0.5f);
160 glow.renderAtCenter(loc.x - spacing, loc.y);
161 glow.renderAtCenter(loc.x + spacing, loc.y);
163 glow.setAlphaMult(alphaMult * glowAlpha);
164 glow.setSize(gs * 0.25f, gs * 0.25f);
165 glow.renderAtCenter(loc.x - spacing, loc.y);
166 glow.renderAtCenter(loc.x + spacing, loc.y);
173 Color color =
entity.getFaction().getBaseUIColor();
174 Color postColor = color;
175 if (
entity.getMemoryWithoutUpdate().getBoolean(RemnantSystemType.DESTROYED.getBeaconFlag())) {
177 postColor = Misc.getPositiveHighlightColor();
178 }
else if (
entity.getMemoryWithoutUpdate().getBoolean(RemnantSystemType.SUPPRESSED.getBeaconFlag())) {
180 postColor = Misc.getHighlightColor();
181 }
else if (
entity.getMemoryWithoutUpdate().getBoolean(RemnantSystemType.RESURGENT.getBeaconFlag())) {
183 postColor = Misc.getNegativeHighlightColor();
186 tooltip.addPara(
entity.getName() + post, 0f, color, postColor, post.replaceFirst(
" - ",
""));
196 if (level == VisibilityLevel.COMPOSITION_AND_FACTION_DETAILS ||
197 level == VisibilityLevel.COMPOSITION_DETAILS) {
200 Color color = Misc.getTextColor();
201 Color postColor = color;
202 if (
entity.getMemoryWithoutUpdate().getBoolean(RemnantSystemType.DESTROYED.getBeaconFlag())) {
204 postColor = Misc.getPositiveHighlightColor();
205 }
else if (
entity.getMemoryWithoutUpdate().getBoolean(RemnantSystemType.SUPPRESSED.getBeaconFlag())) {
207 postColor = Misc.getHighlightColor();
208 }
else if (
entity.getMemoryWithoutUpdate().getBoolean(RemnantSystemType.RESURGENT.getBeaconFlag())) {
210 postColor = Misc.getNegativeHighlightColor();
212 if (!post.isEmpty()) {
213 tooltip.setParaFontDefault();
214 tooltip.addPara(BaseIntelPlugin.BULLET +
"Danger level: " + post, 10f, color, postColor, post);