Package com.prineside.tdi2
Class BasicLevelQuestConfig
java.lang.Object
com.prineside.tdi2.BasicLevelQuestConfig
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanlongbooleanCan be null if quest is scripted -
Constructor Summary
ConstructorsConstructorDescriptionBasicLevelQuestConfig(String id, boolean scripted, StatisticsType statisticsType, long requiredValue, boolean duringGame, BasicLevel level) -
Method Summary
Modifier and TypeMethodDescriptioncreateIngameQuest(GameSystemProvider systemProvider) Creates a quest to be added to the QuestSystem at the start of the run.formatValueForUi(double value) formatValueForUiWithRequiredValue(double value, double requiredValue, boolean colored) static BasicLevelQuestConfigfromJson(JsonValue jsonValue, BasicLevel level) doubleintgetId()longlonggetTitle(boolean colored, boolean appendDuringOneGame) booleanCached!booleanbooleanvoidsetCompleted(boolean val) voidsetSavedValue(long v) voidwriteObjectStart()boolean
-
Field Details
-
id
-
scripted
public boolean scripted -
statisticsType
Can be null if quest is scripted -
requiredValue
public long requiredValue -
level
-
prizes
-
scriptedTitle
-
duringGame
public boolean duringGame
-
-
Constructor Details
-
BasicLevelQuestConfig
public BasicLevelQuestConfig(String id, boolean scripted, @Null StatisticsType statisticsType, long requiredValue, boolean duringGame, BasicLevel level) - Parameters:
statisticsType- may be null if quest is scripted
-
-
Method Details
-
getSavedValue
public long getSavedValue() -
setSavedValue
public void setSavedValue(long v) -
getExtraDustInEndless
-
toJson
writeObjectStart() -
fromJson
-
createIngameQuest
Creates a quest to be added to the QuestSystem at the start of the run.- Returns:
- quest or null if it has to be ignored (for example, SCRIPTED, which is added manually)
-
getId
-
isScripted
public boolean isScripted() -
getCurrentValue
- Returns:
- current quest value outside of the run (for menus). If value is needed during the run, use StatisticsSystem.
-
getRequiredValue
-
getPrizes
-
formatValueForUi
-
formatValueForUiWithRequiredValue
public CharSequence formatValueForUiWithRequiredValue(double value, double requiredValue, boolean colored) -
isDuringGame
public boolean isDuringGame() -
isCompleted
public boolean isCompleted()Cached! -
wasEverCompleted
public boolean wasEverCompleted() -
setCompleted
public void setCompleted(boolean val) -
getTitle
-