Starsector API
Loading...
Searching...
No Matches
FighterChassisStorage.java
Go to the documentation of this file.
1package com.fs.starfarer.api.impl.hullmods;
2
3import com.fs.starfarer.api.combat.BaseHullMod;
4import com.fs.starfarer.api.combat.MutableShipStatsAPI;
5import com.fs.starfarer.api.combat.ShipAPI;
6import com.fs.starfarer.api.combat.ShipAPI.HullSize;
7import com.fs.starfarer.api.impl.campaign.ids.Stats;
8
9public class FighterChassisStorage extends BaseHullMod {
10
11 public void applyEffectsBeforeShipCreation(HullSize hullSize, MutableShipStatsAPI stats, String id) {
12 stats.getDynamic().getStat(Stats.REPLACEMENT_RATE_DECREASE_MULT).modifyMult(id, 0f);
13 }
14
15 public String getDescriptionParam(int index, HullSize hullSize) {
16 return null;
17 }
18
19 public boolean isApplicableToShip(ShipAPI ship) {
20 int bays = (int) ship.getMutableStats().getNumFighterBays().getBaseValue();
21 return ship != null && bays > 0;
22 }
23
24 public String getUnapplicableReason(ShipAPI ship) {
25 return "Ship does not have standard fighter bays";
26 }
27}
28
29
30
31
void applyEffectsBeforeShipCreation(HullSize hullSize, MutableShipStatsAPI stats, String id)