Enum Class IlluminationLevel

java.lang.Object
java.lang.Enum<IlluminationLevel>
megamek.common.planetaryConditions.IlluminationLevel
All Implemented Interfaces:
Serializable, Comparable<IlluminationLevel>, Constable

public enum IlluminationLevel extends Enum<IlluminationLevel>
  • Enum Constant Details

  • Method Details

    • values

      public static IlluminationLevel[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static IlluminationLevel valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • isNone

      public boolean isNone()
    • isFire

      public boolean isFire()
    • isFlare

      public boolean isFlare()
    • isSearchlight

      public boolean isSearchlight()
    • getIndicator

      public String getIndicator()
    • determineIlluminationLevel

      public static IlluminationLevel determineIlluminationLevel(Game game, Coords coords)
    • determineIlluminationLevel

      public static IlluminationLevel determineIlluminationLevel(Game game, int boardId, Coords coords)
      Returns:
      the level of illumination for a given coords. Different light sources affect how much the nighttime penalties are reduced. Note: this method should be used for determining if a Coords/Hex is illuminated, not Game::getIlluminatedPositions, as that just returns the hexes that are effected by searchlights, whereas this one considers searchlights as well as other light sources.