Esempio n. 1
0
 private SaveHandler()
 {
     if(instance != null)
     {
         Debug.Log("There is already an instance of SaveHandler!");
         return;
     }
     instance = this;
 }
    public ClientServiceProtocol(String name,
      String path,
      LoadHandler loadHandler,
      SaveHandler saveHandler,
      SaveAsHandler saveAsHandler,
      Graphic graphic,
      Model model,
      ChangePermissionsHandler clientChangePermissions, 
      GetPropertyValuesHandler getPropertyValuesHandler, 
      GetSubTagsHandler getSubTagsHandler,
      ChangeHandler changeHandler,
      RequestPortInfoHandler requestPortInfoHandler,
      PropertyListHandler propertyListHandler, 
      LogMessageHandler logMessageHandler,
      AnnounceHandler announceHandler, 
      RenounceHandler renounceHandler)
    {
      this.Name = name;
      this.Path = path;

      this.graphic = graphic;
      this.model = model;

      this.loadHandler = loadHandler;
      this.saveHandler = saveHandler;
      this.saveAsHandler = saveAsHandler;

      this.clientChangePermissions = clientChangePermissions;

      this.getPropertyValuesHandler = getPropertyValuesHandler;
      this.getSubTagsHandler = getSubTagsHandler;

      this.changeHandler = changeHandler;

      this.requestPortInfoHandler = requestPortInfoHandler;

      this.propertyListHandler = propertyListHandler;

      this.logMessageHandler = logMessageHandler;

      this.announceHandler = announceHandler;
      this.renounceHandler = renounceHandler;
    }
Esempio n. 3
0
        public override void Entry(IModHelper helper)
        {
            _helper  = helper;
            _monitor = Monitor;

            harmonyFix();
            FormatManager.Instance.RegisterMapFormat(new NewTiledTmxFormat());

            SaveHandler.BeforeRebuilding += (a, b) => CustomObjectData.collection.useAll(k => k.Value.sdvId = k.Value.getNewSDVId());
            initializeResponders();
            startResponder();
            registerConsoleCommands();
            CustomTVMod.load();
            PyLua.init();
            registerTileActions();
            SaveHandler.setUpEventHandlers();
            CustomObjectData.CODSyncer.start();
            ContentSync.ContentSyncHandler.initialize();
            this.Helper.Events.Player.Warped                   += Player_Warped;
            this.Helper.Events.GameLoop.DayStarted             += OnDayStarted;
            this.Helper.Events.Multiplayer.PeerContextReceived += (s, e) =>
            {
                if (Game1.IsMasterGame && Game1.IsServer && CustomObjectData.collection.Values.Count > 0)
                {
                    List <CODSync> list = new List <CODSync>();
                    foreach (CustomObjectData data in CustomObjectData.collection.Values)
                    {
                        list.Add(new CODSync(data.id, data.sdvId));
                    }

                    PyNet.sendDataToFarmer(CustomObjectData.CODSyncerName, new CODSyncMessage(list), e.Peer.PlayerID, SerializationType.JSON);
                }
            };

            Helper.Events.Multiplayer.ModMessageReceived += PyNet.Multiplayer_ModMessageReceived;
        }
Esempio n. 4
0
 internal static void Prefix()
 {
     SaveHandler.Replace();
 }
Esempio n. 5
0
 internal static void Postfix()
 {
     SaveHandler.Rebuild();
     TimeEvents.TimeOfDayChanged += DelayedRebuild;
 }
