Beispiel #1
0
        protected override BINFile LoadScripts()
        {
            BINFileController c = (BINFileController)
                                  AutoLoad(Settings.GetString("Files", "Scripts"));

            if (c == null)
            {
                return(null);
            }

            return(c.BIN);
        }
Beispiel #2
0
        public FileController Get(string fileName)
        {
            fileName = GetAbsoluteFileName(fileName);

            FileController c = Find(fileName);

            if (c != null)
            {
                // Already in the system.
                return(c);
            }

            FileInfo info = new FileInfo(fileName);

            string ext = info.Extension.ToUpper();

            if (ext == ".BIG")
            {
                c = new BIGFileController(this, fileName);
            }
            else if (ext == ".BIN")
            {
                if (info.Name.ToUpper() == "NAMES.BIN")
                {
                    c = new NamesBINController(this, fileName);
                }
                else
                {
                    c = new BINFileController(this, fileName);
                }
            }
            else if (ext == ".STB")
            {
                c = new BBBFileController(
                    this, new FableMod.STB.STBFile(), fileName);
            }
            else if (ext == ".WAD")
            {
                c = new BBBFileController(
                    this, new FableMod.BBB.BBBFile(), fileName);
            }
            else if (ext == ".WLD")
            {
                c = new WLDFileController(this, fileName);
            }

            if (c != null)
            {
                myFiles.Add(c);
            }

            return(c);
        }