Starsector API
Loading...
Searching...
No Matches
ShipHullSpecAPI.java
Go to the documentation of this file.
1package com.fs.starfarer.api.combat;
2
3import java.awt.Color;
4import java.util.EnumSet;
5import java.util.HashMap;
6import java.util.List;
7import java.util.Set;
8
9import org.lwjgl.util.vector.Vector2f;
10
11import com.fs.starfarer.api.characters.MutableCharacterStatsAPI;
12import com.fs.starfarer.api.combat.ShieldAPI.ShieldType;
13import com.fs.starfarer.api.combat.ShipAPI.HullSize;
14import com.fs.starfarer.api.loading.WeaponSlotAPI;
15
16public interface ShipHullSpecAPI {
17
18 public interface ShieldSpecAPI {
19 float getPhaseCost();
22 ShieldType getType();
23 Color getRingColor();
26 float getArc();
27 float getRadius();
28 float getCenterX();
29 float getCenterY();
30 void setRingColor(Color color);
31 void setInnerColor(Color innerColor);
32 }
33
34 public interface EngineSpecAPI {
36 void setTurnAcceleration(float turnAcceleration);
38 void setMaxTurnRate(float maxTurnRate);
40 void setAcceleration(float acceleration);
42 void setDeceleration(float deceleration);
43 float getMaxSpeed();
44 void setMaxSpeed(float maxSpeed);
46 }
47
48
49 public static enum ShipTypeHints {
50 FREIGHTER,
51 TANKER,
52 LINER,
53 TRANSPORT,
54 CIVILIAN,
55 CARRIER,
56 COMBAT,
57 NO_AUTO_ESCORT,
58 UNBOARDABLE,
59 STATION,
60 SHIP_WITH_MODULES,
61 HIDE_IN_CODEX,
62 UNDER_PARENT,
63 INDEPENDENT_ROTATION,
64 ALWAYS_PANIC,
65 WEAPONS_FRONT_TO_BACK,
66 WEAPONS_BACK_TO_FRONT,
67 DO_NOT_SHOW_MODULES_IN_FLEET_LIST,
68 RENDER_ENGINES_BELOW_HULL,
69 NEVER_DODGE_MISSILES,
70 MISSILE_HARDPOINTS_ROTATE,
71
72 NO_NEURAL_LINK,
73
77 PHASE,
78 PLAY_FIGHTER_OVERLOAD_SOUNDS,
79 }
80
81
83
84 ShieldType getDefenseType();
85 String getHullId();
86 String getHullName();
87
88 EnumSet<ShipTypeHints> getHints();
89
93
94// /**
95// * The returned value is NOT modified by stats.getCRLossPerSecondPercent(), but does
96// * account for modifications to stats.getCRPerDeploymentPercent().
97// * @param stats
98// * @return
99// */
106
108
109 int getOrdnancePoints(MutableCharacterStatsAPI stats);
110 HullSize getHullSize();
115
116 ShieldType getShieldType();
117
118 List<WeaponSlotAPI> getAllWeaponSlotsCopy();
119
125 boolean hasHullName();
129
131 float getMinCrew();
132 float getMaxCrew();
133 float getCargo();
134 float getFuel();
136
137 boolean isDHull();
138 boolean isDefaultDHull();
139
140 void setDParentHullId(String dParentHullId);
142
145
146 List<String> getBuiltInWings();
147
148 boolean isBuiltInWing(int index);
149
151
152 boolean hasDesignation();
153
155 void setRestoreToBase(boolean restoreToBase);
156
157 Vector2f getModuleAnchor();
158 void setModuleAnchor(Vector2f moduleAnchor);
159 void setCompatibleWithBase(boolean compatibleWithBase);
160
161 Set<String> getTags();
162 void addTag(String tag);
163 boolean hasTag(String tag);
164
165 float getRarity();
166
168
170
171 boolean isBaseHull();
172
173 void setManufacturer(String manufacturer);
174
176
178
179 List<String> getBuiltInMods();
180
181 WeaponSlotAPI getWeaponSlotAPI(String slotId);
182
184
185 boolean isBuiltInMod(String modId);
186
187 void addBuiltInMod(String modId);
188
190
191 void setHullName(String hullName);
192 void setDesignation(String designation);
193
194 boolean isPhase();
195
197
199 void setTravelDriveId(String travelDriveId);
200
202
204
205 void setSuppliesToRecover(float suppliesToRecover);
206
208
209 void setSuppliesPerMonth(float suppliesPerMonth);
210
211 void setRepairPercentPerDay(float repairPercentPerDay);
212
213 void setCRToDeploy(float crToDeploy);
214
216
217 void setNoCRLossSeconds(float noCRLossSeconds);
218
219 void setCRLossPerSecond(float crLossPerSecond);
220
221 HashMap<String, String> getBuiltInWeapons();
222
223 boolean isBuiltIn(String slotId);
224
225 void addBuiltInWeapon(String slotId, String weaponId);
226
228
229 void setShipDefenseId(String shipDefenseId);
230
232
233 void setShipSystemId(String shipSystemId);
234
235 //ShipHullSpecAPI clone();
236
237 void setDescriptionPrefix(String descriptionPrefix);
238 WeaponSlotAPI getWeaponSlot(String slotId);
239 //List getAllWeaponSlotsNonCopy();
240 //void addWeaponSlot(WeaponSlotAPI slot);
241
242 void setFleetPoints(int fleetPoints);
243
244 void setDescriptionId(String descriptionId);
245
247
249
250}
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 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)