Esempio n. 6
0
        public static void Prefix_drawHairAndAccesories(FarmerRenderer __instance, Farmer who, int facingDirection, Vector2 position, Vector2 origin, float scale, int currentFrame, float rotation, Color overrideColor)
        {
            if (Game1.activeClickableMenu is TitleMenu && who.hat.Value is Hat h && !(h is CustomHat) && SaveHandler.getAdditionalSaveData(h) is Dictionary <string, string> savdata)
            {
                if (savdata.ContainsKey("blueprint") && savdata["blueprint"] is string bid && CustomShirtsMod.hats.Find(bp => bp.fullid == bid) is HatBlueprint hbp)
                {
                    who.hat.Value = new CustomHat(hbp);
                }
            }

            if (who.hat.Value is CustomHat c)
            {
                if (c.texture == null && CustomShirtsMod.syncedHats.ContainsKey(c.hatId + "." + who.UniqueMultiplayerID))
                {
                    c.texture = CustomShirtsMod.syncedHats[c.hatId + "." + who.UniqueMultiplayerID];
                }

                if (c.texture == null && !requestedHatSyncs.Contains(c.hatId + "." + who.UniqueMultiplayerID))
                {
                    requestedHatSyncs.Add(c.hatId + "." + who.UniqueMultiplayerID);
                    try
                    {
                        Task.Run(async() =>
                        {
                            await PyNet.sendRequestToFarmer <HatSync>(CustomShirtsMod.HatSyncerRequestName, c.hatId, who, (hs) =>
                            {
                                requestedHatSyncs.Remove(c.hatId + "." + who.UniqueMultiplayerID);

                                if (hs == null || hs.Texture == null)
                                {
                                    return;
                                }

                                if (CustomShirtsMod.syncedHats.ContainsKey(hs.SyncId))
                                {
                                    CustomShirtsMod.syncedHats.Remove(hs.SyncId);
                                }

                                CustomShirtsMod.syncedHats.Add(hs.SyncId, hs.Texture.getTexture());
                            }, SerializationType.PLAIN, 1000);
                        });
                    }
                    catch (Exception e)
                    {
                        CustomShirtsMod._monitor.Log(e.Message + ":" + e.StackTrace);
                    }
                }

                if (c.texture != null)
                {
                    int direction = who.FacingDirection;
                    FarmerRenderer.hatsTexture = c.texture;
                    if (direction == 0)
                    {
                        direction = 3;
                    }
                    else if (direction == 2)
                    {
                        direction = 0;
                    }
                    else if (direction == 3)
                    {
                        direction = 2;
                    }

                    if (Game1.activeClickableMenu is TitleMenu || Game1.activeClickableMenu is GameMenu)
                    {
                        direction = 0;
                    }

                    if (c.texture is ScaledTexture2D sct)
                    {
                        sct.ForcedSourceRectangle = new Rectangle(0, (int)(direction * 20 * sct.Scale), (int)(20 * sct.Scale), (int)(20 * sct.Scale));
                    }
                }
            }
            else
            {
                FarmerRenderer.hatsTexture = CustomShirtsMod.vanillaHats;
            }

            bool savedShirt = CustomShirtsMod.playerShirts.ContainsKey(who.UniqueMultiplayerID) && CustomShirtsMod.playerBaseShirts.ContainsKey(who.UniqueMultiplayerID) && CustomShirtsMod.playerBaseShirts[who.UniqueMultiplayerID] != -9999;

            if (savedShirt && (Game1.activeClickableMenu is CharacterCustomization || menuIsCC()))
            {
                savedShirt = false;
                CustomShirtsMod.playerShirts.Remove(who.UniqueMultiplayerID);
                CustomShirtsMod.playerBaseShirts.Remove(who.UniqueMultiplayerID);
                who.shirt.Value = ((CustomShirtsMod.shirts.FindIndex(fj => fj.fullid == CustomShirtsMod.config.ShirtId) + 1) * -1);
            }

            if (who.shirt.Value >= 0 && !savedShirt)
            {
                FarmerRenderer.shirtsTexture = CustomShirtsMod.vanillaShirts;
                return;
            }
            else
            {
                try
                {
                    if (!savedShirt && who == Game1.player)
                    {
                        FarmerRenderer.shirtsTexture = CustomShirtsMod.shirts[(who.shirt.Value * -1) - 1].texture2d;
                    }
                    else
                    {
                        if (CustomShirtsMod.playerShirts[who.UniqueMultiplayerID] == null)
                        {
                            return;
                        }
                        FarmerRenderer.shirtsTexture = CustomShirtsMod.playerShirts[who.UniqueMultiplayerID];
                    }
                }
                catch { }
            }

            if (FarmerRenderer.shirtsTexture is ScaledTexture2D st)
            {
                st.ForcedSourceRectangle = new Rectangle?(new Rectangle(0, (int)((facingDirection == 0 ? 24 : facingDirection == 1 ? 8 : facingDirection == 3 ? 16 : 0) * st.Scale), (int)(8 * st.Scale), (int)(8 * st.Scale)));
            }
        }
Esempio n. 7
0
 public void AddItem(Item item)
 {
     Item = item;
     SaveHandler.SaveInventory();
 }
