Class PowerNode

All Implemented Interfaces:
Comparable<Content>, Senseable
Direct Known Subclasses:
LongPowerNode, PowerSource

public class PowerNode extends PowerBlock
  • Field Details

    • otherReq

      protected static BuildPlan otherReq
    • returnInt

      protected static int returnInt
    • graphs

      protected static final ObjectSet<PowerGraph> graphs
    • maxRange

      protected static float maxRange
      The maximum range of all power nodes on the map
    • laser

      public TextureRegion laser
    • laserEnd

      public TextureRegion laserEnd
    • laserRange

      public float laserRange
    • maxNodes

      public int maxNodes
    • drawRange

      public boolean drawRange
    • laserScale

      public float laserScale
    • laserColor1

      public Color laserColor1
    • laserColor2

      public Color laserColor2
  • Constructor Details

    • PowerNode

      public PowerNode(String name)
  • Method Details

    • setBars

      public void setBars()
      Overrides:
      setBars in class Block
    • makePowerBalance

      public static Func<mindustry.gen.Building,Bar> makePowerBalance()
    • makeBatteryBalance

      public static Func<mindustry.gen.Building,Bar> makeBatteryBalance()
    • setStats

      public void setStats()
      Description copied from class: UnlockableContent
      Initializes stats on demand. Should only be called once. Only called before something is displayed.
      Overrides:
      setStats in class Block
    • init

      public void init()
      Description copied from class: Block
      Called after all blocks are created.
      Overrides:
      init in class Block
    • drawPlace

      public void drawPlace(int x, int y, int rotation, boolean valid)
      Description copied from class: Block
      Drawn when you are placing a block.
      Overrides:
      drawPlace in class Block
    • changePlacementPath

      public void changePlacementPath(Seq<Point2> points, int rotation)
      Description copied from class: Block
      Mutates the given list of points used during line placement.
      Overrides:
      changePlacementPath in class Block
    • setupColor

      protected void setupColor(float satisfaction)
    • drawLaser

      public void drawLaser(float x1, float y1, float x2, float y2, int size1, int size2)
    • overlaps

      protected boolean overlaps(float srcx, float srcy, Tile other, Block otherBlock, float range)
    • overlaps

      protected boolean overlaps(float srcx, float srcy, Tile other, float range)
    • overlaps

      protected boolean overlaps(mindustry.gen.Building src, mindustry.gen.Building other, float range)
    • overlaps

      protected boolean overlaps(Tile src, Tile other, float range)
    • overlaps

      public boolean overlaps(@Nullable Tile src, @Nullable Tile other)
    • getPotentialLinks

      protected void getPotentialLinks(Tile tile, Team team, Cons<mindustry.gen.Building> others)
    • getNodeLinks

      public static void getNodeLinks(Tile tile, Block block, Team team, Cons<mindustry.gen.Building> others)
      Iterates through linked nodes of a block at a tile. All returned buildings are power nodes.
    • drawPlanConfigTop

      public void drawPlanConfigTop(BuildPlan plan, Eachable<BuildPlan> list)
      Overrides:
      drawPlanConfigTop in class Block
    • linkValid

      public boolean linkValid(mindustry.gen.Building tile, mindustry.gen.Building link)
    • linkValid

      public boolean linkValid(mindustry.gen.Building tile, mindustry.gen.Building link, boolean checkMaxNodes)
    • insulated

      public static boolean insulated(Tile tile, Tile other)
    • insulated

      public static boolean insulated(mindustry.gen.Building tile, mindustry.gen.Building other)
    • insulated

      public static boolean insulated(int x, int y, int x2, int y2)