Class TerrainRecruitLoader.NullTerrainRecruitLoader

    • Field Detail

      • LOGGER

        private static final java.util.logging.Logger LOGGER
      • showNullWarning

        private final boolean showNullWarning
    • Constructor Detail

      • NullTerrainRecruitLoader

        public NullTerrainRecruitLoader​(boolean showNullWarning)
        Create an do-basically-Nothing TerrainRecruitLoader that can be used as TerrainInitialiser e.g. during Unit Testing. In real games normally a real TerrainRecruitLoader should be used, accessed via the IVariantInitializer interface. But the variable to hold the trl should be initialized with something to avoid NPEs... This one here serves that purpose, but it will then show warnings when querying values from it.
        Parameters:
        showNullWarning - Set to true if you really want to use the defaults and not get warnings about querying them. Intended for unit testing setup.
      • NullTerrainRecruitLoader

        public NullTerrainRecruitLoader()