Esempio n. 8
0
        public override void Entry(IModHelper helper)
        {
            _instance = this;
            PostSerializer.Add(ModManifest, Rebuilder);
            PreSerializer.Add(ModManifest, Replacer);
            harmonyFix();

            FormatManager.Instance.RegisterMapFormat(new TMXTile.TMXFormat(Game1.tileSize / Game1.pixelZoom, Game1.tileSize / Game1.pixelZoom, Game1.pixelZoom, Game1.pixelZoom));

            initializeResponders();
            startResponder();
            registerConsoleCommands();
            CustomTVMod.load();
            PyLua.init();
            registerTileActions();
            registerEventPreconditions();
            SaveHandler.setUpEventHandlers();
            CustomObjectData.CODSyncer.start();
            ContentSync.ContentSyncHandler.initialize();

            helper.Events.GameLoop.DayStarted += (s, e) =>
            {
                if (ReInjectCustomObjects)
                {
                    ReInjectCustomObjects = false;
                    CustomObjectData.injector.Invalidate();
                    CustomObjectData.injectorBig.Invalidate();
                }
            };

            this.Helper.Events.Player.Warped                   += Player_Warped;
            this.Helper.Events.GameLoop.DayStarted             += OnDayStarted;
            this.Helper.Events.Multiplayer.PeerContextReceived += (s, e) =>
            {
                if (Game1.IsMasterGame && Game1.IsServer)
                {
                    if (CustomObjectData.collection.Values.Count > 0)
                    {
                        List <CODSync> list = new List <CODSync>();
                        foreach (CustomObjectData data in CustomObjectData.collection.Values)
                        {
                            list.Add(new CODSync(data.id, data.sdvId));
                        }

                        PyNet.sendDataToFarmer(CustomObjectData.CODSyncerName, new CODSyncMessage(list), e.Peer.PlayerID, SerializationType.JSON);
                    }

                    PyNet.sendDataToFarmer("PyTK.ModSavdDataReceiver", saveData, e.Peer.PlayerID, SerializationType.JSON);
                }
            };

            Helper.Events.Display.RenderingHud += (s, e) =>
            {
                if (Game1.displayHUD && Context.IsWorldReady)
                {
                    PyTK.PlatoUI.UIHelper.DrawHud(e.SpriteBatch, true);
                }
            };

            Helper.Events.Display.RenderedHud += (s, e) =>
            {
                if (Game1.displayHUD && Context.IsWorldReady)
                {
                    PyTK.PlatoUI.UIHelper.DrawHud(e.SpriteBatch, false);
                }
            };

            Helper.Events.Input.ButtonPressed += (s, e) =>
            {
                if (Game1.displayHUD && Context.IsWorldReady)
                {
                    if (e.Button == SButton.MouseLeft || e.Button == SButton.MouseRight)
                    {
                        PlatoUI.UIHelper.BaseHud.PerformClick(e.Cursor.ScreenPixels.toPoint(), e.Button == SButton.MouseRight, false, false);
                    }
                }
            };

            Helper.Events.Display.WindowResized += (s, e) =>
            {
                PlatoUI.UIElement.Viewportbase.UpdateBounds();
                PlatoUI.UIHelper.BaseHud.UpdateBounds();
            };

            Helper.Events.Multiplayer.ModMessageReceived += PyNet.Multiplayer_ModMessageReceived;
            helper.Events.GameLoop.Saving += (s, e) =>
            {
                if (Game1.IsMasterGame)
                {
                    try
                    {
                        helper.Data.WriteSaveData <PyTKSaveData>("PyTK.ModSaveData", saveData);
                    }
                    catch
                    {
                    }
                }
            };

            helper.Events.GameLoop.ReturnedToTitle += (s, e) =>
            {
                saveData = new PyTKSaveData();
            };

            helper.Events.GameLoop.SaveLoaded += (s, e) =>
            {
                if (Game1.IsMasterGame)
                {
                    try
                    {
                        saveData = helper.Data.ReadSaveData <PyTKSaveData>("PyTK.ModSaveData");
                    }
                    catch
                    {
                    }
                    if (saveData == null)
                    {
                        saveData = new PyTKSaveData();
                    }
                }
            };

            helper.Events.GameLoop.OneSecondUpdateTicked += (s, e) =>
            {
                if (Context.IsWorldReady && Game1.currentLocation is GameLocation location && location.Map is Map map)
                {
                    PyUtils.checkDrawConditions(map);
                }
            };


            helper.Events.GameLoop.GameLaunched += (s, e) =>
            {
                if (!Helper.ModRegistry.IsLoaded("spacechase0.GenericModConfigMenu"))
                {
                    return;
                }

                try
                {
                    registerCPTokens();
                }
                catch { }
            };

            helper.Events.GameLoop.DayStarted += (s, e) => UpdateLuaTokens = true;
        }
