public class PriceUpdate extends java.lang.Object implements CampaignEventPlugin.PriceUpdatePlugin
CampaignEventPlugin.PriceUpdatePlugin.PriceType| Constructor and Description |
|---|
PriceUpdate(CommodityOnMarketAPI commodity) |
| Modifier and Type | Method and Description |
|---|---|
float |
getAvailable() |
CommodityOnMarketAPI |
getCommodity() |
float |
getDemand() |
float |
getDemandPrice() |
MarketAPI |
getMarket() |
int |
getRoundedPriceForDisplay() |
int |
getRoundedPriceForDisplay(float priceFlat,
float pricePercent)
Only call this method when the bonus you want to ignore is not already applied.
|
float |
getSupplyPrice() |
long |
getTimestamp() |
CampaignEventPlugin.PriceUpdatePlugin.PriceType |
getType() |
boolean |
isSignificant()
Checks whether supply/demand is non-trivial.
|
boolean |
isSignificant(float priceFlat,
float pricePercent)
Checks whether supply/demand is non-trivial.
|
void |
updatePrices(float stockpileMult) |
void |
updateType() |
void |
updateType(float priceFlat,
float pricePercent)
Only call this method when the bonus you want to ignore is not already applied.
|
public PriceUpdate(CommodityOnMarketAPI commodity)
public void updatePrices(float stockpileMult)
public int getRoundedPriceForDisplay()
getRoundedPriceForDisplay in interface CampaignEventPlugin.PriceUpdatePluginpublic int getRoundedPriceForDisplay(float priceFlat, float pricePercent)
priceFlat - pricePercent - public float getDemand()
getDemand in interface CampaignEventPlugin.PriceUpdatePluginpublic float getAvailable()
getAvailable in interface CampaignEventPlugin.PriceUpdatePluginpublic void updateType()
updateType in interface CampaignEventPlugin.PriceUpdatePluginpublic void updateType(float priceFlat, float pricePercent)
priceFlat - pricePercent - public long getTimestamp()
getTimestamp in interface CampaignEventPlugin.PriceUpdatePluginpublic boolean isSignificant()
public boolean isSignificant(float priceFlat, float pricePercent)
priceMult - public MarketAPI getMarket()
getMarket in interface CampaignEventPlugin.PriceUpdatePluginpublic CommodityOnMarketAPI getCommodity()
getCommodity in interface CampaignEventPlugin.PriceUpdatePluginpublic float getSupplyPrice()
getSupplyPrice in interface CampaignEventPlugin.PriceUpdatePluginpublic float getDemandPrice()
getDemandPrice in interface CampaignEventPlugin.PriceUpdatePluginpublic CampaignEventPlugin.PriceUpdatePlugin.PriceType getType()
getType in interface CampaignEventPlugin.PriceUpdatePlugin