public static void DowngradeOnce(this MapCameras mapCameras)
 {
     if (mapCameras.UseNewFormat)
     {
         mapCameras.UseNewFormat = false;
     }
     else
     {
         throw new NotSupportedException();
     }
 }
        public static bool TryDowngrade(this MapCameras mapCameras, GamePatch targetPatch)
        {
            try
            {
                while (mapCameras.GetMinimumPatch() > targetPatch)
                {
                    mapCameras.DowngradeOnce();
                }

                return(true);
            }
            catch (NotSupportedException)
            {
                return(false);
            }
            catch
            {
                throw;
            }
        }
 public static GamePatch GetMinimumPatch(this MapCameras mapCameras)
 {
     return(mapCameras.UseNewFormat ? GamePatch.v1_31_0 : GamePatch.v1_00);
 }
Beispiel #4
0
 public static void Write(this BinaryWriter writer, MapCameras mapCameras) => mapCameras.WriteTo(writer);