Class BasicLevelQuestConfig

java.lang.Object
com.prineside.tdi2.BasicLevelQuestConfig

public class BasicLevelQuestConfig extends Object
  • Field Details

    • id

      public String id
    • scripted

      public boolean scripted
    • statisticsType

      @Null public StatisticsType statisticsType
      Can be null if quest is scripted
    • requiredValue

      public long requiredValue
    • level

      public BasicLevel level
    • prizes

      public Array<ItemStack> prizes
    • scriptedTitle

      public String 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

      public int getExtraDustInEndless(GameValueProvider gvp)
    • toJson

      public void toJson(Json json)
      writeObjectStart()
    • fromJson

      public static BasicLevelQuestConfig fromJson(JsonValue jsonValue, BasicLevel level)
    • createIngameQuest

      @Null public QuestSystem.Quest createIngameQuest(GameSystemProvider systemProvider)
      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

      public String getId()
    • isScripted

      public boolean isScripted()
    • getCurrentValue

      public double getCurrentValue(GameValueManager.GameValuesSnapshot gv)
      Returns:
      current quest value outside of the run (for menus). If value is needed during the run, use StatisticsSystem.
    • getRequiredValue

      public long getRequiredValue(GameValueManager.GameValuesSnapshot gv)
    • getPrizes

    • formatValueForUi

      public CharSequence formatValueForUi(double value)
    • 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

      public CharSequence getTitle(boolean colored, boolean appendDuringOneGame)