Nested Class Summary
Nested Classes
Method Summary
All Methods Instance Methods Abstract Methods
void
Returns token which can be used to remove this specific condition.
Returns token which can be used to remove this specific condition.
void
void
void
void
void
void
void
void
void
void
void
float
float
Price for the market buying quantity of given commodity, given the current stockpile/demand/etc.
float
Modifier for the price the market is willing to buy things at.
Markets with the same economy group will not be visible from markets outside this group
(in "nearby markets" dialog etc) and will only trade with each other.
float
Get the first condition of a specific type; id is non-unique.
float
float
float
float
float
float
org.lwjgl.util.vector.Vector2f
Same as getLocationInHyperspace().
org.lwjgl.util.vector.Vector2f
float
float
float
float
int
Get a condition using its unique id.
float
Integer value from 0 to 10, inclusive.
float
Price for the market selling quantity of given commodity, given the current stockpile/demand/etc.
float
Modifier for the price the market is willing to sell things at.
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
Hidden markets do not offer missions or otherwise participate in events/intel/etc that would
indirectly reveal their existence to the player.
boolean
Checks against FactionAPI.getIllegalCommodities() for the faction owning the market.
boolean
Checks against FactionAPI.getIllegalCommodities() for the faction owning the market.
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
float
May add more than one ship if a fallback specifies to add multiple ships.
float
void
void
void
void
Removes all copies of this condition.
void
void
Pass in null for mode when calling this from API code.
void
void
Removes specific copy of a condition.
void
void
void
void
The old admin, if any, is removed from the market and its comm directory.
void
void
void
Markets with the same economy group will not be visible from markets outside this group
(in "nearby markets" dialog etc) and will only trade with each other.
void
void
void
void
void
void
Hidden markets do not offer missions or otherwise participate in events/intel/etc that would
indirectly reveal their existence to the player.
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
Updates the local price multiplier (based on stability).
void
boolean
Method Details
setSize
void setSize (int size)
addCondition
Returns token which can be used to remove this specific condition.
Parameters:
id
-
Returns:
addCondition
Returns token which can be used to remove this specific condition.
Parameters:
id
-
param
-
Returns:
removeCondition
void removeCondition (String id)
Removes all copies of this condition.
Parameters:
id
-
removeSpecificCondition
void removeSpecificCondition (String token)
Removes specific copy of a condition.
Parameters:
token
- return value from addCondition()
hasCondition
boolean hasCondition (String id)
hasSpecificCondition
boolean hasSpecificCondition (String token)
reapplyConditions
void reapplyConditions ()
reapplyCondition
void reapplyCondition (String token)
getDemandPriceMod
Modifier for the price the market is willing to buy things at.
Only the multiplier part of this works.
Returns:
getSupplyPriceMod
Modifier for the price the market is willing to sell things at.
Returns:
getSupplyPrice
float getSupplyPrice (String commodityId,
double quantity,
boolean isPlayerPrice)
Price for the market selling quantity of given commodity, given the current stockpile/demand/etc.
Parameters:
commodityId
-
quantity
-
Returns:
getDemandPrice
float getDemandPrice (String commodityId,
double quantity,
boolean isPlayerPrice)
Price for the market buying quantity of given commodity, given the current stockpile/demand/etc.
Parameters:
commodityId
-
quantity
-
Returns:
getDemandPriceAssumingExistingTransaction
float getDemandPriceAssumingExistingTransaction (String commodityId,
double quantity,
double existingTransactionUtility,
boolean isPlayerPrice)
Parameters:
commodityId
-
quantity
-
existingTransactionUtility
- positive for stuff sold to market, negative for stuff bought from market.
isPlayerPrice
-
Returns:
getSupplyPriceAssumingExistingTransaction
float getSupplyPriceAssumingExistingTransaction (String commodityId,
double quantity,
double existingTransactionUtility,
boolean isPlayerPrice)
Parameters:
commodityId
-
quantity
-
existingTransactionUtility
- positive for stuff sold to market, negative for stuff bought from market.
isPlayerPrice
-
Returns:
isIllegal
boolean isIllegal (String commodityId)
Checks against FactionAPI.getIllegalCommodities() for the faction owning the market.
Parameters:
commodityId
-
Returns:
isIllegal
Checks against FactionAPI.getIllegalCommodities() for the faction owning the market.
Parameters:
com
-
Returns:
getStabilityValue
float getStabilityValue ()
Integer value from 0 to 10, inclusive.
Returns:
addSubmarket
void addSubmarket (String specId)
hasSubmarket
boolean hasSubmarket (String specId)
removeSubmarket
void removeSubmarket (String specId)
setFactionId
void setFactionId (String factionId)
updatePriceMult
void updatePriceMult ()
Updates the local price multiplier (based on stability).
pickShipAndAddToFleet
May add more than one ship if a fallback specifies to add multiple ships.
(For example, 2 small freighters if a medium freighter isn't available.)
See FactionAPI.pickShipAndAddToFleet for return value explanation.
Returns:
getShipQualityFactor
float getShipQualityFactor ()
getLocationInHyperspace
org.lwjgl.util.vector.Vector2f getLocationInHyperspace ()
getCommDirectory
Returns:
isPlanetConditionMarketOnly
boolean isPlanetConditionMarketOnly ()
setPlanetConditionMarketOnly
void setPlanetConditionMarketOnly (boolean isPlanetConditionMarketOnly)
getHazardValue
float getHazardValue ()
1f = 100%.
Returns:
advance
void advance (float amount)
isForceNoConvertOnSave
boolean isForceNoConvertOnSave ()
setForceNoConvertOnSave
void setForceNoConvertOnSave (boolean forceNoConvertOnSave)
updatePrices
void updatePrices ()
getSpecificCondition
Get a condition using its unique id.
Parameters:
token
-
Returns:
getFirstCondition
Get the first condition of a specific type; id is non-unique.
Parameters:
id
-
Returns:
isInEconomy
boolean isInEconomy ()
removeIndustry
Pass in null for mode when calling this from API code.
Parameters:
id
-
mode
-
reapplyIndustries
void reapplyIndustries ()
getLocation
org.lwjgl.util.vector.Vector2f getLocation ()
Same as getLocationInHyperspace().
Returns:
getIndustry
In-system, i.e. not affected by fuel shortages etc.
Returns:
hasIndustry
boolean hasIndustry (String id)
getIndustryUpkeep
float getIndustryUpkeep ()
getIndustryIncome
float getIndustryIncome ()
hasWaystation
boolean hasWaystation ()
clearCommodities
void clearCommodities ()
isPlayerOwned
boolean isPlayerOwned ()
setPlayerOwned
void setPlayerOwned (boolean playerOwned)
getPrevStability
float getPrevStability ()
getExportIncome
float getExportIncome (boolean withOverhead)
getNetIncome
float getNetIncome ()
getTransientImmigrationModifiers
removeImmigrationModifier
addTransientImmigrationModifier
removeTransientImmigrationModifier
getAllImmigrationModifiers
getIncentiveCredits
float getIncentiveCredits ()
setIncentiveCredits
void setIncentiveCredits (float incentiveCredits)
isImmigrationIncentivesOn
boolean isImmigrationIncentivesOn ()
setImmigrationIncentivesOn
void setImmigrationIncentivesOn (Boolean incentivesOn)
isFreePort
boolean isFreePort ()
setFreePort
void setFreePort (boolean freePort)
isImmigrationClosed
boolean isImmigrationClosed ()
setImmigrationClosed
void setImmigrationClosed (boolean closed)
wasIncomingSetBefore
boolean wasIncomingSetBefore ()
setAdmin
The old admin, if any, is removed from the market and its comm directory.
Parameters:
admin
-
getDaysInExistence
float getDaysInExistence ()
setDaysInExistence
void setDaysInExistence (float daysInExistence)
getAccessibilityMod
o = 0%, 1 = 100%.
Returns:
hasSpaceport
boolean hasSpaceport ()
setHasSpaceport
void setHasSpaceport (boolean hasSpaceport)
setHasWaystation
void setHasWaystation (boolean hasWaystation)
getEconGroup
Markets with the same economy group will not be visible from markets outside this group
(in "nearby markets" dialog etc) and will only trade with each other. null by default, which
forms its own group.
Returns:
setEconGroup
void setEconGroup (String econGroup)
Markets with the same economy group will not be visible from markets outside this group
(in "nearby markets" dialog etc) and will only trade with each other. null by default, which
forms its own group.
getTextColorForFactionOrPlanet
Color getTextColorForFactionOrPlanet ()
getDarkColorForFactionOrPlanet
Color getDarkColorForFactionOrPlanet ()
isHidden
boolean isHidden ()
Hidden markets do not offer missions or otherwise participate in events/intel/etc that would
indirectly reveal their existence to the player.
Returns:
setHidden
Hidden markets do not offer missions or otherwise participate in events/intel/etc that would
indirectly reveal their existence to the player. Hidden markets also do not participate in the economy.
isUseStockpilesForShortages
boolean isUseStockpilesForShortages ()
setUseStockpilesForShortages
void setUseStockpilesForShortages (boolean useStockpilesForShortages)
getShortageCounteringCost
float getShortageCounteringCost ()
isInHyperspace
boolean isInHyperspace ()
isConditionSuppressed
boolean isConditionSuppressed (String id)
suppressCondition
void suppressCondition (String id)
unsuppressCondition
void unsuppressCondition (String id)
getImmigrationIncentivesCost
float getImmigrationIncentivesCost ()
isInvalidMissionTarget
boolean isInvalidMissionTarget ()
setInvalidMissionTarget
void setInvalidMissionTarget (Boolean invalidMissionTarget)
setRetainSuppressedConditionsSetWhenEmpty
void setRetainSuppressedConditionsSetWhenEmpty (Boolean retainSuppressedConditionsSetWhenEmpty)
getGrossIncome
float getGrossIncome ()
hasFunctionalIndustry
boolean hasFunctionalIndustry (String id)
setCachedFaction
Transient. Do not use unless the market is a faked-up one.
Parameters:
faction
-