Starsector API
Loading...
Searching...
No Matches
CombatReadinessPlugin.java
Go to the documentation of this file.
1package com.fs.starfarer.api.combat;
2
3import java.util.ArrayList;
4import java.util.List;
5
6import com.fs.starfarer.api.combat.ShipAPI.HullSize;
7import com.fs.starfarer.api.fleet.FleetMemberAPI;
8
9public interface CombatReadinessPlugin {
10
11 public static enum CREffectDetailType {
12 PENALTY,
13 BONUS,
14 NEUTRAL,
15 }
16
17 public static class CREffectDetail {
18 private String desc;
19 private String value;
20 private CREffectDetailType type;
21
22 public CREffectDetail(String desc, String value, CREffectDetailType type) {
23 this.desc = desc;
24 this.value = value;
25 this.type = type;
26 }
27 public String getDesc() {
28 return desc;
29 }
30 public String getValue() {
31 return value;
32 }
33 public CREffectDetailType getType() {
34 return type;
35 }
36 }
37
38 public static class CREffectDescriptionForTooltip {
39 private String string;
40 private List<String> highlights = new ArrayList<String>();
41 public String getString() {
42 return string;
43 }
44 public void setString(String string) {
45 this.string = string;
46 }
47 public List<String> getHighlights() {
48 return highlights;
49 }
50 }
51
52
53 public static class CRStatusItemData {
54 private String title;
55 private String text;
56 private String iconName;
57 private boolean isDebuff;
58 private Object idToken;
59 public CRStatusItemData(Object idToken, String iconName,
60 String title, String text, boolean isDebuff) {
61 this.title = title;
62 this.text = text;
63 this.iconName = iconName;
64 this.isDebuff = isDebuff;
65 this.idToken = idToken;
66 }
67 public String getTitle() {
68 return title;
69 }
70 public String getText() {
71 return text;
72 }
73 public String getIconName() {
74 return iconName;
75 }
76 public boolean isDebuff() {
77 return isDebuff;
78 }
79 public Object getIdToken() {
80 return idToken;
81 }
82 }
83
84 void applyMaxCRCrewModifiers(FleetMemberAPI member);
85
86
87 void applyCRToStats(float cr, MutableShipStatsAPI stats, HullSize hullSize);
88 void applyCRToShip(float cr, ShipAPI ship);
89
90 List<CRStatusItemData> getCRStatusDataForShip(ShipAPI ship);
91
94
95
103 CREffectDescriptionForTooltip getCREffectDescription(float cr, String shipOrWing, FleetMemberAPI member);
104
105 List<CREffectDetail> getCREffectDetails(float cr, FleetMemberAPI member);
107
108
109 boolean isOkToPermanentlyDisable(ShipAPI ship, Object module);
110}
111
112
113
boolean isOkToPermanentlyDisable(ShipAPI ship, Object module)
void applyCRToStats(float cr, MutableShipStatsAPI stats, HullSize hullSize)
void applyCRToShip(float cr, ShipAPI ship)
CREffectDescriptionForTooltip getCREffectDescription(float cr, String shipOrWing, FleetMemberAPI member)
float getCriticalMalfunctionThreshold(MutableShipStatsAPI stats)
List< CREffectDetail > getCREffectDetails(float cr, FleetMemberAPI member)
float getMalfunctionThreshold(MutableShipStatsAPI stats)
float getMissileLoadedFraction(MutableShipStatsAPI stats, float cr)
void applyMaxCRCrewModifiers(FleetMemberAPI member)
List< CRStatusItemData > getCRStatusDataForShip(ShipAPI ship)