Exemple #1
0
        public static void updateRegionVersion(string name, string version)
        {
            regionList[name] = version;
            RegionSave newSave = new RegionSave()
            {
                version = version
            };

            Storage.SerializeObject(newSave, "data/" + name + ".xml");
        }
Exemple #2
0
 public static void buildAll()
 {
     foreach (Region rg in Enum.GetValues(typeof(Region)))
     {
         if (!regionList.ContainsKey(rg.ToString()))
         {
             if (!File.Exists("data/" + rg.ToString() + ".xml"))
             {
                 RegionSave newSave = new RegionSave()
                 {
                     version = "6.8.16_05_01_19_57"
                 };
                 Storage.SerializeObject(newSave, "data/" + rg.ToString() + ".xml");
                 regionList.Add(rg.ToString(), newSave.version);
             }
             else
             {
                 RegionSave loaded = Storage.DeSerializeObject <RegionSave>("data/" + rg.ToString() + ".xml");
                 regionList.Add(rg.ToString(), loaded.version);
             }
         }
     }
 }