public class RecentUnrest extends BaseMarketConditionPlugin
| Modifier and Type | Field and Description |
|---|---|
static float |
DECREASE_DAYS |
protected int |
penalty |
protected TimeoutTracker<java.lang.String> |
reasons |
protected float |
untilDecrease |
condition, market| Constructor and Description |
|---|
RecentUnrest() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int stability,
java.lang.String reason) |
void |
advance(float amount) |
void |
apply(java.lang.String id) |
void |
counter(int points,
java.lang.String reason) |
void |
createTooltip(TooltipMakerAPI tooltip,
boolean expanded) |
protected void |
createTooltipAfterDescription(TooltipMakerAPI tooltip,
boolean expanded) |
static RecentUnrest |
get(MarketAPI market) |
static RecentUnrest |
get(MarketAPI market,
boolean addIfNeeded) |
int |
getPenalty() |
static int |
getPenalty(MarketAPI market) |
boolean |
isTransient()
Return false if the plugin has data that needs to be in the savefile.
|
void |
setPenalty(int penalty) |
void |
unapply(java.lang.String id) |
addTokensToList, getHighlightColors, getHighlights, getHighStabilityBonusMult, getHighStabilityPenaltyMult, getIconName, getLowStabilityBonusMult, getLowStabilityPenaltyMult, getModId, getName, getRelatedCommodities, getTokenReplacements, getTooltipWidth, hasCustomTooltip, init, isPlanetary, isTooltipExpandable, main, runWhilePaused, setParam, showIconpublic static float DECREASE_DAYS
protected int penalty
protected float untilDecrease
protected TimeoutTracker<java.lang.String> reasons
public RecentUnrest()
public static RecentUnrest get(MarketAPI market)
public static RecentUnrest get(MarketAPI market, boolean addIfNeeded)
public static int getPenalty(MarketAPI market)
public int getPenalty()
public void apply(java.lang.String id)
apply in interface MarketConditionPluginapply in class BaseMarketConditionPluginpublic void unapply(java.lang.String id)
unapply in interface MarketConditionPluginunapply in class BaseMarketConditionPluginpublic void add(int stability, java.lang.String reason)
public void counter(int points, java.lang.String reason)
public void advance(float amount)
advance in interface MarketConditionPluginadvance in class BaseMarketConditionPluginpublic void createTooltip(TooltipMakerAPI tooltip, boolean expanded)
createTooltip in interface MarketConditionPlugincreateTooltip in class BaseMarketConditionPluginprotected void createTooltipAfterDescription(TooltipMakerAPI tooltip, boolean expanded)
createTooltipAfterDescription in class BaseMarketConditionPluginpublic boolean isTransient()
MarketConditionPluginisTransient in interface MarketConditionPluginisTransient in class BaseMarketConditionPluginpublic void setPenalty(int penalty)