Class FreeColTcFile

  • All Implemented Interfaces:
    ObjectWithId

    public class FreeColTcFile
    extends FreeColModFile
    A Total Conversion (TC). Rules are TCs.
    • Field Detail

      • logger

        private static final java.util.logging.Logger logger
      • allTCs

        private static final java.util.Map<java.lang.String,​FreeColTcFile> allTCs
        A cache of all the TCs.
    • Constructor Detail

      • FreeColTcFile

        public FreeColTcFile​(java.io.File file)
                      throws java.io.IOException
        Opens the given file for reading.
        Parameters:
        file - The file to load.
        Throws:
        java.io.IOException - if thrown while opening the file.
    • Method Detail

      • getResourceMapping

        public ResourceMapping getResourceMapping()
        Creates a ResourceMapping from the available resource files.
        Overrides:
        getResourceMapping in class FreeColDataFile
        Returns:
        A ResourceMapping or null there is no resource mapping file.
      • getRulesList

        public static java.util.List<FreeColTcFile> getRulesList()
        Get all the standard rule sets.
        Returns:
        A list of FreeColTcFiles holding the rule sets.
      • loadTCs

        public static void loadTCs()
        Require all TCs to be loaded.
      • getFreeColTcFile

        public static FreeColTcFile getFreeColTcFile​(java.lang.String id)
        Get a TC by id.
        Parameters:
        id - The TC file identifier to look for.
        Returns:
        The FreeColTcFile found, or null if none present.