Class ColoredFloor

All Implemented Interfaces:
Comparable<Content>, Senseable

public class ColoredFloor extends Floor
  • Field Details

    • flagIgnoreDifferentColor

      public static final int flagIgnoreDifferentColor
      If the alpha value of the color is set to this value, different colors are ignored and no border is drawn.
      See Also:
    • flagSmoothBlend

      public static final int flagSmoothBlend
      If the alpha value of the color is set to this value, colors are interpolated across corners. This is essentially linear filtering for the whole "image".
      See Also:
    • defaultColor

      public arc.graphics.Color defaultColor
    • defaultColorRgba

      protected int defaultColorRgba
  • Constructor Details

    • ColoredFloor

      public ColoredFloor(String name)
  • Method Details

    • init

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

      public void buildEditorConfig(arc.scene.ui.layout.Table table)
      Description copied from class: Block
      Called to set up configuration UI in the editor. Block.editorConfigurable must be true. Config value should be assigned to lastConfig.
      Overrides:
      buildEditorConfig in class Block
    • showColorEdit

      public static void showColorEdit(arc.scene.ui.layout.Table t, Block block)
    • getConfig

      public Object getConfig(Tile tile)
      Overrides:
      getConfig in class Block
      Returns:
      the config value returned when this block is picked on a certain tile. This is only called for non-buildings.
    • drawBase

      public void drawBase(Tile tile)
      Overrides:
      drawBase in class Floor
    • drawOverlay

      public void drawOverlay(Tile tile)
      Overrides:
      drawOverlay in class Floor
    • floorChanged

      public void floorChanged(Tile tile)
      Description copied from class: Floor
      Called when this floor is set on the specified tile.
      Overrides:
      floorChanged in class Floor
    • placeEnded

      public void placeEnded(Tile tile, @Nullable mindustry.gen.Unit builder, int rotation, @Nullable Object config)
      Description copied from class: Block
      Called when building of this block ends.
      Overrides:
      placeEnded in class Block
    • drawPlanRegion

      public void drawPlanRegion(BuildPlan plan, arc.util.Eachable<BuildPlan> list)
      Overrides:
      drawPlanRegion in class Block
    • checkAutotileSame

      public boolean checkAutotileSame(Tile tile, @Nullable Tile other)
      Overrides:
      checkAutotileSame in class Floor
    • minimapColor

      public int minimapColor(Tile tile)
      Overrides:
      minimapColor in class Block
      Returns:
      a custom minimap color for this or 0 to use default colors.