Interface Industry

All Known Implementing Classes:
BaseIndustry, Cryorevival, Cryosanctum, Farming, FuelProduction, GroundDefenses, HeavyIndustry, LightIndustry, LionsGuardHQ, MilitaryBase, Mining, OrbitalStation, PlanetaryShield, PopulationAndInfrastructure, Refining, Spaceport, TechMining, TradeCenter, Waystation

public interface Industry
  • Method Details

    • initWithParams

      void initWithParams(List<String> params)
      Used when loading market from an economy .json file. Params are the special items/AI cores/etc that this industry has installed; this method should sort out what they all are based on IDs and install as appropriate.
      Parameters:
      params -
    • getMarket

      MarketAPI getMarket()
    • apply

      void apply()
    • unapply

      void unapply()
    • reapply

      void reapply()
      Calls unapply() and then reapply().
    • advance

      void advance(float amount)
    • getAllSupply

    • getAllDemand

    • getSupply

    • getDemand

    • getIncome

      MutableStat getIncome()
    • getUpkeep

      MutableStat getUpkeep()
    • init

      void init(String id, MarketAPI market)
    • getId

      String getId()
    • getSpec

      IndustrySpecAPI getSpec()
    • getMaxDeficit

      Pair<String,Integer> getMaxDeficit(String... commodityIds)
    • getAllDeficit

      List<Pair<String,Integer>> getAllDeficit(String... commodityIds)
    • getAllDeficit

      List<Pair<String,Integer>> getAllDeficit()
    • doPreSaveCleanup

      void doPreSaveCleanup()
    • doPostSaveRestore

      void doPostSaveRestore()
    • getCurrentImage

      String getCurrentImage()
    • getCurrentName

      String getCurrentName()
    • isBuilding

      boolean isBuilding()
      Building OR upgrading.
      Returns:
    • isUpgrading

      boolean isUpgrading()
      Upgrading, but not the initial building process.
      Returns:
    • startBuilding

      void startBuilding()
    • finishBuildingOrUpgrading

      void finishBuildingOrUpgrading()
    • startUpgrading

      void startUpgrading()
    • getBuildOrUpgradeProgress

      float getBuildOrUpgradeProgress()
    • getBuildTime

      float getBuildTime()
    • getBuildCost

      float getBuildCost()
    • getBaseUpkeep

      float getBaseUpkeep()
    • isAvailableToBuild

      boolean isAvailableToBuild()
    • showWhenUnavailable

      boolean showWhenUnavailable()
    • getUnavailableReason

      String getUnavailableReason()
    • getBuildOrUpgradeProgressText

      String getBuildOrUpgradeProgressText()
    • isFunctional

      boolean isFunctional()
      Building and not upgrading.
      Returns:
    • isTooltipExpandable

      boolean isTooltipExpandable()
    • getTooltipWidth

      float getTooltipWidth()
    • createTooltip

      void createTooltip(Industry.IndustryTooltipMode mode, TooltipMakerAPI tooltip, boolean expanded)
    • updateIncomeAndUpkeep

      void updateIncomeAndUpkeep()
    • getAICoreId

      String getAICoreId()
    • setAICoreId

      void setAICoreId(String aiCoreId)
    • supply

      void supply(String modId, String commodityId, int quantity, String desc)
    • downgrade

      void downgrade()
    • cancelUpgrade

      void cancelUpgrade()
    • showShutDown

      boolean showShutDown()
    • canShutDown

      boolean canShutDown()
    • getCanNotShutDownReason

      String getCanNotShutDownReason()
    • canUpgrade

      boolean canUpgrade()
    • canDowngrade

      boolean canDowngrade()
    • addAICoreSection

      void addAICoreSection(TooltipMakerAPI tooltip, Industry.AICoreDescriptionMode mode)
    • addAICoreSection

      void addAICoreSection(TooltipMakerAPI tooltip, String coreId, Industry.AICoreDescriptionMode mode)
    • isSupplyLegal

      boolean isSupplyLegal(CommodityOnMarketAPI com)
    • isDemandLegal

      boolean isDemandLegal(CommodityOnMarketAPI com)
    • getDemandReduction

      MutableStat getDemandReduction()
    • getSupplyBonus

      MutableStat getSupplyBonus()
    • getVisibleInstalledItems

      List<SpecialItemData> getVisibleInstalledItems()
    • getInstallableItems

      List<InstallableIndustryItemPlugin> getInstallableItems()
    • notifyBeingRemoved

      void notifyBeingRemoved(MarketAPI.MarketInteractionMode mode, boolean forUpgrade)
    • isHidden

      boolean isHidden()
    • setDisrupted

      void setDisrupted(float days)
    • setDisrupted

      void setDisrupted(float days, boolean useMax)
    • getDisruptedDays

      float getDisruptedDays()
    • isDisrupted

      boolean isDisrupted()
    • canBeDisrupted

      boolean canBeDisrupted()
    • getPatherInterest

      float getPatherInterest()
    • getCargoTitleForGatheringPoint

      String getCargoTitleForGatheringPoint()
    • generateCargoForGatheringPoint

      CargoAPI generateCargoForGatheringPoint(Random random)
    • getSpecialItem

      SpecialItemData getSpecialItem()
    • setSpecialItem

      void setSpecialItem(SpecialItemData special)
    • getNameForModifier

      String getNameForModifier()
    • wantsToUseSpecialItem

      boolean wantsToUseSpecialItem(SpecialItemData data)
      Return false if already using one of that type, unless the other one is better.
      Parameters:
      data -
      Returns:
    • isIndustry

      boolean isIndustry()
    • isStructure

      boolean isStructure()
    • isOther

      boolean isOther()
    • getBuildOrUpgradeDaysText

      String getBuildOrUpgradeDaysText()
    • notifyColonyRenamed

      void notifyColonyRenamed()
    • canImprove

      boolean canImprove()
    • isImproved

      boolean isImproved()
    • setImproved

      void setImproved(boolean improved)
    • getImproveMenuText

      String getImproveMenuText()
    • addImproveDesc

      void addImproveDesc(TooltipMakerAPI info, Industry.ImprovementDescriptionMode mode)
    • getImproveStoryPoints

      int getImproveStoryPoints()
    • getImproveBonusXP

      float getImproveBonusXP()
    • getImproveSoundId

      String getImproveSoundId()
    • getImproveDialogTitle

      String getImproveDialogTitle()
    • adjustCommodityDangerLevel

      MarketCMD.RaidDangerLevel adjustCommodityDangerLevel(String commodityId, MarketCMD.RaidDangerLevel level)
    • adjustItemDangerLevel

      MarketCMD.RaidDangerLevel adjustItemDangerLevel(String itemId, String data, MarketCMD.RaidDangerLevel level)
      Includes nonecon "commodities" such as AI cores. Rule of thumb: if it requires a set number of marine tokens to raid, then this method determines the danger level. Otherwise, it's getCommodityDangerLevel().
      Parameters:
      itemId -
      Returns:
    • adjustMarineTokensToRaidItem

      int adjustMarineTokensToRaidItem(String itemId, String data, int marineTokens)
    • canInstallAICores

      boolean canInstallAICores()
    • getDemandReductionFromOther

      MutableStat getDemandReductionFromOther()
    • getSupplyBonusFromOther

      MutableStat getSupplyBonusFromOther()
    • setHidden

      void setHidden(boolean hidden)