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
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
static enum
static enum
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAICoreSection
(TooltipMakerAPI tooltip, Industry.AICoreDescriptionMode mode) void
addAICoreSection
(TooltipMakerAPI tooltip, String coreId, Industry.AICoreDescriptionMode mode) void
adjustCommodityDangerLevel
(String commodityId, MarketCMD.RaidDangerLevel level) adjustItemDangerLevel
(String itemId, String data, MarketCMD.RaidDangerLevel level) Includes nonecon "commodities" such as AI cores.int
adjustMarineTokensToRaidItem
(String itemId, String data, int marineTokens) void
advance
(float amount) void
apply()
boolean
void
boolean
boolean
boolean
boolean
boolean
void
createTooltip
(Industry.IndustryTooltipMode mode, TooltipMakerAPI tooltip, boolean expanded) void
void
void
void
generateCargoForGatheringPoint
(Random random) getAllDeficit
(String... commodityIds) float
float
float
float
float
getId()
float
int
getMaxDeficit
(String... commodityIds) float
getSpec()
float
void
void
initWithParams
(List<String> params) Used when loading market from an economy .json file.boolean
boolean
Building OR upgrading.boolean
boolean
boolean
Building and not upgrading.boolean
isHidden()
boolean
boolean
boolean
isOther()
boolean
boolean
boolean
boolean
Upgrading, but not the initial building process.void
notifyBeingRemoved
(MarketAPI.MarketInteractionMode mode, boolean forUpgrade) void
void
reapply()
Calls unapply() and then reapply().void
setAICoreId
(String aiCoreId) void
setDisrupted
(float days) void
setDisrupted
(float days, boolean useMax) void
setHidden
(boolean hidden) void
setImproved
(boolean improved) void
setSpecialItem
(SpecialItemData special) boolean
boolean
void
void
void
void
unapply()
void
boolean
Return false if already using one of that type, unless the other one is better.
-
Method Details
-
initWithParams
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
List<MutableCommodityQuantity> getAllSupply() -
getAllDemand
List<MutableCommodityQuantity> getAllDemand() -
getSupply
-
getDemand
-
getIncome
MutableStat getIncome() -
getUpkeep
MutableStat getUpkeep() -
init
-
getId
String getId() -
getSpec
IndustrySpecAPI getSpec() -
getMaxDeficit
-
getAllDeficit
-
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() -
getBuildOrUpgradeProgressText
String getBuildOrUpgradeProgressText() -
isFunctional
boolean isFunctional()Building and not upgrading.- Returns:
-
isTooltipExpandable
boolean isTooltipExpandable() -
getTooltipWidth
float getTooltipWidth() -
createTooltip
-
updateIncomeAndUpkeep
void updateIncomeAndUpkeep() -
getAICoreId
String getAICoreId() -
setAICoreId
-
supply
-
downgrade
void downgrade() -
cancelUpgrade
void cancelUpgrade() -
showShutDown
boolean showShutDown() -
canShutDown
boolean canShutDown() -
getCanNotShutDownReason
String getCanNotShutDownReason() -
canUpgrade
boolean canUpgrade() -
canDowngrade
boolean canDowngrade() -
addAICoreSection
-
addAICoreSection
-
isSupplyLegal
-
isDemandLegal
-
getDemandReduction
MutableStat getDemandReduction() -
getSupplyBonus
MutableStat getSupplyBonus() -
getVisibleInstalledItems
List<SpecialItemData> getVisibleInstalledItems() -
getInstallableItems
List<InstallableIndustryItemPlugin> getInstallableItems() -
notifyBeingRemoved
-
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
-
getSpecialItem
SpecialItemData getSpecialItem() -
setSpecialItem
-
getNameForModifier
String getNameForModifier() -
wantsToUseSpecialItem
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
-
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
-
canInstallAICores
boolean canInstallAICores() -
getDemandReductionFromOther
MutableStat getDemandReductionFromOther() -
getSupplyBonusFromOther
MutableStat getSupplyBonusFromOther() -
setHidden
void setHidden(boolean hidden)
-