Starsector API
Loading...
Searching...
No Matches
ShipHullSpecAPI.java
Go to the documentation of this file.
1package com.fs.starfarer.api.combat;
2
3import java.util.EnumSet;
4import java.util.HashMap;
5import java.util.List;
6import java.util.Set;
7
8import java.awt.Color;
9
10import org.lwjgl.util.vector.Vector2f;
11
12import com.fs.starfarer.api.characters.MutableCharacterStatsAPI;
13import com.fs.starfarer.api.combat.ShieldAPI.ShieldType;
14import com.fs.starfarer.api.combat.ShipAPI.HullSize;
15import com.fs.starfarer.api.loading.WeaponSlotAPI;
16import com.fs.starfarer.api.loading.WithSourceMod;
17
18public interface ShipHullSpecAPI extends WithSourceMod {
19
20 public interface ShieldSpecAPI {
21 float getPhaseCost();
24 ShieldType getType();
25 Color getRingColor();
28 float getArc();
29 float getRadius();
30 float getCenterX();
31 float getCenterY();
32 void setRingColor(Color color);
33 void setInnerColor(Color innerColor);
34 }
35
36 public interface EngineSpecAPI {
38 void setTurnAcceleration(float turnAcceleration);
40 void setMaxTurnRate(float maxTurnRate);
42 void setAcceleration(float acceleration);
44 void setDeceleration(float deceleration);
45 float getMaxSpeed();
46 void setMaxSpeed(float maxSpeed);
48 }
49
50
51 public static enum ShipTypeHints {
52 FREIGHTER,
53 TANKER,
54 LINER,
55 TRANSPORT,
56 CIVILIAN,
57 CARRIER,
58 COMBAT,
59 NO_AUTO_ESCORT,
60 UNBOARDABLE,
61 STATION,
62 SHIP_WITH_MODULES,
63 MODULE,
64 HIDE_IN_CODEX,
65 UNDER_PARENT,
66 INDEPENDENT_ROTATION,
67 ALWAYS_PANIC,
68 WEAPONS_FRONT_TO_BACK,
69 WEAPONS_BACK_TO_FRONT,
70 DO_NOT_SHOW_MODULES_IN_FLEET_LIST,
71 RENDER_ENGINES_BELOW_HULL,
72 NEVER_DODGE_MISSILES,
73 MISSILE_HARDPOINTS_ROTATE,
74
75 NO_NEURAL_LINK,
76
80 PHASE,
81 PLAY_FIGHTER_OVERLOAD_SOUNDS,
82 }
83
84
86
87 ShieldType getDefenseType();
88 String getHullId();
89 String getHullName();
90
91 EnumSet<ShipTypeHints> getHints();
92
96
97// /**
98// * The returned value is NOT modified by stats.getCRLossPerSecondPercent(), but does
99// * account for modifications to stats.getCRPerDeploymentPercent().
100// * @param stats
101// * @return
102// */
109
111
113 HullSize getHullSize();
118
119 ShieldType getShieldType();
120
121 List<WeaponSlotAPI> getAllWeaponSlotsCopy();
122
128 boolean hasHullName();
132
134 float getMinCrew();
135 float getMaxCrew();
136 float getCargo();
137 float getFuel();
139
140 boolean isDHull();
141 boolean isDefaultDHull();
142
143 void setDParentHullId(String dParentHullId);
145
148
149 List<String> getBuiltInWings();
150
151 boolean isBuiltInWing(int index);
152
154
155 boolean hasDesignation();
156
158 void setRestoreToBase(boolean restoreToBase);
159
160 Vector2f getModuleAnchor();
161 void setModuleAnchor(Vector2f moduleAnchor);
162 void setCompatibleWithBase(boolean compatibleWithBase);
163
164 Set<String> getTags();
165 void addTag(String tag);
166 boolean hasTag(String tag);
167
168 float getRarity();
169
171
173
174 boolean isBaseHull();
175
176 void setManufacturer(String manufacturer);
177
179
181
182 List<String> getBuiltInMods();
183
185
187
188 boolean isBuiltInMod(String modId);
189
190 void addBuiltInMod(String modId);
191
193
194 void setHullName(String hullName);
195 void setDesignation(String designation);
196
197 boolean isPhase();
198
200
202 void setTravelDriveId(String travelDriveId);
203
205
207
208 void setSuppliesToRecover(float suppliesToRecover);
209
211
212 void setSuppliesPerMonth(float suppliesPerMonth);
213
214 void setRepairPercentPerDay(float repairPercentPerDay);
215
216 void setCRToDeploy(float crToDeploy);
217
219
220 void setNoCRLossSeconds(float noCRLossSeconds);
221
222 void setCRLossPerSecond(float crLossPerSecond);
223
224 HashMap<String, String> getBuiltInWeapons();
225
226 boolean isBuiltIn(String slotId);
227
228 void addBuiltInWeapon(String slotId, String weaponId);
229
231
232 void setShipDefenseId(String shipDefenseId);
233
235
236 void setShipSystemId(String shipSystemId);
237
238 //ShipHullSpecAPI clone();
239
240 void setDescriptionPrefix(String descriptionPrefix);
242 //List getAllWeaponSlotsNonCopy();
243 //void addWeaponSlot(WeaponSlotAPI slot);
244
245 void setFleetPoints(int fleetPoints);
246
247 void setDescriptionId(String descriptionId);
248
250
252
253 boolean isCarrier();
254
256 void setLogisticsNAReason(String logisticsNAReason);
257
259
261 void setCodexVariantId(String codexVariantId);
262
264
265
266}
267
268
String getManeuverabilityDisplayName(MutableShipStatsAPI stats)
float getCRLossPerSecond(MutableShipStatsAPI stats)
WeaponSlotAPI getWeaponSlotAPI(String slotId)
void setDesignation(String designation)
void setDParentHullId(String dParentHullId)
void setSuppliesPerMonth(float suppliesPerMonth)
List< WeaponSlotAPI > getAllWeaponSlotsCopy()
void setNoCRLossSeconds(float noCRLossSeconds)
EnumSet< ShipTypeHints > getHints()
void setShipDefenseId(String shipDefenseId)
void setTravelDriveId(String travelDriveId)
void setDescriptionPrefix(String descriptionPrefix)
void setLogisticsNAReason(String logisticsNAReason)
void setRestoreToBase(boolean restoreToBase)
void setCompatibleWithBase(boolean compatibleWithBase)
void setModuleAnchor(Vector2f moduleAnchor)
WeaponSlotAPI getWeaponSlot(String slotId)
void setCRLossPerSecond(float crLossPerSecond)
void setShipSystemId(String shipSystemId)
void setDescriptionId(String descriptionId)
void setRepairPercentPerDay(float repairPercentPerDay)
int getOrdnancePoints(MutableCharacterStatsAPI stats)
void setManufacturer(String manufacturer)
void setSuppliesToRecover(float suppliesToRecover)
HashMap< String, String > getBuiltInWeapons()
void addBuiltInWeapon(String slotId, String weaponId)
void setCodexVariantId(String codexVariantId)