Class RegionType

  • All Implemented Interfaces:
    java.lang.Cloneable, java.lang.Comparable<java.lang.Object>, Identifiable, Named, Unique

    public class RegionType
    extends UnitContainerType
    Stores rule relevant information about a region type.
    • Field Detail

      • unknown

        public static RegionType unknown
        A static instance of the unknown region type
      • theVoid

        public static RegionType theVoid
        A static instance of the unknown region type
      • wrap

        public static RegionType wrap
        A static instance of the wrapping region type
    • Constructor Detail

      • RegionType

        public RegionType​(StringID id)
        Creates a new RegionType object.
    • Method Detail

      • setInhabitants

        public void setInhabitants​(int i)
        Sets the maximum number of peasant workers.
      • setInhabitants

        public void setInhabitants​(java.lang.String i)
        helper method for xml reader
      • getInhabitants

        public int getInhabitants()
        Returns the number of max inhabitants in this region type
      • getRoadStones

        public int getRoadStones()
        DOCUMENT ME!
      • getRoadSupportBuilding

        public BuildingType getRoadSupportBuilding()
        DOCUMENT ME!
      • addRoadResource

        public void addRoadResource​(Resource r)
        Adds a resource need for road building.
      • getRoadResources

        public java.util.List<Resource> getRoadResources()
        Gets a List of needed Resources for road building.
      • isOcean

        public boolean isOcean()
        Returns true if the unit is an ocean region.
      • setIsOcean

        public void setIsOcean​(boolean isOcean)
        Sets the ocean property.
      • isLand

        public boolean isLand()
        Returns true if the unit is a land region (note that this is not just !isOcean()).
      • setLand

        public void setLand​(boolean land)
        Sets the land property.
      • isAstralVisible

        public boolean isAstralVisible()
        Returns true if this RegionType is visible from the astral space.
        Returns:
        true if this RegionType is visible from the astral space
      • setAstralVisible

        public void setAstralVisible​(boolean isAstralVisible)
        If argument is true, this RegionType is marked as being visible from the astral space.
        Parameters:
        isAstralVisible -
      • getPeasantWage

        public int getPeasantWage()
        Returns the peasantWage value for this region type. Defaults to 11.
        Returns:
        Returns peasantWage.
      • setPeasantWage

        public void setPeasantWage​(int peasantWage)
        Sets the peasantWage value for this region type.
        Parameters:
        peasantWage - The value for peasantWage.