public List <DataEntities.ModFile> GetModFiles() { using (var modHandlerBLL = new BusinessImplementation.ModHandler(this.Game)) { return(modHandlerBLL.GetAllMods()); } }
public void UpdateAllFiles() { bool hasSaveFile = GameFileHandler.DoesSaveExist(); var gameHandlerBLL = new BusinessImplementation.GameFileHandler(this.Game); var modHandlerBLL = new BusinessImplementation.ModHandler(this.Game); this.Game = gameHandlerBLL.GetGame(); //Create all necessary files gameHandlerBLL.CreateGameFolder(); modHandlerBLL.CreateModsFolder(); CreateDefaultFiles(); //Get File Lists var modsFileList = modHandlerBLL.LoadMods(); var gameFileList = gameHandlerBLL.GetGameFileLists(); _FileLists.AddRange(modsFileList); _FileLists.AddRange(gameFileList); //Save first time stuff in game if (hasSaveFile == false) { using (var generateRandomBLL = new BusinessImplementation.GenerateRandomObject(this.Game)) { this.Game.Races = generateRandomBLL.CreateAllRaces(); this.Game.Player = generateRandomBLL.GetPlayer(); } //Testing this.Game.Player.Location = new DataEntities.Location() { Name = "Morrowind", Destinations = new List <DataEntities.Destination>() { new DataEntities.Destination() { Name = "bar" }, new DataEntities.Destination() { Name = "fat man" } } }; SaveGameFile(Game); } }