public class DecivTracker extends java.lang.Object implements EveryFrameScript
Modifier and Type | Class and Description |
---|---|
static class |
DecivTracker.MarketDecivData |
Modifier and Type | Field and Description |
---|---|
protected IntervalUtil |
checker |
protected java.util.LinkedHashMap<MarketAPI,DecivTracker.MarketDecivData> |
decivData |
static java.lang.String |
KEY |
static java.lang.String |
NO_DECIV_KEY |
protected java.util.Random |
random |
protected IntervalUtil |
sampler |
protected TimeoutTracker<java.lang.String> |
sentWarning |
Constructor and Description |
---|
DecivTracker() |
Modifier and Type | Method and Description |
---|---|
void |
advance(float amount)
Use SectorAPI.getClock() to convert to campaign days.
|
protected void |
checkDeciv() |
protected boolean |
checkDeciv(MarketAPI market) |
static void |
decivilize(MarketAPI market,
boolean fullDestroy) |
static void |
decivilize(MarketAPI market,
boolean fullDestroy,
boolean withIntel) |
DecivTracker.MarketDecivData |
getDataFor(MarketAPI market) |
static DecivTracker |
getInstance() |
static int |
getMaxMonths() |
static float |
getMinFraction() |
static int |
getMinStreak() |
static float |
getProbPerMonth() |
boolean |
isDone() |
protected java.lang.Object |
readResolve() |
static void |
removeColony(MarketAPI market,
boolean withRuins) |
boolean |
runWhilePaused() |
static void |
sendWarning(MarketAPI market) |
protected void |
updateSamples() |
public static final java.lang.String KEY
public static final java.lang.String NO_DECIV_KEY
protected java.util.LinkedHashMap<MarketAPI,DecivTracker.MarketDecivData> decivData
protected IntervalUtil sampler
protected IntervalUtil checker
protected TimeoutTracker<java.lang.String> sentWarning
protected java.util.Random random
public static DecivTracker getInstance()
protected java.lang.Object readResolve()
public void advance(float amount)
EveryFrameScript
advance
in interface EveryFrameScript
amount
- seconds elapsed during the last frame.public DecivTracker.MarketDecivData getDataFor(MarketAPI market)
public static int getMaxMonths()
public static int getMinStreak()
public static float getProbPerMonth()
public static float getMinFraction()
protected void updateSamples()
protected void checkDeciv()
protected boolean checkDeciv(MarketAPI market)
public static void decivilize(MarketAPI market, boolean fullDestroy)
public static void decivilize(MarketAPI market, boolean fullDestroy, boolean withIntel)
public static void removeColony(MarketAPI market, boolean withRuins)
public static void sendWarning(MarketAPI market)
public boolean isDone()
isDone
in interface EveryFrameScript
public boolean runWhilePaused()
runWhilePaused
in interface EveryFrameScript
Copyright © 2013 Fractal Softworks, LLC. All Rights Reserved.