Example #1
0
        public Mod(string Name, string Description, string Author, string Source, ModCategories Category, string LastValidGameVersion, string MainFile, List <string> ExtraCommands = null)
        {
            this.Name                 = Name;
            this.Description          = Description;
            this.Author               = Author;
            this.Source               = Source;
            this.Category             = Category;
            this.LastValidGameVersion = LastValidGameVersion;
            this.MainFile             = MainFile;

            if (ExtraCommands == null)
            {
                this.ExtraCommands = new List <string>();
            }
            else
            {
                this.ExtraCommands = ExtraCommands;
            }

            Installed = MainWindowViewModel.settingsVM.InstalledMods.Contains(Name);
        }
Example #2
0
        public Mod(string n, string fileN, bool active, bool installed, string source, string modDir, string dlDir, GameListEnum gameId, ModCategories category, string fileId, int priority,
                   string version = Defined.DEFAULTMODVERSION, string id = Defined.DEFAULTMODID, string author = Defined.DEFAULTMODAUTHOR, string srcUri = Defined.DEFAULTSOURCEURI,
                   bool isOn      = false)
        {
            Name              = n;
            IsOnline          = isOn;
            ModFileName       = fileN;
            Active            = active;
            Installed         = installed;
            SourceArchive     = source;
            ModDirectory      = modDir;
            DownloadDirectory = dlDir;
            GameId            = gameId;
            ModCategory       = category;
            FileId            = fileId;
            Version           = version;
            Id            = id;
            Author        = author;
            FullSourceUri = srcUri;
            Priority      = priority;

            FileTree = BinaryNode.GetDirectoryTree(ModDirectory);
        }