001package com.fs.starfarer.api.combat;
002
003import java.util.EnumSet;
004import java.util.HashMap;
005import java.util.List;
006import java.util.Set;
007
008import java.awt.Color;
009
010import org.lwjgl.util.vector.Vector2f;
011
012import com.fs.starfarer.api.characters.MutableCharacterStatsAPI;
013import com.fs.starfarer.api.combat.ShieldAPI.ShieldType;
014import com.fs.starfarer.api.combat.ShipAPI.HullSize;
015import com.fs.starfarer.api.loading.WeaponSlotAPI;
016import com.fs.starfarer.api.loading.WithSourceMod;
017
018public interface ShipHullSpecAPI extends WithSourceMod {
019        
020        public interface ShieldSpecAPI {
021                float getPhaseCost();
022                float getPhaseUpkeep();
023                float getFluxPerDamageAbsorbed();
024                ShieldType getType();
025                Color getRingColor();
026                Color getInnerColor();
027                float getUpkeepCost();
028                float getArc();
029                float getRadius();
030                float getCenterX();
031                float getCenterY();
032                void setRingColor(Color color);
033                void setInnerColor(Color innerColor);
034        }
035        
036        public interface EngineSpecAPI {
037                float getTurnAcceleration();
038                void setTurnAcceleration(float turnAcceleration);
039                float getMaxTurnRate();
040                void setMaxTurnRate(float maxTurnRate);
041                float getAcceleration();
042                void setAcceleration(float acceleration);
043                float getDeceleration();
044                void setDeceleration(float deceleration);
045                float getMaxSpeed();
046                void setMaxSpeed(float maxSpeed);
047                String getManeuverabilityDisplayName(MutableShipStatsAPI stats);
048        }
049        
050        
051        public static enum ShipTypeHints {
052                FREIGHTER,
053                TANKER,
054                LINER,
055                TRANSPORT,
056                CIVILIAN,
057                CARRIER,
058                COMBAT,
059                NO_AUTO_ESCORT,
060                UNBOARDABLE,
061                STATION,
062                SHIP_WITH_MODULES,
063                MODULE,
064                HIDE_IN_CODEX,
065                UNDER_PARENT,
066                INDEPENDENT_ROTATION,
067                ALWAYS_PANIC,
068                WEAPONS_FRONT_TO_BACK,
069                WEAPONS_BACK_TO_FRONT,
070                DO_NOT_SHOW_MODULES_IN_FLEET_LIST,
071                RENDER_ENGINES_BELOW_HULL,
072                NEVER_DODGE_MISSILES,
073                MISSILE_HARDPOINTS_ROTATE,
074                
075                NO_NEURAL_LINK,
076                
077                /** for phase ships w/ a different type of phase system to show up under 
078                 * the "Phase" tag in doctrine/production
079                 *  */
080                PHASE,
081                PLAY_FIGHTER_OVERLOAD_SOUNDS, /** by default, fighters don't play overload sounds */
082        }
083        
084        
085        public ShieldSpecAPI getShieldSpec();
086        
087        ShieldType getDefenseType();
088        String getHullId();
089        String getHullName();
090        
091        EnumSet<ShipTypeHints> getHints();
092        
093        float getNoCRLossTime();
094        float getCRToDeploy();
095        float getCRLossPerSecond();
096        
097//      /**
098//       * The returned value is NOT modified by stats.getCRLossPerSecondPercent(), but does
099//       * account for modifications to stats.getCRPerDeploymentPercent().
100//       * @param stats
101//       * @return
102//       */
103        /**
104         * (Equivalent to getCRLossPerSecond(), the parameter is ignored.)
105         * @param stats
106         * @return
107         */
108        float getCRLossPerSecond(MutableShipStatsAPI stats);
109        
110        float getBaseValue();
111        
112        int getOrdnancePoints(MutableCharacterStatsAPI stats);
113        HullSize getHullSize();
114        float getHitpoints();
115        float getArmorRating();
116        float getFluxCapacity();
117        float getFluxDissipation();
118        
119        ShieldType getShieldType();
120        
121        List<WeaponSlotAPI> getAllWeaponSlotsCopy();
122        
123        String getSpriteName();
124        boolean isCompatibleWithBase();
125        String getBaseHullId();
126        float getBaseShieldFluxPerDamageAbsorbed();
127        String getHullNameWithDashClass();
128        boolean hasHullName();
129        float getBreakProb();
130        float getMinPieces();
131        float getMaxPieces();
132
133        int getFighterBays();
134        float getMinCrew();
135        float getMaxCrew();
136        float getCargo();
137        float getFuel();
138        float getFuelPerLY();
139
140        boolean isDHull();
141        boolean isDefaultDHull();
142
143        void setDParentHullId(String dParentHullId);
144        String getDParentHullId();
145
146        ShipHullSpecAPI getDParentHull();
147        ShipHullSpecAPI getBaseHull();
148
149        List<String> getBuiltInWings();
150
151        boolean isBuiltInWing(int index);
152
153        String getDesignation();
154
155        boolean hasDesignation();
156
157        boolean isRestoreToBase();
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
170        String getNameWithDesignationWithDashClass();
171
172        String getDescriptionId();
173
174        boolean isBaseHull();
175
176        void setManufacturer(String manufacturer);
177
178        String getManufacturer();
179
180        int getFleetPoints();
181
182        List<String> getBuiltInMods();
183
184        WeaponSlotAPI getWeaponSlotAPI(String slotId);
185
186        String getDescriptionPrefix();
187
188        boolean isBuiltInMod(String modId);
189
190        void addBuiltInMod(String modId);
191
192        boolean isCivilianNonCarrier();
193
194        void setHullName(String hullName);
195        void setDesignation(String designation);
196
197        boolean isPhase();
198
199        String getShipFilePath();
200
201        String getTravelDriveId();
202        void setTravelDriveId(String travelDriveId);
203
204        EngineSpecAPI getEngineSpec();
205
206        float getSuppliesToRecover();
207
208        void setSuppliesToRecover(float suppliesToRecover);
209
210        float getSuppliesPerMonth();
211
212        void setSuppliesPerMonth(float suppliesPerMonth);
213
214        void setRepairPercentPerDay(float repairPercentPerDay);
215
216        void setCRToDeploy(float crToDeploy);
217
218        float getNoCRLossSeconds();
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
230        String getShipDefenseId();
231
232        void setShipDefenseId(String shipDefenseId);
233
234        String getShipSystemId();
235
236        void setShipSystemId(String shipSystemId);
237
238        //ShipHullSpecAPI clone();
239
240        void setDescriptionPrefix(String descriptionPrefix);
241        WeaponSlotAPI getWeaponSlot(String slotId);
242        //List getAllWeaponSlotsNonCopy();
243        //void addWeaponSlot(WeaponSlotAPI slot);
244
245        void setFleetPoints(int fleetPoints);
246
247        void setDescriptionId(String descriptionId);
248
249        Color getHyperspaceJitterColor();
250
251        boolean isDHullOldMethod();
252
253        boolean isCarrier();
254
255        String getLogisticsNAReason();
256        void setLogisticsNAReason(String logisticsNAReason);
257
258        float getCollisionRadius();
259
260        String getCodexVariantId();
261        void setCodexVariantId(String codexVariantId);
262
263        String getRestoredToHullId();
264        
265
266}
267
268