Esempio n. 9
0
 public static void LoadModSave(AutoSaveDirector director, GameData.Summary summary)
 {
     SaveHandler.LoadModdedSave(director, summary.saveName);
 }
Esempio n. 10
0
 private static void LoadSummary_Postfix(string saveName, ref GameData.Summary @return) => SaveHandler.LoadSummary(saveName, @return);
 public static string GetSaveFile(string FolderPath, int Idx)
 {
     return(SaveHandler.GetSaveFile(FolderPath, Idx));
 }
        public static SaveNode ReadSave(string NewPath)
        {
            SaveHandler Handler = new SaveHandler();

            return(Handler.ReadSave(NewPath));
        }
 public static void WriteSave(SaveNode SaveGame, string NewPath)
 {
     SaveHandler.WriteSave(SaveGame, NewPath);
 }
 public static void WriteTexture(Texture2D Img, string NewPath)
 {
     SaveHandler.WriteTexture(Img, NewPath);
 }
 public static Texture2D LoadTexture(string Path)
 {
     return(SaveHandler.LoadTexture(Path));
 }
 public static void WriteBynary(string NewPath, byte[] Data)
 {
     SaveHandler.WriteBynary(Data, NewPath);
 }
Esempio n. 17
0
 private static void Load_Postfix(GameV12 p_gameState) => SaveHandler.Load(p_gameState);
 public static string GetSaveFile(string FolderPath, string Extention, int Idx)
 {
     return(SaveHandler.GetSaveFile(FolderPath, Extention, Idx));
 }
Esempio n. 19
0
 private static void Save_Prefix(GameV12 p_gameState) => SaveHandler.Save(p_gameState);
 public static int GetSavesLen(string FolderPath)
 {
     return(SaveHandler.GetSavesLen(FolderPath));
 }
Esempio n. 21
0
 /// <summary>
 /// Loads the timeStamp from Online Save System with the given parameter name.
 /// Call Save() to save to SaveHandler.
 /// </summary>
 public TimeStamp(string saveID)
 {
     saveHandler = new SaveHandler(saveID);
     ID          = saveID;
     saveHandler.Load(this);
 }
 public static int GetSavesLen(string FolderPath, string Extention)
 {
     return(SaveHandler.GetSavesLen(FolderPath, Extention));
 }
