Class TechTree.TechNode

java.lang.Object
mindustry.content.TechTree.TechNode
Enclosing class:
TechTree

public static class TechTree.TechNode extends Object
  • Field Details

    • depth

      public int depth
      Depth in tech tree.
    • icon

      @Nullable public Drawable icon
      Icon displayed in tech tree selector.
    • name

      @Nullable public String name
      Name for root node - used in tech tree selector.
    • requiresUnlock

      public boolean requiresUnlock
      For roots only. If true, this needs to be unlocked before it is selectable in the research dialog. Does not apply when you are on the planet itself.
    • parent

      Requirement node.
    • researchCostMultipliers

      @Nullable public ObjectFloatMap<Item> researchCostMultipliers
      Multipliers for research costs on a per-item basis. Inherits from parent.
    • content

      public UnlockableContent content
      Content to be researched.
    • requirements

      public ItemStack[] requirements
      Item requirements for this content.
    • finishedRequirements

      public ItemStack[] finishedRequirements
      Requirements that have been fulfilled. Always the same length as the requirement array.
    • objectives

      public Seq<Objectives.Objective> objectives
      Extra objectives needed to research this.
    • children

      public final Seq<TechTree.TechNode> children
      Nodes that depend on this node.
    • planet

      @Nullable public Planet planet
      Planet associated with this tech node. Null to auto-detect, or use Serpulo if no associated planet is found.
  • Constructor Details

  • Method Details

    • each

      public void each(Cons<TechTree.TechNode> consumer)
      Recursively iterates through everything that is a child of this node. Includes itself.
    • icon

      public Drawable icon()
    • localizedName

      public String localizedName()
    • setupRequirements

      public void setupRequirements(ItemStack[] requirements)
    • reset

      public void reset()
      Resets finished requirements and saves.
    • remove

      public void remove()
      Removes this node from the tech tree.
    • save

      public void save()
      Flushes research progress to settings.