Interface ShipVariantAPI


public interface ShipVariantAPI
  • Method Details

    • clone

    • getHullSpec

      ShipHullSpecAPI getHullSpec()
    • getDisplayName

      String getDisplayName()
    • getDesignation

      String getDesignation()
    • getHullMods

      Collection<String> getHullMods()
    • clearHullMods

      void clearHullMods()
      Doesn't clear out built-in hullmods (or permamods), as opposed to getHullMods().clear().
    • getHints

    • addMod

      void addMod(String modId)
    • removeMod

      void removeMod(String modId)
    • addWeapon

      void addWeapon(String slotId, String weaponId)
    • getNumFluxVents

      int getNumFluxVents()
    • getNumFluxCapacitors

      int getNumFluxCapacitors()
    • getNonBuiltInWeaponSlots

      List<String> getNonBuiltInWeaponSlots()
      Only returns slots that have actual weapons in them, not empty slots.
      Returns:
    • getWeaponId

      String getWeaponId(String slotId)
    • setNumFluxCapacitors

      void setNumFluxCapacitors(int capacitors)
    • setNumFluxVents

      void setNumFluxVents(int vents)
    • setSource

      void setSource(VariantSource source)
    • clearSlot

      void clearSlot(String slotId)
    • getWeaponSpec

      WeaponSpecAPI getWeaponSpec(String slotId)
    • getFittedWeaponSlots

      Collection<String> getFittedWeaponSlots()
    • autoGenerateWeaponGroups

      void autoGenerateWeaponGroups()
    • hasUnassignedWeapons

      boolean hasUnassignedWeapons()
    • assignUnassignedWeapons

      void assignUnassignedWeapons()
    • getGroup

      WeaponGroupSpec getGroup(int index)
    • computeOPCost

      int computeOPCost(MutableCharacterStatsAPI stats)
    • computeWeaponOPCost

      int computeWeaponOPCost(MutableCharacterStatsAPI stats)
    • computeHullModOPCost

      int computeHullModOPCost()
    • computeHullModOPCost

      int computeHullModOPCost(MutableCharacterStatsAPI stats)
    • getSource

      VariantSource getSource()
    • isStockVariant

      boolean isStockVariant()
    • isEmptyHullVariant

      boolean isEmptyHullVariant()
    • setHullVariantId

      void setHullVariantId(String hullVariantId)
    • getHullVariantId

      String getHullVariantId()
    • getWeaponGroups

      List<WeaponGroupSpec> getWeaponGroups()
    • addWeaponGroup

      void addWeaponGroup(WeaponGroupSpec group)
    • setVariantDisplayName

      void setVariantDisplayName(String variantName)
    • getHullSize

      ShipAPI.HullSize getHullSize()
    • isFighter

      boolean isFighter()
    • getFullDesignationWithHullName

      String getFullDesignationWithHullName()
    • hasHullMod

      boolean hasHullMod(String id)
    • getSlot

      WeaponSlotAPI getSlot(String slotId)
    • isCombat

      boolean isCombat()
    • isStation

      boolean isStation()
    • getWingId

      String getWingId(int index)
    • setWingId

      void setWingId(int index, String wingId)
    • getWings

      List<String> getWings()
    • getLaunchBaysSlotIds

      List<String> getLaunchBaysSlotIds()
    • getFittedWings

      List<String> getFittedWings()
    • setHullSpecAPI

      void setHullSpecAPI(ShipHullSpecAPI hullSpec)
    • getPermaMods

      Set<String> getPermaMods()
    • clearPermaMods

      void clearPermaMods()
    • removePermaMod

      void removePermaMod(String modId)
    • addPermaMod

      void addPermaMod(String modId)
    • addPermaMod

      void addPermaMod(String modId, boolean isSMod)
    • isCarrier

      boolean isCarrier()
    • getSortedMods

      List<String> getSortedMods()
    • getSuppressedMods

      Set<String> getSuppressedMods()
    • addSuppressedMod

      void addSuppressedMod(String modId)
    • removeSuppressedMod

      void removeSuppressedMod(String modId)
    • clearSuppressedMods

      void clearSuppressedMods()
    • isGoalVariant

      boolean isGoalVariant()
    • setGoalVariant

      void setGoalVariant(boolean goalVariant)
    • getNonBuiltInHullmods

      Collection<String> getNonBuiltInHullmods()
    • getWing

      FighterWingSpecAPI getWing(int index)
    • getUnusedOP

      int getUnusedOP(MutableCharacterStatsAPI stats)
    • isCivilian

      boolean isCivilian()
    • getModuleSlots

      List<String> getModuleSlots()
    • getStatsForOpCosts

      MutableShipStatsAPI getStatsForOpCosts()
    • isLiner

      boolean isLiner()
    • isFreighter

      boolean isFreighter()
    • isTanker

      boolean isTanker()
    • isDHull

      boolean isDHull()
      Whether variant has any unsuppressed dmods.
      Returns:
    • getStationModules

      Map<String,String> getStationModules()
    • getNonBuiltInWings

      List<String> getNonBuiltInWings()
    • hasTag

      boolean hasTag(String tag)
    • addTag

      void addTag(String tag)
    • removeTag

      void removeTag(String tag)
    • getTags

      Collection<String> getTags()
    • clearTags

      void clearTags()
    • clear

      void clear()
      Removes everything non-built-in - weapons, fighters, hullmods - and sets vents/capacitors to 0.
    • getOriginalVariant

      String getOriginalVariant()
      If autofitted, what the goal variant was. May or may not be set. Must be set for fleet.deflate() to work.
      Returns:
    • setOriginalVariant

      void setOriginalVariant(String targetVariant)
      If autofitted by a FleetInflater, what the goal variant was. May or may not be set. Must be set for fleet.deflate() to work.
    • getModuleVariant

      ShipVariantAPI getModuleVariant(String slotId)
    • setModuleVariant

      void setModuleVariant(String slotId, ShipVariantAPI variant)
    • isTransport

      boolean isTransport()
    • getVariantFilePath

      String getVariantFilePath()
    • getSMods

      LinkedHashSet<String> getSMods()
    • getFullDesignationWithHullNameForShip

      String getFullDesignationWithHullNameForShip()
    • refreshBuiltInWings

      void refreshBuiltInWings()
    • hasDMods

      boolean hasDMods()
    • getSModdedBuiltIns

      LinkedHashSet<String> getSModdedBuiltIns()
    • isMayAutoAssignWeapons

      boolean isMayAutoAssignWeapons()
    • setMayAutoAssignWeapons

      void setMayAutoAssignWeapons(boolean mayAutoAssign)
    • getFullDesignationForShip

      String getFullDesignationForShip()
    • toJSONObject

      org.json.JSONObject toJSONObject() throws org.json.JSONException
      Throws:
      org.json.JSONException