//Added by McShooterz: Load hostileFleets.xml
 private static void LoadHostileFleets()
 {
     if (File.Exists(string.Concat(Ship_Game.ResourceManager.WhichModPath, "/HostileFleets/HostileFleets.xml")))
     {
         Ship_Game.ResourceManager.HostileFleets = (HostileFleets)new XmlSerializer(typeof(HostileFleets)).Deserialize((Stream)new FileInfo(string.Concat(Ship_Game.ResourceManager.WhichModPath, "/HostileFleets/HostileFleets.xml")).OpenRead());
     }
     else
     {
         return;
     }
 }
 static ResourceManager()
 {
     Ship_Game.ResourceManager.TextureDict = new Dictionary<string, Texture2D>();
     Ship_Game.ResourceManager.weapon_serializer = new XmlSerializer(typeof(Weapon));
     Ship_Game.ResourceManager.serializer_shipdata = new XmlSerializer(typeof(ShipData));
     Ship_Game.ResourceManager.ShipsDict = new Dictionary<string, Ship>();
     Ship_Game.ResourceManager.RoidsModels = new Dictionary<int, Model>();
     Ship_Game.ResourceManager.JunkModels = new Dictionary<int, Model>();
     Ship_Game.ResourceManager.TechTree = new Dictionary<string, Technology>(StringComparer.InvariantCultureIgnoreCase);
     Ship_Game.ResourceManager.Encounters = new List<Encounter>();
     Ship_Game.ResourceManager.BuildingsDict = new Dictionary<string, Building>();
     Ship_Game.ResourceManager.GoodsDict = new Dictionary<string, Good>();
     Ship_Game.ResourceManager.WeaponsDict = new Dictionary<string, Weapon>();
     Ship_Game.ResourceManager.ShipModulesDict = new Dictionary<string, ShipModule>();
     Ship_Game.ResourceManager.ToolTips = new Dictionary<int, ToolTip>();
     Ship_Game.ResourceManager.ProjTextDict = new Dictionary<string, Texture2D>();
     Ship_Game.ResourceManager.ProjectileMeshDict = new Dictionary<string, ModelMesh>();
     Ship_Game.ResourceManager.ProjectileModelDict = new Dictionary<string, Model>();
     Ship_Game.ResourceManager.Initialized = false;
     Ship_Game.ResourceManager.WhichModPath = "";
     Ship_Game.ResourceManager.RandomItemsList = new List<RandomItem>();
     Ship_Game.ResourceManager.TroopsDict = new Dictionary<string, Troop>();
     Ship_Game.ResourceManager.DDDict = new Dictionary<string, DiplomacyDialog>();
     Ship_Game.ResourceManager.LanguageDict = new Dictionary<string, LocalizationFile>();
     Ship_Game.ResourceManager.LanguageFile = new LocalizationFile();
     Ship_Game.ResourceManager.ArtifactsDict = new Dictionary<string, Artifact>();
     Ship_Game.ResourceManager.EventsDict = new Dictionary<string, ExplorationEvent>();
     Ship_Game.ResourceManager.BigNebulas = new List<Texture2D>();
     Ship_Game.ResourceManager.MedNebulas = new List<Texture2D>();
     Ship_Game.ResourceManager.SmallNebulas = new List<Texture2D>();
     Ship_Game.ResourceManager.SmallStars = new List<Texture2D>();
     Ship_Game.ResourceManager.MediumStars = new List<Texture2D>();
     Ship_Game.ResourceManager.LargeStars = new List<Texture2D>();
     Ship_Game.ResourceManager.rt = new RacialTraits();
     Ship_Game.ResourceManager.Empires = new List<EmpireData>();
     Ship_Game.ResourceManager.HeaderSerializer = new XmlSerializer(typeof(HeaderData));
     Ship_Game.ResourceManager.ModSerializer = new XmlSerializer(typeof(ModInformation));
     Ship_Game.ResourceManager.ModelDict = new Dictionary<string, Model>();
     Ship_Game.ResourceManager.EconSerializer = new XmlSerializer(typeof(EconomicResearchStrategy));
     Ship_Game.ResourceManager.HullsDict = new Dictionary<string, ShipData>(StringComparer.InvariantCultureIgnoreCase);
     Ship_Game.ResourceManager.FlagTextures = new List<KeyValuePair<string, Texture2D>>();
     //Added by McShooterz
     Ship_Game.ResourceManager.HostileFleets = new HostileFleets();
     Ship_Game.ResourceManager.ShipNames = new ShipNames();
     Ship_Game.ResourceManager.SoundEffectDict = new Dictionary<string, SoundEffect>();
     Ship_Game.ResourceManager.AgentMissionData = new AgentMissionData();
     Ship_Game.ResourceManager.MainMenuShipList = new MainMenuShipList();
     Ship_Game.ResourceManager.ShipRoles = new Dictionary<string, ShipRole>();
     Ship_Game.ResourceManager.HullBonuses = new Dictionary<string, HullBonus>();
     Ship_Game.ResourceManager.PlanetaryEdicts = new Dictionary<string, PlanetEdict>();
     Ship_Game.ResourceManager.OffSet = 0;
 }
        public static void Reset()
        {
            try
            {
                DirectoryInfo di = new DirectoryInfo("Content/Mod Models");
                di.Delete(true);
                di.Create();
                di = new DirectoryInfo("Content/ModVideo");
                di.Delete(true);
                di.Create();
            }
            catch
            {

            }
            Ship_Game.ResourceManager.HullsDict.Clear();
            Ship_Game.ResourceManager.WeaponsDict.Clear();
            Ship_Game.ResourceManager.TroopsDict.Clear();
            Ship_Game.ResourceManager.BuildingsDict.Clear();
            Ship_Game.ResourceManager.ShipModulesDict.Clear();
            Ship_Game.ResourceManager.FlagTextures.Clear();
            Ship_Game.ResourceManager.TechTree.Clear();
            Ship_Game.ResourceManager.ArtifactsDict.Clear();
            Ship_Game.ResourceManager.ShipsDict.Clear();
            Ship_Game.ResourceManager.HostileFleets = new HostileFleets(); ;
            Ship_Game.ResourceManager.ShipNames = new ShipNames(); ;
            Ship_Game.ResourceManager.SoundEffectDict.Clear();

            Ship_Game.ResourceManager.TextureDict.Clear();
            Ship_Game.ResourceManager.ToolTips.Clear();
            Ship_Game.ResourceManager.GoodsDict.Clear();
            //Ship_Game.ResourceManager.LoadDialogs();
            Ship_Game.ResourceManager.Encounters.Clear();
            Ship_Game.ResourceManager.EventsDict.Clear();

            //Ship_Game.ResourceManager.LoadLanguage();

            Ship_Game.ResourceManager.RandomItemsList.Clear();
            Ship_Game.ResourceManager.ProjectileMeshDict.Clear();
            Ship_Game.ResourceManager.ProjTextDict.Clear();
            //if (Directory.Exists(string.Concat(Ship_Game.ResourceManager.WhichModPath, "/Mod Models")))
            //{
            //    Ship_Game.ResourceManager.DirectoryCopy(string.Concat(Ship_Game.ResourceManager.WhichModPath, "/Mod Models"), "Content/Mod Models", true);
            //}
            //if (Directory.Exists(string.Concat(Ship_Game.ResourceManager.WhichModPath, "/Video")))
            //{
            //    Ship_Game.ResourceManager.DirectoryCopy(string.Concat(Ship_Game.ResourceManager.WhichModPath, "/Video"), "Content/ModVideo", true);
            //}
        }