Esempio n. 23
0
        private void registerConsoleCommands()
        {
            CcLocations.clearSpace().register();
            CcSaveHandler.cleanup().register();
            CcSaveHandler.savecheck().register();
            CcTime.skip().register();
            CcLua.runScript().register();

            new ConsoleCommand("adjustWarps", "", (s, p) =>
            {
                PyUtils.adjustWarps(p[0]);
            }).register();

            new ConsoleCommand("rebuild_objects", "", (s, e) =>
            {
                SaveHandler.RebuildAll(Game1.currentLocation.objects, Game1.currentLocation);
                SaveHandler.RebuildAll(Game1.currentLocation.terrainFeatures, Game1.currentLocation);
            }).register();

            new ConsoleCommand("allready", "confirms all players for the current readydialogue", (s, p) =>
            {
                if (!(Game1.activeClickableMenu is ReadyCheckDialog))
                {
                    Monitor.Log("No open ready check.", LogLevel.Alert);
                }
                else
                {
                    OvGame.allready = true;
                }
            }).register();

            new ConsoleCommand("send", "sends a message to all players: send [address] [message]", (s, p) =>
            {
                if (p.Length < 2)
                {
                    Monitor.Log("Missing address or message.", LogLevel.Alert);
                }
                else
                {
                    string address      = p[0];
                    List <string> parts = new List <string>(p);
                    parts.Remove(p[0]);
                    string message = String.Join(" ", p);
                    PyNet.sendMessage(address, message);
                    Monitor.Log("OK", LogLevel.Info);
                }
            }).register();

            new ConsoleCommand("messages", "lists all new messages on a specified address: messages [address]", (s, p) =>
            {
                if (p.Length == 0)
                {
                    Monitor.Log("Missing address", LogLevel.Alert);
                }
                else
                {
                    List <MPMessage> messages = PyNet.getNewMessages(p[0]).ToList();
                    foreach (MPMessage msg in messages)
                    {
                        Monitor.Log($"From {msg.sender.Name} : {msg.message}", LogLevel.Info);
                    }

                    Monitor.Log("OK", LogLevel.Info);
                }
            }).register();

            new ConsoleCommand("getstamina", "lists the current stamina values of all players", (s, p) =>
            {
                Monitor.Log(Game1.player.Name + ": " + Game1.player.Stamina, LogLevel.Info);
                foreach (Farmer farmer in Game1.otherFarmers.Values)
                {
                    PyNet.sendRequestToFarmer <int>("PytK.StaminaRequest", -1, farmer, (getStamina) => Monitor.Log(farmer.Name + ": " + getStamina, LogLevel.Info));
                }
            }).register();

            new ConsoleCommand("setstamina", "changes the stamina of all or a specific player. use: setstamina [playername or all] [stamina]", (s, p) =>
            {
                if (p.Length < 2)
                {
                    Monitor.Log("Missing parameter", LogLevel.Alert);
                }

                Monitor.Log(Game1.player.Name + ": " + Game1.player.Stamina, LogLevel.Info);
                Farmer farmer = null;

                farmer = Game1.otherFarmers.Find(k => k.Value.Name.Equals(p[0])).Value;


                if (farmer == null)
                {
                    Monitor.Log("Couldn't find Farmer", LogLevel.Alert);
                    return;
                }

                int i = -1;
                int.TryParse(p[1], out i);

                PyNet.sendRequestToFarmer <int>("PytK.StaminaRequest", i, farmer, (setStamina) => Monitor.Log(farmer.Name + ": " + setStamina, LogLevel.Info));
            }).register();


            new ConsoleCommand("ping", "pings all other players", (s, p) =>
            {
                foreach (Farmer farmer in Game1.otherFarmers.Values)
                {
                    long t = Game1.currentGameTime.TotalGameTime.Milliseconds;
                    PyNet.sendRequestToFarmer <bool>("PytK.Ping", t, farmer, (ping) =>
                    {
                        long r = Game1.currentGameTime.TotalGameTime.Milliseconds;
                        if (ping)
                        {
                            Monitor.Log(farmer.Name + ": " + (r - t) + "ms", LogLevel.Info);
                        }
                        else
                        {
                            Monitor.Log(farmer.Name + ": No Answer", LogLevel.Error);
                        }
                    });
                }
            }).register();

            new ConsoleCommand("syncmap", "Syncs map of a specified location to all clients. Exp.: syncmap Farm, syncmap BusStop, syncmao Town", (s, p) =>
            {
                if (p.Length < 1)
                {
                    Monitor.Log("No Location specified. ");
                }

                PyNet.syncLocationMapToAll(p[0]);
            }).register();
        }
 public static bool SaveFileExist(string Name)
 {
     return(SaveHandler.SaveFileExist(Name));
 }
Esempio n. 25
0
 public void RemoveItem()
 {
     Item = null;
     SaveHandler.SaveInventory();
 }
Esempio n. 26
0
 public void SaveGame()
 {
     SaveHandler.SaveGame("wantuhy");
 }
Esempio n. 27
0
 internal static void Prefix()
 {
     SaveHandler.typeCheckCache.Clear();
     SaveHandler.Replace();
 }
