public override ICustomObject recreate(Dictionary <string, string> additionalSaveData, object replacement)
        {
            //instead of using this.offsetkey.x use get additional save data function and store offset key there
            //ModCore.log("Recreate a table tile component!");
            Vector2 offsetKey = new Vector2(Convert.ToInt32(additionalSaveData["offsetKeyX"]), Convert.ToInt32(additionalSaveData["offsetKeyY"]));
            //ModCore.log("Got the offset key!");
            string GUID = additionalSaveData["GUID"];
            //ModCore.log("This tile has a parent guid of: " + additionalSaveData["ParentGUID"]);
            TableTileComponent self = Revitalize.ModCore.Serializer.DeserializeGUID <TableTileComponent>(additionalSaveData["GUID"]);

            if (ModCore.IsNullOrDefault <TableTileComponent>(self))
            {
                //ModCore.log("SELF IS NULL");
                return(null);
            }
            try
            {
                if (!Revitalize.ModCore.ObjectGroups.ContainsKey(additionalSaveData["ParentGUID"]))
                {
                    //ModCore.log("Load in the parent!");
                    //Get new container
                    TableMultiTiledObject obj = (TableMultiTiledObject)Revitalize.ModCore.Serializer.DeserializeGUID <TableMultiTiledObject>(additionalSaveData["ParentGUID"]);
                    self.containerObject = obj;
                    self.containerObject.removeComponent(offsetKey);
                    self.containerObject.addComponent(offsetKey, self);
                    Revitalize.ModCore.ObjectGroups.Add(additionalSaveData["ParentGUID"], obj);
                }
                else
                {
                    //ModCore.log("Parent already exists!");
                    self.containerObject = Revitalize.ModCore.ObjectGroups[additionalSaveData["ParentGUID"]];
                    self.containerObject.removeComponent(offsetKey);
                    self.containerObject.addComponent(offsetKey, self);
                    //Revitalize.ModCore.log("READD AN OBJECT!!!!");
                }
            }
            catch (Exception err)
            {
                ModCore.log(err);
            }

            return(self);
        }
        public override ICustomObject recreate(Dictionary <string, string> additionalSaveData, object replacement)
        {
            TableMultiTiledObject obj = (TableMultiTiledObject)Revitalize.ModCore.Serializer.DeserializeGUID <TableMultiTiledObject>(additionalSaveData["GUID"]);

            if (obj == null)
            {
                return(null);
            }

            Dictionary <Vector2, Guid> guids = new Dictionary <Vector2, Guid>();

            foreach (KeyValuePair <Vector2, Guid> pair in obj.childrenGuids)
            {
                guids.Add(pair.Key, pair.Value);
            }

            foreach (KeyValuePair <Vector2, Guid> pair in guids)
            {
                obj.childrenGuids.Remove(pair.Key);
                //Revitalize.ModCore.log("DESERIALIZE: " + pair.Value.ToString());
                TableTileComponent component = Revitalize.ModCore.Serializer.DeserializeGUID <TableTileComponent>(pair.Value.ToString());
                component.InitNetFields();

                obj.addComponent(pair.Key, component);
            }
            obj.InitNetFields();

            if (!Revitalize.ModCore.ObjectGroups.ContainsKey(additionalSaveData["GUID"]))
            {
                Revitalize.ModCore.ObjectGroups.Add(additionalSaveData["GUID"], obj);
                return(obj);
            }
            else
            {
                return(Revitalize.ModCore.ObjectGroups[additionalSaveData["GUID"]]);
            }
        }