Esempio n. 28
0
    public void Initialize()
    {
        instance = this;
        string currentPath;
        var    CurrentSavePath = System.IO.Path.Combine(Application.persistentDataPath, "CurrentSavePath");

        if (!File.Exists(CurrentSavePath))
        {
            currentPath = System.IO.Path.Combine(Application.persistentDataPath, "TestSave");
        }
        else
        {
            currentPath = File.ReadAllLines(CurrentSavePath)[0];
        }

        if (File.Exists(currentPath))
        {
            // Load
            string json = File.ReadAllText(currentPath);
            save = JsonUtility.FromJson <PlayerSave>(json);
            if (save.timePlayed != 0)
            {
                player.spawnPoint = save.position;
                player.Dimension  = save.lastDimension;
            }

            if (SectorManager.testJsonPath != null)
            {
                save.resourcePath = SectorManager.testJsonPath;
            }
            else if (save.resourcePath == "")
            {
                save.resourcePath = SectorManager.jsonPath;
            }

            player.cursave = save;

            if (save.factions != null)
            {
                for (int i = 0; i < save.factions.Length; i++)
                {
                    FactionManager.SetFactionRelations(save.factions[i], save.relations[i]);
                }
            }

            SectorManager.instance.LoadSectorFile(save.resourcePath);
            save.missions.RemoveAll(m => !taskManager.questCanvasPaths.Exists(p =>
                                                                              System.IO.Path.GetFileNameWithoutExtension(p) == m.name));
            taskManager.Initialize(true); // Re-init
            DialogueSystem.InitCanvases();


            player.blueprint      = ScriptableObject.CreateInstance <EntityBlueprint>();
            player.blueprint.name = "Player Save Blueprint";
            if (!string.IsNullOrEmpty(save.currentPlayerBlueprint))
            {
                var print = SectorManager.TryGettingEntityBlueprint(save.currentPlayerBlueprint);
                player.blueprint = print;
            }
            else
            {
                Debug.LogError("Save should have been given a currentPlayerBlueprint by now.");
                player.blueprint.parts             = new List <EntityBlueprint.PartInfo>();
                player.blueprint.coreSpriteID      = "core1_light";
                player.blueprint.coreShellSpriteID = "core1_shell";
                player.blueprint.baseRegen         = CoreUpgraderScript.GetRegens(player.blueprint.coreShellSpriteID);
                player.blueprint.shellHealth       = CoreUpgraderScript.defaultHealths;
            }

            player.abilityCaps = save.abilityCaps;
            player.shards      = save.shards;
            player.SetCredits(save.credits);
            player.reputation = save.reputation;
            if (save.presetBlueprints.Length != 5)
            {
                save.presetBlueprints = new string[5];
            }

            Camera.main.GetComponent <CameraScript>().Initialize(player);

            taskManager.taskVariables.Clear();
            for (int i = 0; i < save.taskVariableNames.Length; i++)
            {
                taskManager.taskVariables.Add(save.taskVariableNames[i], save.taskVariableValues[i]);
            }
        }
        else
        {
            Debug.LogError("There was not a save or test save that was ready on load.");
            save = new PlayerSave();
            save.presetBlueprints = new string[5];
            save.currentHealths   = new float[] { 1000, 250, 500 };
            save.partInventory    = new List <EntityBlueprint.PartInfo>();

            player.blueprint                   = ScriptableObject.CreateInstance <EntityBlueprint>();
            player.blueprint.name              = "Player Save Blueprint";
            player.blueprint.coreSpriteID      = "core1_light";
            player.blueprint.coreShellSpriteID = "core1_shell";
            player.blueprint.baseRegen         = CoreUpgraderScript.GetRegens(player.blueprint.coreShellSpriteID);
            player.blueprint.shellHealth       = CoreUpgraderScript.defaultHealths;
            player.blueprint.parts             = new List <EntityBlueprint.PartInfo>();
            player.cursave     = save;
            player.abilityCaps = CoreUpgraderScript.minAbilityCap;
        }
    }
Esempio n. 29
0
 private static void DelayedRebuild(object sender, EventArgsIntChanged e)
 {
     SaveHandler.Rebuild();
     TimeEvents.TimeOfDayChanged -= DelayedRebuild;
 }
Esempio n. 30
0
    public void Play()
    {
        SaveHandler handler = GameObject.FindGameObjectWithTag("Saver").GetComponent <SaveHandler>();

        handler.Play();
    }
Esempio n. 31
0
 internal static void Postfix()
 {
     SaveHandler.Rebuild();
 }
Esempio n. 32
0
 internal static bool Prefix(Building __instance)
 {
     return(!(__instance is Mill m && (SaveHandler.getDataString(__instance).StartsWith(SaveHandler.newPrefix)) && m.indoors.Value is GameLocation gl && (SaveHandler.getDataString(gl).StartsWith(SaveHandler.newPrefix))));
 }