Ejemplo n.º 1
0
        /// <summary>Registers the item into it's registry</summary>
        public override IdentifiableItem Register()
        {
            Build();

            foreach (Identifiable.Id id in Prefabs.Keys)
            {
                IdentifiableRegistry.CategorizeId(id);

                if (GameContext.Instance.MessageDirector.Get("actor", "l." + id.ToString().ToLower()) == null)
                {
                    LanguageController.AddActorTranslation("l." + id.ToString().ToLower(), DefTranslation[id]);
                }

                LookupRegistry.RegisterIdentifiablePrefab(Prefabs[id]);

                VacEntry = VacItemDefinition.CreateVacItemDefinition(id, Color, Icon ? Icon : SRObjects.MissingIcon);
                LookupRegistry.RegisterVacEntry(VacEntry);
                VacEntries.Add(id, VacEntry);

                if (IsVacuumableOverride || Size == Vacuumable.Size.NORMAL)
                {
                    AmmoRegistry.RegisterPlayerAmmo(PlayerState.AmmoMode.DEFAULT, id);
                }

                if (IsRefineryResource)
                {
                    AmmoRegistry.RegisterRefineryResource(id);
                }

                AmmoRegistry.RegisterSiloAmmo(ValidSiloAmmo, id);
            }

            VacEntry = null;
            return(this);
        }
        private static bool TryConsume_Prefix(Vacuumable @this, ref bool @return)
        {
            @return = false;

            FieldInfo consume = typeof(Vacuumable).GetField("consume", BindingFlags.Instance | BindingFlags.NonPublic);

            if (consume != null)
            {
                Vacuumable.Consume evtConsume = consume.GetValue(@this) as Vacuumable.Consume;
                if (evtConsume != null)
                {
                    evtConsume.Invoke();
                    @return = true;

                    return(false);
                }
            }

            PlayerState  state = SceneContext.Instance.PlayerState;
            Identifiable ident = @this.GetComponent <Identifiable>();

            if (AmmoRegistry.CheckInventoryLocks(ident.id, state.GetAmmoMode()) && state.Ammo.MaybeAddToSlot(ident.id, ident))
            {
                Destroyer.DestroyActor(@this.transform.gameObject, "Vacuumable.consume");

                @return = true;
                return(false);
            }

            return(false);
        }
Ejemplo n.º 3
0
        public override void Load()
        {
            if (!SRModLoader.IsModPresent("quicksilver_rancher"))
            {
                GameObject prefab = SRSingleton <GameContext> .Instance.LookupDirector.GetPrefab(Identifiable.Id.QUICKSILVER_SLIME);

                AmmoRegistry.RegisterAmmoPrefab(PlayerState.AmmoMode.DEFAULT, SRSingleton <GameContext> .Instance.LookupDirector.GetPrefab(Identifiable.Id.QUICKSILVER_PLORT));
                AmmoRegistry.RegisterAmmoPrefab(PlayerState.AmmoMode.DEFAULT, SRSingleton <GameContext> .Instance.LookupDirector.GetPrefab(Identifiable.Id.VALLEY_AMMO_1));
                AmmoRegistry.RegisterAmmoPrefab(PlayerState.AmmoMode.DEFAULT, SRSingleton <GameContext> .Instance.LookupDirector.GetPrefab(Identifiable.Id.VALLEY_AMMO_3));
                AmmoRegistry.RegisterAmmoPrefab(PlayerState.AmmoMode.DEFAULT, SRSingleton <GameContext> .Instance.LookupDirector.GetPrefab(Identifiable.Id.VALLEY_AMMO_2));
                AmmoRegistry.RegisterAmmoPrefab(PlayerState.AmmoMode.DEFAULT, SRSingleton <GameContext> .Instance.LookupDirector.GetPrefab(Identifiable.Id.VALLEY_AMMO_4));
                AmmoRegistry.RegisterAmmoPrefab(PlayerState.AmmoMode.DEFAULT, prefab);

                AmmoRegistry.RegisterRefineryResource(Identifiable.Id.QUICKSILVER_PLORT);

                //LookupRegistry.RegisterVacEntry(Identifiable.Id.QUICKSILVER_PLORT, Color.grey, SRSingleton<SceneContext>.Instance..entries.First((PediaDirector.IdEntry x) => x.id == PediaDirector.Id.QUICKSILVER_PLORT).icon);

                PlortRegistry.AddEconomyEntry(Identifiable.Id.QUICKSILVER_PLORT, 200f, 100f);

                PlortRegistry.AddPlortEntry(Identifiable.Id.QUICKSILVER_PLORT, new ProgressDirector.ProgressType[]
                {
                    ProgressDirector.ProgressType.ENTER_ZONE_MOCHI_RANCH
                });

                AmmoRegistry.RegisterSiloAmmo((SiloStorage.StorageType x) => x == SiloStorage.StorageType.NON_SLIMES || x == SiloStorage.StorageType.PLORT, Identifiable.Id.QUICKSILVER_PLORT);
            }
            else
            {
                throw new Exception("Quicksilver Rancher mod (the old and original) is there, please remove it if you consider using this mod");
            }
        }
        private static bool GetMaxAmmo_Default_Prefix(Identifiable.Id id, int index, ref int @return, PlayerState @this)
        {
            int?value = AmmoRegistry.RetrieveMaxAmmo(id, index, @this.GetAmmoMode());

            @return = value ?? -1;

            return(value == null);
        }
Ejemplo n.º 5
0
        private static bool GetContents_Prefix(SiloStorage.StorageType type, ref HashSet <Identifiable.Id> @return)
        {
            FieldInfo cacheField = typeof(StorageTypeExtensions).GetField("getContentsCache", BindingFlags.Static | BindingFlags.NonPublic);
            Dictionary <SiloStorage.StorageType, HashSet <Identifiable.Id> > cache = cacheField?.GetValue(null) as Dictionary <SiloStorage.StorageType, HashSet <Identifiable.Id> >;

            if (cache != null && cache.ContainsKey(type))
            {
                @return = cache[type];
                return(false);
            }

            HashSet <Identifiable.Id> idSet = new HashSet <Identifiable.Id>(Identifiable.idComparer);

            switch (type)
            {
            case SiloStorage.StorageType.NON_SLIMES:
                IdentifiableRegistry.PopulateHashSet(idSet, IdentifiableType.NON_SLIME, IdentifiableType.ORNAMENT, IdentifiableType.ECHO, IdentifiableType.ECHO_NOTE);
                break;

            case SiloStorage.StorageType.PLORT:
                IdentifiableRegistry.PopulateHashSet(idSet, IdentifiableType.PLORT);
                break;

            case SiloStorage.StorageType.FOOD:
                IdentifiableRegistry.PopulateHashSet(idSet, IdentifiableType.FOOD, IdentifiableType.CHICK);
                break;

            case SiloStorage.StorageType.CRAFTING:
                IdentifiableRegistry.PopulateHashSet(idSet, IdentifiableType.PLORT, IdentifiableType.CRAFT);
                break;

            case SiloStorage.StorageType.ELDER:
                IdentifiableRegistry.PopulateHashSet(idSet, IdentifiableType.ELDER);
                break;
            }

            idSet.Remove(Identifiable.Id.QUICKSILVER_PLORT);
            AmmoRegistry.InjectStorageAmmo(type, idSet);

            cache?.Add(type, idSet);
            cacheField?.SetValue(null, cache);
            @return = idSet;
            return(false);
        }
Ejemplo n.º 6
0
        /// <summary>Registers the item into it's registry</summary>
        public override IdentifiableItem Register()
        {
            Build();

            LookupRegistry.RegisterIdentifiablePrefab(Prefab);

            VacEntry = VacItemDefinition.CreateVacItemDefinition(ID, Color, Icon ? Icon : SRObjects.MissingIcon);
            LookupRegistry.RegisterVacEntry(VacEntry);

            if (IsVacuumableOverride || Size == Vacuumable.Size.NORMAL)
            {
                AmmoRegistry.RegisterPlayerAmmo(PlayerState.AmmoMode.DEFAULT, ID);
            }

            if (IsRefineryResource)
            {
                AmmoRegistry.RegisterRefineryResource(ID);
            }

            AmmoRegistry.RegisterSiloAmmo(ValidSiloAmmo, ID);

            return(this);
        }
        private static bool GetMaxAmmo_NimbleValley_Prefix(Identifiable.Id id, int index, ref int @return, PlayerState @this)
        {
            switch (index)
            {
            case 0:
                @return = 250;
                break;

            case 1:
                @return = 100;
                break;

            case 2:
                @return = 3;
                break;

            default:
                @return = 0;
                break;
            }

            @return = AmmoRegistry.RetrieveMaxAmmo(id, index, @this.GetAmmoMode()) ?? @return;
            return(false);
        }
Ejemplo n.º 8
0
 private static void Awake_Prefix(RefineryUI @this) => @this.listedItems = AmmoRegistry.InjectRefineryResources(@this.listedItems);
Ejemplo n.º 9
0
        // Called before GameContext.Start
        // Used for registering things that require a loaded gamecontext
        public override void Load()
        {
            SlimeDefinition mapleDefinition = PrefabUtils.DeepCopyObject(SRSingleton<GameContext>.Instance.SlimeDefinitions.GetSlimeByIdentifiableId(Identifiable.Id.PINK_SLIME)) as SlimeDefinition;
            mapleDefinition.AppearancesDefault = new SlimeAppearance[1];
            mapleDefinition.Diet.Produces = new Identifiable.Id[]
            {
                ModdedIds.MAPLE_PLORT
            };
            mapleDefinition.Diet.MajorFoodGroups = new SlimeEat.FoodGroup[]
            {
                SlimeEat.FoodGroup.FRUIT
            };
            mapleDefinition.Diet.AdditionalFoods = new Identifiable.Id[0];
            mapleDefinition.Diet.Favorites = new Identifiable.Id[]
            {
                Identifiable.Id.POGO_FRUIT
            };
            List<SlimeDiet.EatMapEntry> eatMap = mapleDefinition.Diet.EatMap;
            if (eatMap != null)
            {
                eatMap.Clear();
            }
            mapleDefinition.CanLargofy = false;
            mapleDefinition.FavoriteToys = new Identifiable.Id[0];
            mapleDefinition.Name = "Maple";
            mapleDefinition.IdentifiableId = ModdedIds.MAPLE_SLIME;
            SlimeDefinition pinkSlimeDefinition = SRSingleton<GameContext>.Instance.SlimeDefinitions.GetSlimeByIdentifiableId(Identifiable.Id.PINK_SLIME);
            GameObject mapleGameObject = PrefabUtils.CopyPrefab(SRSingleton<GameContext>.Instance.LookupDirector.GetPrefab(Identifiable.Id.PINK_SLIME));
            mapleGameObject.name = "mapleSlime";
            mapleGameObject.GetComponent<PlayWithToys>().slimeDefinition = mapleDefinition;
            mapleGameObject.GetComponent<SlimeAppearanceApplicator>().SlimeDefinition = mapleDefinition;
            mapleGameObject.GetComponent<SlimeEat>().slimeDefinition = mapleDefinition;
            SlimeAppearance mapleAppearance = PrefabUtils.DeepCopyObject(pinkSlimeDefinition.AppearancesDefault[0]) as SlimeAppearance;
            foreach (SlimeAppearanceStructure slimeAppearanceStructure in mapleAppearance.Structures)
            {
                Material[] defaultMaterials = slimeAppearanceStructure.DefaultMaterials;
                bool flag = ((defaultMaterials != null) ? defaultMaterials.Length : 0) == 0;
                if (!flag)
                {
                    Material material = UnityEngine.Object.Instantiate<Material>(slimeAppearanceStructure.DefaultMaterials[0]);
                    material.SetColor(topColorNameId, new Color(87.0f / 255.0f, 32.0f / 255.0f, 0.0f / 255.0f)); // new Color(216.0f / 255.0f, 120.0f / 255.0f , 63.0f / 255.0f)
                    material.SetColor(middleColorNameId, new Color(164.0f / 255.0f, 75.0f / 255.0f, 23.0f / 255.0f)); // new Color(194.0f / 255.0f, 99.0f / 255.0f, 44.0f / 255.0f)
                    material.SetColor(bottomColorNameId, new Color(226.0f / 255.0f, 123.0f / 255.0f, 63.0f / 255.0f)); // new Color(182.0f / 255.0f, 86.0f / 255.0f, 33.0f / 255.0f)
                    material.SetColor("_SpecColor", Color.red);
                    material.SetFloat("_Shininess", 5f);
                    material.SetFloat("_Gloss", 5f);
                    slimeAppearanceStructure.DefaultMaterials[0] = material;
                }
            }
            foreach(SlimeExpressionFace slimeExpressionFace in mapleAppearance.Face.ExpressionFaces)
            {
                bool flag2 = slimeExpressionFace.Mouth;
                if (flag2)
                { 
                    slimeExpressionFace.Mouth.SetColor("_MouthBot", new Color(145.0f / 255.0f, 17.0f / 255.0f, 17.0f / 255.0f));
                    slimeExpressionFace.Mouth.SetColor("_MouthMid", new Color(145.0f / 255.0f, 17.0f / 255.0f, 17.0f / 255.0f));
                    slimeExpressionFace.Mouth.SetColor("_MouthTop", new Color(145.0f / 255.0f, 17.0f / 255.0f, 17.0f / 255.0f));
                }

                bool flag3 = slimeExpressionFace.Eyes;
                if (flag3)
                {
                    slimeExpressionFace.Eyes.SetColor("_EyeBlue", Color.black);
                    slimeExpressionFace.Eyes.SetColor("_EyeGreen", Color.black);
                    slimeExpressionFace.Eyes.SetColor("_EyeRed", Color.black);
                    slimeExpressionFace.Eyes.SetColor("_GlowColor", Color.black);
                }
            }
            mapleAppearance.Face.OnEnable();
            mapleAppearance.ColorPalette = new SlimeAppearance.Palette
            {
                Bottom = new Color(182.0f / 255.0f, 86.0f / 255.0f, 33.0f / 255.0f),
                Middle = new Color(194.0f / 255.0f, 99.0f / 255.0f, 44.0f / 255.0f),
                Top = new Color(216.0f / 255.0f, 120.0f / 255.0f, 63.0f / 255.0f),
                Ammo = new Color(194.0f / 255.0f, 99.0f / 255.0f, 44.0f / 255.0f)
            };
            Sprite mapleSlimeSprite = IMG2Sprite.LoadNewSprite("SDTestModNew.MapleSlime.png");
            mapleAppearance.Icon = mapleSlimeSprite;
            mapleDefinition.AppearancesDefault = new SlimeAppearance[]
            {
                mapleAppearance
            };
            mapleGameObject.GetComponent<Identifiable>().id = ModdedIds.MAPLE_SLIME;
            LookupRegistry.RegisterIdentifiablePrefab(mapleGameObject);
            SlimeRegistry.RegisterSlimeDefinition(mapleDefinition);
            Material maplePlortMaterial = SRSingleton<GameContext>.Instance.LookupDirector.GetPrefab(Identifiable.Id.PINK_PLORT).GetComponentInChildren<MeshRenderer>().material;
            GameObject maplePlortObject = PrefabUtils.CopyPrefab(SRSingleton<GameContext>.Instance.LookupDirector.GetPrefab(Identifiable.Id.PINK_PLORT));
            maplePlortObject.GetComponent<Identifiable>().id = ModdedIds.MAPLE_PLORT;
            maplePlortObject.name = "maplePlort";
            maplePlortMaterial = UnityEngine.Object.Instantiate<Material>(maplePlortMaterial);
            maplePlortMaterial.SetColor(topColorNameId, new Color(182.0f / 255.0f, 86.0f / 255.0f, 33.0f / 255.0f));
            maplePlortMaterial.SetColor(middleColorNameId, new Color(87.0f / 255.0f, 32.0f / 255.0f, 0.0f / 255.0f));
            maplePlortMaterial.SetColor(bottomColorNameId, new Color(182.0f / 255.0f, 86.0f / 255.0f, 33.0f / 255.0f));
            maplePlortObject.GetComponentInChildren<MeshRenderer>().material = maplePlortMaterial;
            LookupRegistry.RegisterIdentifiablePrefab(maplePlortObject);
            Sprite maplePlortSprite = IMG2Sprite.LoadNewSprite("SDTestModNew.MaplePlort.png");
            LookupRegistry.RegisterVacEntry(ModdedIds.MAPLE_PLORT, new Color(182.0f / 255.0f, 86.0f / 255.0f, 33.0f / 255.0f), maplePlortSprite);
            AmmoRegistry.RegisterAmmoPrefab(PlayerState.AmmoMode.DEFAULT, maplePlortObject);
            AmmoRegistry.RegisterAmmoPrefab(PlayerState.AmmoMode.DEFAULT, mapleGameObject);
            PediaRegistry.RegisterIdEntry(ModdedIds.MAPLE_SLIMES, mapleSlimeSprite);
            PlortRegistry.AddEconomyEntry(ModdedIds.MAPLE_PLORT, 35f, 50f);
            DroneRegistry.RegisterBasicTarget(ModdedIds.MAPLE_PLORT);

            Mesh pogoMesh = PrefabUtils.CopyPrefab(SRSingleton<GameContext>.Instance.LookupDirector.GetPrefab(Identifiable.Id.POGO_FRUIT)).GetComponent<Mesh>();
            MeshRenderer[] pogoMeshRenderers = PrefabUtils.CopyPrefab(SRSingleton<GameContext>.Instance.LookupDirector.GetPrefab(Identifiable.Id.POGO_FRUIT)).GetComponentsInChildren<MeshRenderer>();
            IEnumerable<Material> pogoMaterials = new List<Material>();
            foreach(MeshRenderer renderer in pogoMeshRenderers)
            {
                foreach(Material material in renderer.materials)
                {
                    pogoMaterials = pogoMaterials.Append(material);
                }
            }
            SRML.Console.Console.Log("pogoMaterials.Count(): " + pogoMaterials.Count().ToString());
            SRML.Console.Console.Log("pogoMaterials.ToArray().Length: " + pogoMaterials.ToArray().Length.ToString());
            TestingUtils.DumpChildComponents(Identifiable.Id.POGO_FRUIT);
            FoodTemplate caramelAppleTemplate = new FoodTemplate("caramelApple", ModdedIds.CARAMEL_APPLE_FRUIT, ModdedIds.CARAMEL_APPLES, FoodTemplate.Type.FRUIT, pogoMesh, pogoMaterials.ToArray());
            caramelAppleTemplate = caramelAppleTemplate.SetTranslation("Caramel Apple");
            GameObject caramelAppleObject = caramelAppleTemplate.Create().ToPrefab();
            caramelAppleObject.GetComponent<Identifiable>().id = ModdedIds.CARAMEL_APPLE_FRUIT;
            caramelAppleObject.GetComponent<Vacuumable>().size = Vacuumable.Size.NORMAL;
            caramelAppleObject.name = "caramelApple";
            LookupRegistry.RegisterIdentifiablePrefab(caramelAppleObject);
            Sprite caramelAppleSprite = IMG2Sprite.LoadNewSprite("SDTestModNew.CaramelApple.png");
            LookupRegistry.RegisterVacEntry(ModdedIds.CARAMEL_APPLE_FRUIT, Color.green, caramelAppleSprite);
            AmmoRegistry.RegisterAmmoPrefab(PlayerState.AmmoMode.DEFAULT, caramelAppleObject);
            PediaRegistry.RegisterIdEntry(ModdedIds.CARAMEL_APPLES, caramelAppleSprite);
            DroneRegistry.RegisterBasicTarget(ModdedIds.CARAMEL_APPLE_FRUIT);
            TestingUtils.DumpChildComponents(ModdedIds.CARAMEL_APPLE_FRUIT);

            CrateTemplate testCrateTemplate = new CrateTemplate("testCrate", ModdedIds.TEST_CRATE_01);
            testCrateTemplate = testCrateTemplate.SetSpawnInfo(3, 5);
            List<BreakOnImpact.SpawnOption> testCrateSpawnOptions = new List<BreakOnImpact.SpawnOption>();
            testCrateSpawnOptions = testCrateSpawnOptions.Append(SpawnOptionByID(Identifiable.Id.MANGO_FRUIT, 1.5f)).ToList();
            testCrateSpawnOptions = testCrateSpawnOptions.Append(SpawnOptionByID(Identifiable.Id.POGO_FRUIT, 3.0f)).ToList();
            testCrateSpawnOptions = testCrateSpawnOptions.Append(SpawnOptionByID(Identifiable.Id.CARROT_VEGGIE, 3.0f)).ToList();
            testCrateSpawnOptions = testCrateSpawnOptions.Append(SpawnOptionByID(Identifiable.Id.OCAOCA_VEGGIE, 1.5f)).ToList();
            testCrateSpawnOptions = testCrateSpawnOptions.Append(SpawnOptionByID(Identifiable.Id.PEAR_FRUIT, 0.25f)).ToList();
            testCrateSpawnOptions = testCrateSpawnOptions.Append(SpawnOptionByID(Identifiable.Id.PARSNIP_VEGGIE, 0.25f)).ToList();
            testCrateSpawnOptions = testCrateSpawnOptions.Append(SpawnOptionByID(Identifiable.Id.GINGER_VEGGIE, 0.0001f)).ToList();
            testCrateTemplate.SetSpawnOptions(testCrateSpawnOptions);
            GameObject testCrateObject = testCrateTemplate.Create().ToPrefab();
            LookupRegistry.RegisterIdentifiablePrefab(testCrateObject);
        }
 private static bool CanAccept_Prefix(Identifiable.Id id, int slotIdx, bool overflow, SiloStorage @this, ref bool @return)
 {
     @return = AmmoRegistry.CheckStorageLocks(id, @this) && @this.GetRelevantAmmo().CouldAddToSlot(id, slotIdx, overflow);
     return(false);
 }
 private static bool MaybeAddIdentifiable_Prefix1(Identifiable.Id id, int slotIdx, int count, bool overflow, SiloStorage @this, ref bool @return)
 {
     @return = AmmoRegistry.CheckStorageLocks(id, @this) && @this.GetRelevantAmmo().MaybeAddToSpecificSlot(id, null, slotIdx, count, overflow);
     @this.GetType().GetMethod("OnAdded", BindingFlags.NonPublic)?.Invoke(@this, new object[0]);
     return(false);
 }
 private static void Reset_Postfix(PlayerModel model, Dictionary <PlayerState.AmmoMode, Ammo> p_ammoDict)
 {
     //& Add the new ammo's into the game
     AmmoRegistry.InjectAmmoModes(model, p_ammoDict);
     AmmoRegistry.InjectInvAmmo(p_ammoDict);
 }
 private static void SetModel_Prefix(PlayerModel model, Dictionary <PlayerState.AmmoMode, Ammo> p_ammoDict) => AmmoRegistry.LoadAmmoModels(model, p_ammoDict);
 private static void InitModel_Prefix(EconomyDirector @this) => @this.baseValueMap = AmmoRegistry.InjectMarketPrices(@this.baseValueMap);
 private static void Start_Prefix(ModdedMarketUI @this) => @this.plorts = AmmoRegistry.InjectMarketPlorts(@this.plorts);
Ejemplo n.º 16
0
 private static bool IsRefineryResource_Prefix(Identifiable.Id id, out bool @return)
 {
     @return = IdentifiableHandler.IsPlort(id) || IdentifiableHandler.IsCraft(id) || AmmoRegistry.CheckRefineryResource(id);
     return(false);
 }
Ejemplo n.º 17
0
        //! Patch: SavedGame.Load
        internal static void Load(GameV12 original)
        {
            //& Merge Summary
            if (gameState.summary.iconId != Identifiable.Id.NONE && IsGuuIdentifiable(gameState.summary.iconId))
            {
                original.summary.iconId = gameState.summary.iconId;
            }

            if (gameState.summary.gameMode != PlayerState.GameMode.CLASSIC)
            {
                original.summary.gameMode = gameState.summary.gameMode;
            }

            //& Merge World
            original.world.lastOfferRancherIds.AddAll(gameState.world.lastOfferRancherIds, IsGuuID);
            original.world.pendingOfferRancherIds.AddAll(gameState.world.pendingOfferRancherIds, IsGuuID);

            if (gameState.world.weather != AmbianceDirector.Weather.NONE)
            {
                original.world.weather = gameState.world.weather;
            }

            foreach (ExchangeDirector.OfferType type in original.world.offers.Keys)
            {
                if (!gameState.world.offers.ContainsKey(type))
                {
                    continue;
                }
                ExchangeOfferV04 ori = original.world.offers[type];
                ExchangeOfferV04 mod = gameState.world.offers[type];

                ori.requests.AddAll(mod.requests, request => IsGuuIdentifiable(request.id) || ExchangeRegistry.IsNonIdenRegistered(request.nonIdentReward));
                ori.rewards.AddAll(mod.rewards, reward => IsGuuIdentifiable(reward.id) || ExchangeRegistry.IsNonIdenRegistered(reward.nonIdentReward));

                gameState.world.offers.Remove(type);
            }
            original.world.offers.AddAll(gameState.world.offers, pair => IsGuuID(pair.Value.rancherId) || IsGuuID(pair.Value.offerId) || ExchangeRegistry.IsOfferTypeRegistered(pair.Key));

            original.world.econSaturations.AddAll(gameState.world.econSaturations, IsGuuIdentifiable);
            original.world.teleportNodeActivations.AddAll(gameState.world.teleportNodeActivations, IsGuuID);
            original.world.liquidSourceUnits.AddAll(gameState.world.liquidSourceUnits, IsGuuID);

            foreach (string id in original.world.gordos.Keys)
            {
                if (!gameState.world.gordos.ContainsKey(id))
                {
                    continue;
                }
                original.world.gordos[id].fashions.AddAll(gameState.world.gordos[id].fashions, IsGuuIdentifiable);
                gameState.world.gordos.Remove(id);
            }
            original.world.gordos.AddRange(gameState.world.gordos);

            foreach (string id in original.world.placedGadgets.Keys)
            {
                if (!gameState.world.placedGadgets.ContainsKey(id))
                {
                    continue;
                }
                PlacedGadgetV08 ori = original.world.placedGadgets[id];
                PlacedGadgetV08 mod = gameState.world.placedGadgets[id];

                if (mod.gadgetId != Gadget.Id.NONE)
                {
                    ori.gadgetId = mod.gadgetId;
                }

                int i = 0;
                foreach (AmmoDataV02 ammo in mod.ammo)
                {
                    if (ammo.id != Identifiable.Id.NONE && IsGuuIdentifiable(ammo.id))
                    {
                        ori.ammo[i].id = ammo.id;
                    }
                    ori.ammo[i].emotionData.emotionData.AddRange(ammo.emotionData.emotionData);
                    i++;
                }

                if (mod.baitTypeId != Identifiable.Id.NONE && IsGuuIdentifiable(mod.baitTypeId))
                {
                    ori.baitTypeId = mod.baitTypeId;
                }
                if (mod.gordoTypeId != Identifiable.Id.NONE && IsGuuIdentifiable(mod.gordoTypeId))
                {
                    ori.gordoTypeId = mod.gordoTypeId;
                }
                ori.fashions.AddAll(mod.fashions, IsGuuIdentifiable);

                if (ori.drone != null)
                {
                    if (mod.drone.drone.ammo.id != Identifiable.Id.NONE && IsGuuIdentifiable(mod.drone.drone.ammo.id))
                    {
                        ori.drone.drone.ammo.id = mod.drone.drone.ammo.id;
                    }
                    ori.drone.drone.ammo.emotionData.emotionData.AddRange(mod.drone.drone.ammo.emotionData.emotionData);
                    ori.drone.drone.fashions.AddAll(mod.drone.drone.fashions, IsGuuIdentifiable);
                }

                gameState.world.placedGadgets.Remove(id);
            }
            original.world.placedGadgets.AddAll(gameState.world.placedGadgets, IsGuuID);

            foreach (string id in original.world.treasurePods.Keys)
            {
                if (!gameState.world.treasurePods.ContainsKey(id))
                {
                    continue;
                }
                original.world.treasurePods[id].spawnQueue.AddAll(gameState.world.treasurePods[id].spawnQueue, IsGuuIdentifiable);
                gameState.world.treasurePods.Remove(id);
            }
            original.world.treasurePods.AddRange(gameState.world.treasurePods);

            original.world.switches.AddAll(gameState.world.switches, IsGuuID);
            original.world.puzzleSlotsFilled.AddAll(gameState.world.puzzleSlotsFilled, IsGuuID);
            original.world.occupiedPhaseSites.AddAll(gameState.world.occupiedPhaseSites, IsGuuID);
            original.world.quicksilverEnergyGenerators.AddAll(gameState.world.quicksilverEnergyGenerators, IsGuuID);
            original.world.oasisStates.AddAll(gameState.world.oasisStates, IsGuuID);
            original.world.activeGingerPatches.AddAll(gameState.world.activeGingerPatches, IsGuuID);
            original.world.echoNoteGordos.AddAll(gameState.world.echoNoteGordos, IsGuuID);

            //? Slimeulation
            original.world.glitch.teleporters.AddAll(gameState.world.glitch.teleporters, IsGuuID);
            original.world.glitch.nodes.AddAll(gameState.world.glitch.nodes, IsGuuID);
            original.world.glitch.impostoDirectors.AddAll(gameState.world.glitch.impostoDirectors, IsGuuID);
            original.world.glitch.impostos.AddAll(gameState.world.glitch.impostos, IsGuuID);
            original.world.glitch.slimes.AddAll(gameState.world.glitch.slimes, IsGuuID);
            original.world.glitch.storage.AddAll(gameState.world.glitch.storage, pair => IsGuuID(pair.Key) || IsGuuIdentifiable(pair.Value.id));

            //& Merge Player
            if (gameState.player.gameMode != PlayerState.GameMode.CLASSIC)
            {
                original.player.gameMode = gameState.player.gameMode;
            }
            if (gameState.player.gameIconId != Identifiable.Id.NONE && IsGuuIdentifiable(gameState.player.gameIconId))
            {
                original.player.gameIconId = gameState.player.gameIconId;
            }

            original.player.upgrades.AddAll(gameState.player.upgrades, IsGuuUpgrade);

            foreach (PlayerState.AmmoMode mode in original.player.ammo.Keys)
            {
                if (!gameState.player.ammo.ContainsKey(mode))
                {
                    continue;
                }

                int i = 0;
                foreach (AmmoDataV02 ammo in gameState.player.ammo[mode])
                {
                    if (ammo.id != Identifiable.Id.NONE && IsGuuIdentifiable(ammo.id))
                    {
                        original.player.ammo[mode][i].id = ammo.id;
                    }
                    original.player.ammo[mode][i].emotionData.emotionData.AddRange(ammo.emotionData.emotionData);
                    i++;
                }

                gameState.player.ammo.Remove(mode);
            }
            original.player.ammo.AddAll(gameState.player.ammo, pair => AmmoRegistry.IsAmmoModeRegistered(pair.Key));

            foreach (MailV02 mail in original.player.mail)
            {
                MailV02 mod = gameState.player.mail.Find(m => m.messageKey.Equals(mail.messageKey));
                if (mod != null)
                {
                    continue;
                }

                if (!mod.messageKey.Equals(string.Empty) && MailRegistry.IsMailRegistered(mod.messageKey))
                {
                    mail.messageKey = mod.messageKey;
                    mail.mailType   = mod.mailType;
                    mod.mailType    = MailDirector.Type.UPGRADE;
                }

                if (mod.mailType != MailDirector.Type.UPGRADE && MailRegistry.IsTypeRegistered(mod.mailType))
                {
                    mail.mailType = mod.mailType;
                }

                gameState.player.mail.RemoveAll(m => m.messageKey.Equals(mail.messageKey));
            }

            original.player.availUpgrades.AddAll(gameState.player.availUpgrades, IsGuuUpgrade);
            original.player.upgradeLocks.AddAll(gameState.player.upgradeLocks, IsGuuUpgrade);
            original.player.progress.AddAll(gameState.player.progress, pair => ProgressRegistry.IsTypeRegistered(pair.Key));
            original.player.delayedProgress.AddAll(gameState.player.delayedProgress, pair => ProgressRegistry.IsTrackerRegistered(pair.Key));
            original.player.blueprints.AddAll(gameState.player.blueprints, IsGuuGadget);
            original.player.availBlueprints.AddAll(gameState.player.availBlueprints, IsGuuGadget);
            original.player.blueprintLocks.AddAll(gameState.player.blueprintLocks, IsGuuGadget);
            original.player.gadgets.AddAll(gameState.player.gadgets, IsGuuGadget);
            original.player.craftMatCounts.AddAll(gameState.player.craftMatCounts, IsGuuIdentifiable);

            original.player.unlockedZoneMaps.AddRange(gameState.player.unlockedZoneMaps);

            if (gameState.player.regionSetId != RegionRegistry.RegionSetId.UNSET)
            {
                original.player.playerPos   = gameState.player.playerPos;
                original.player.regionSetId = gameState.player.regionSetId;
            }

            //? Decorizer
            original.player.decorizer.contents.AddAll(gameState.player.decorizer.contents, IsGuuIdentifiable);
            original.player.decorizer.settings.AddAll(gameState.player.decorizer.settings, pair => IsGuuIdentifiable(pair.Value.selected));

            //& Merge Ranch
            foreach (LandPlotV08 plot in original.ranch.plots)
            {
                LandPlotV08 mPlot = gameState.ranch.plots.Find(p => p.id.Equals(plot.id));
                if (mPlot == null)
                {
                    continue;
                }

                if (mPlot.typeId != LandPlot.Id.NONE)
                {
                    plot.typeId = mPlot.typeId;
                }
                if (mPlot.attachedId != SpawnResource.Id.NONE)
                {
                    plot.attachedId = mPlot.attachedId;
                }
                plot.upgrades.AddRange(plot.upgrades);

                foreach (SiloStorage.StorageType type in plot.siloAmmo.Keys)
                {
                    if (!mPlot.siloAmmo.ContainsKey(type))
                    {
                        continue;
                    }

                    int i = 0;
                    foreach (AmmoDataV02 ammo in mPlot.siloAmmo[type])
                    {
                        if (ammo.id != Identifiable.Id.NONE && IsGuuIdentifiable(ammo.id))
                        {
                            plot.siloAmmo[type][i].id = ammo.id;
                        }
                        plot.siloAmmo[type][i].emotionData.emotionData.AddRange(ammo.emotionData.emotionData);
                        i++;
                    }

                    mPlot.siloAmmo.Remove(type);
                }
                plot.siloAmmo.AddAll(mPlot.siloAmmo, pair => AmmoRegistry.IsStorageTypeRegistered(pair.Key));

                gameState.ranch.plots.RemoveAll(p => p.id.Equals(plot.id));
            }
            original.ranch.plots.AddRange(gameState.ranch.plots);

            original.ranch.accessDoorStates.AddAll(gameState.ranch.accessDoorStates, IsGuuID);
            original.ranch.palettes.AddAll(gameState.ranch.palettes, pair => ChromaPackRegistry.IsTypeRegistered(pair.Key) || ChromaPackRegistry.IsPaletteRegistered(pair.Value));
            original.ranch.ranchFastForward.AddAll(gameState.ranch.ranchFastForward, IsGuuID);

            //& Merge Actors
            foreach (ActorDataV09 actor in original.actors)
            {
                ActorDataV09 mActor = gameState.actors.Find(a => a.actorId == actor.actorId);
                if (mActor == null)
                {
                    continue;
                }

                actor.fashions.AddAll(mActor.fashions, IsGuuIdentifiable);
                actor.emotions.emotionData.AddRange(mActor.emotions.emotionData);
                if (mActor.regionSetId != RegionRegistry.RegionSetId.UNSET)
                {
                    actor.pos         = mActor.pos;
                    actor.regionSetId = mActor.regionSetId;
                }

                gameState.actors.RemoveAll(a => a.actorId == actor.actorId);
            }
            original.actors.AddRange(gameState.actors);

            //& Merge Pedia
            original.pedia.unlockedIds.AddRange(gameState.pedia.unlockedIds);
            original.pedia.completedTuts.AddRange(gameState.pedia.completedTuts);
            original.pedia.popupQueue.AddRange(gameState.pedia.popupQueue);

            //& Merge Achievements
            original.achieve.gameFloatStatDict.AddRange(gameState.achieve.gameFloatStatDict);
            original.achieve.gameDoubleStatDict.AddRange(gameState.achieve.gameDoubleStatDict);
            original.achieve.gameIntStatDict.AddRange(gameState.achieve.gameIntStatDict);

            foreach (AchievementsDirector.GameIdDictStat stat in original.achieve.gameIdDictStatDict.Keys)
            {
                if (!gameState.achieve.gameIdDictStatDict.ContainsKey(stat))
                {
                    continue;
                }
                original.achieve.gameIdDictStatDict[stat].AddAll(gameState.achieve.gameIdDictStatDict[stat], IsGuuIdentifiable);
                gameState.achieve.gameIdDictStatDict.Remove(stat);
            }
            original.achieve.gameIdDictStatDict.AddRange(gameState.achieve.gameIdDictStatDict);

            //& Merge Holiday
            original.holiday.eventGordos.AddAll(gameState.holiday.eventGordos, IsGuuID);
            original.holiday.eventEchoNoteGordos.AddAll(gameState.holiday.eventEchoNoteGordos, IsGuuID);

            //& Merge Appearances
            foreach (Identifiable.Id unlKey in original.appearances.unlocks.Keys)
            {
                if (!gameState.appearances.unlocks.ContainsKey(unlKey))
                {
                    continue;
                }
                original.appearances.unlocks[unlKey].AddRange(gameState.appearances.unlocks[unlKey]);
                gameState.appearances.unlocks.Remove(unlKey);
            }
            original.appearances.unlocks.AddAll(gameState.appearances.unlocks, IsGuuIdentifiable);

            foreach (Identifiable.Id selKey in original.appearances.selections.Keys)
            {
                if (!gameState.appearances.selections.ContainsKey(selKey))
                {
                    continue;
                }
                original.appearances.selections[selKey] = gameState.appearances.selections[selKey];
                gameState.appearances.selections.Remove(selKey);
            }
            original.appearances.selections.AddAll(gameState.appearances.selections, IsGuuIdentifiable);

            //& Merge Instrument
            original.instrument.unlocks.AddRange(gameState.instrument.unlocks);
            if (gameState.instrument.selection != InstrumentModel.Instrument.NONE)
            {
                original.instrument.selection = gameState.instrument.selection;
            }

            //& Runs the loading actions registered to SaveHandler
            OnLoad?.Invoke(gameState, saveName);

            //& Finalize the process
            saveName  = null;
            gameState = null;

            GuuCore.LOGGER.Log($"Loaded and injected modded save file {saveName}");
        }
Ejemplo n.º 18
0
        //! Patch: SavedGame.Save
        internal static void Save(GameV12 original)
        {
            GuuCore.LOGGER.Log("Attempting to save modded save file");
            gameState = new GameV12();

            //& Strip Summary
            if (IdentifiableRegistry.IsIdentifiableRegistered(original.summary.iconId))
            {
                gameState.summary.iconId = original.summary.iconId;
                original.summary.iconId  = FALLBACK_ICON;
            }

            //# Strip Game Mode

            //& Strip World
            StripByMatch(original.world.lastOfferRancherIds, gameState.world.lastOfferRancherIds, IsGuuID);
            StripByMatch(original.world.pendingOfferRancherIds, gameState.world.pendingOfferRancherIds, IsGuuID);
            //# Strip Weather

            StripByMatch(original.world.offers, gameState.world.offers, pair => IsGuuID(pair.Value.rancherId) || IsGuuID(pair.Value.offerId) || ExchangeRegistry.IsOfferTypeRegistered(pair.Key));
            foreach (ExchangeDirector.OfferType type in original.world.offers.Keys)
            {
                ExchangeOfferV04 ori = original.world.offers[type];
                ExchangeOfferV04 mod = new ExchangeOfferV04();

                StripByMatch(ori.requests, mod.requests, request => IsGuuIdentifiable(request.id) || ExchangeRegistry.IsNonIdenRegistered(request.nonIdentReward));
                StripByMatch(ori.rewards, mod.rewards, reward => IsGuuIdentifiable(reward.id) || ExchangeRegistry.IsNonIdenRegistered(reward.nonIdentReward));

                gameState.world.offers.Add(type, mod);
            }

            StripByMatch(original.world.econSaturations, gameState.world.econSaturations, IsGuuIdentifiable);
            StripByMatch(original.world.teleportNodeActivations, gameState.world.teleportNodeActivations, IsGuuID);
            StripByMatch(original.world.liquidSourceUnits, gameState.world.liquidSourceUnits, IsGuuID);

            StripByMatch(original.world.gordos, gameState.world.gordos, IsGuuID);
            foreach (KeyValuePair <string, GordoV01> gordo in original.world.gordos.Where(pair => pair.Value.fashions.Exists(IsGuuIdentifiable)))
            {
                gameState.world.gordos.Add(gordo.Key, new GordoV01());
                StripByMatch(gordo.Value.fashions, gameState.world.gordos[gordo.Key].fashions, IsGuuIdentifiable);
            }

            StripByMatch(original.world.placedGadgets, gameState.world.placedGadgets, IsGuuID);
            foreach (string id in original.world.placedGadgets.Keys)
            {
                PlacedGadgetV08 ori = original.world.placedGadgets[id];
                PlacedGadgetV08 mod = new PlacedGadgetV08();

                if (IsGuuGadget(ori.gadgetId))
                {
                    mod.gadgetId = ori.gadgetId;
                    ori.gadgetId = Gadget.Id.NONE;
                }

                foreach (AmmoDataV02 ammo in ori.ammo)
                {
                    AmmoDataV02 mAmmo = new AmmoDataV02();

                    if (IsGuuIdentifiable(ammo.id))
                    {
                        mAmmo.id = ammo.id;
                        ammo.id  = Identifiable.Id.NONE;
                    }

                    //# Strip Emotion Data
                }

                if (IsGuuIdentifiable(ori.baitTypeId))
                {
                    mod.baitTypeId = ori.baitTypeId;
                    ori.baitTypeId = Identifiable.Id.NONE;
                }

                if (IsGuuIdentifiable(ori.gordoTypeId))
                {
                    mod.gordoTypeId = ori.gordoTypeId;
                    ori.gordoTypeId = Identifiable.Id.NONE;
                }

                StripByMatch(ori.fashions, mod.fashions, IsGuuIdentifiable);

                if (ori.drone != null)
                {
                    mod.drone = new DroneGadgetV01
                    {
                        drone = new DroneV05()
                    };

                    AmmoDataV02 ammo  = ori.drone.drone.ammo;
                    AmmoDataV02 mAmmo = mod.drone.drone.ammo;

                    if (IsGuuIdentifiable(ammo.id))
                    {
                        mAmmo.id = ammo.id;
                        ammo.id  = Identifiable.Id.NONE;
                    }

                    //# Strip Emotion Data

                    StripByMatch(ori.drone.drone.fashions, mod.drone.drone.fashions, IsGuuIdentifiable);
                }

                gameState.world.placedGadgets.Add(id, mod);
            }

            StripByMatch(original.world.treasurePods, gameState.world.treasurePods, IsGuuID);
            foreach (KeyValuePair <string, TreasurePodV01> pod in original.world.treasurePods.Where(pair => pair.Value.spawnQueue.Exists(IsGuuIdentifiable)))
            {
                gameState.world.treasurePods.Add(pod.Key, new TreasurePodV01());
                StripByMatch(pod.Value.spawnQueue, gameState.world.treasurePods[pod.Key].spawnQueue, IsGuuIdentifiable);
            }

            StripByMatch(original.world.switches, gameState.world.switches, IsGuuID);
            StripByMatch(original.world.puzzleSlotsFilled, gameState.world.puzzleSlotsFilled, IsGuuID);
            StripByMatch(original.world.occupiedPhaseSites, gameState.world.occupiedPhaseSites, IsGuuID);
            StripByMatch(original.world.quicksilverEnergyGenerators, gameState.world.quicksilverEnergyGenerators, IsGuuID);
            StripByMatch(original.world.oasisStates, gameState.world.oasisStates, IsGuuID);
            StripByMatch(original.world.activeGingerPatches, gameState.world.activeGingerPatches, IsGuuID);
            StripByMatch(original.world.echoNoteGordos, gameState.world.echoNoteGordos, IsGuuID);

            //? Slimeulation
            StripByMatch(original.world.glitch.teleporters, gameState.world.glitch.teleporters, IsGuuID);
            StripByMatch(original.world.glitch.nodes, gameState.world.glitch.nodes, IsGuuID);
            StripByMatch(original.world.glitch.impostoDirectors, gameState.world.glitch.impostoDirectors, IsGuuID);
            StripByMatch(original.world.glitch.impostos, gameState.world.glitch.impostos, IsGuuID);
            StripByMatch(original.world.glitch.slimes, gameState.world.glitch.slimes, IsGuuID);
            StripByMatch(original.world.glitch.storage, gameState.world.glitch.storage, IsGuuID);
            StripByMatch(original.world.glitch.storage, gameState.world.glitch.storage, pair => IsGuuIdentifiable(pair.Value.id));

            //& Strip Player
            //# Strip Game Mode

            if (IsGuuIdentifiable(original.player.gameIconId))
            {
                gameState.player.gameIconId = original.player.gameIconId;
                original.player.gameIconId  = FALLBACK_ICON;
            }

            StripByMatch(original.player.upgrades, gameState.player.upgrades, IsGuuUpgrade);

            StripByMatch(original.player.ammo, gameState.player.ammo, pair => AmmoRegistry.IsAmmoModeRegistered(pair.Key));
            foreach (KeyValuePair <PlayerState.AmmoMode, List <AmmoDataV02> > ammoList in original.player.ammo)
            {
                List <AmmoDataV02> moddedList = new List <AmmoDataV02>();
                foreach (AmmoDataV02 ammo in ammoList.Value)
                {
                    AmmoDataV02 data = new AmmoDataV02();

                    if (IsGuuIdentifiable(ammo.id))
                    {
                        data.id = ammo.id;
                        ammo.id = Identifiable.Id.NONE;
                    }

                    //# Strip Emotions

                    moddedList.Add(data);
                }

                if (moddedList.Count > 0)
                {
                    gameState.player.ammo[ammoList.Key] = moddedList;
                }
            }

            foreach (MailV02 mail in original.player.mail)
            {
                MailV02 mod = new MailV02
                {
                    messageKey = string.Empty,
                    mailType   = MailDirector.Type.UPGRADE
                };

                if (MailRegistry.IsTypeRegistered(mail.mailType))
                {
                    mod.mailType  = mail.mailType;
                    mail.mailType = MailDirector.Type.PERSONAL;
                }

                if (MailRegistry.IsMailRegistered(mail.messageKey))
                {
                    mod.messageKey = mail.messageKey;
                    if (mod.mailType == MailDirector.Type.UPGRADE)
                    {
                        mod.mailType = mail.mailType;
                    }
                    mail.mailType = MailDirector.Type.UPGRADE;
                }

                gameState.player.mail.Add(mod);
            }

            StripByMatch(original.player.availUpgrades, gameState.player.availUpgrades, IsGuuUpgrade);
            StripByMatch(original.player.upgradeLocks, gameState.player.upgradeLocks, IsGuuUpgrade);
            StripByMatch(original.player.progress, gameState.player.progress, pair => ProgressRegistry.IsTypeRegistered(pair.Key));
            StripByMatch(original.player.delayedProgress, gameState.player.delayedProgress, pair => ProgressRegistry.IsTrackerRegistered(pair.Key));
            StripByMatch(original.player.blueprints, gameState.player.blueprints, IsGuuGadget);
            StripByMatch(original.player.availBlueprints, gameState.player.availBlueprints, IsGuuGadget);
            StripByMatch(original.player.blueprintLocks, gameState.player.blueprintLocks, IsGuuGadget);
            StripByMatch(original.player.gadgets, gameState.player.gadgets, IsGuuGadget);
            StripByMatch(original.player.craftMatCounts, gameState.player.craftMatCounts, IsGuuIdentifiable);

            //# Strip Region Set ID && Player Pos
            //# Strip Unlocked Zone

            //? Decorizer
            StripByMatch(original.player.decorizer.contents, gameState.player.decorizer.contents, IsGuuIdentifiable);
            StripByMatch(original.player.decorizer.settings, gameState.player.decorizer.settings, IsGuuID);
            StripByMatch(original.player.decorizer.settings, gameState.player.decorizer.settings, pair => IsGuuIdentifiable(pair.Value.selected));

            //& Strip Ranch
            //# Strip Plots

            StripByMatch(original.ranch.accessDoorStates, gameState.ranch.accessDoorStates, IsGuuID);
            StripByMatch(original.ranch.palettes, gameState.ranch.palettes, pair => ChromaPackRegistry.IsTypeRegistered(pair.Key) || ChromaPackRegistry.IsPaletteRegistered(pair.Value));
            StripByMatch(original.ranch.ranchFastForward, gameState.ranch.ranchFastForward, IsGuuID);

            //& Strip Actors
            StripByMatch(original.actors, gameState.actors, actor => IsGuuID(actor.actorId));
            foreach (ActorDataV09 actor in original.actors)
            {
                ActorDataV09 newActor = new ActorDataV09();
                // ReSharper disable once ReplaceWithSingleAssignment.False
                bool hasData = false;

                //# Strip Emotions

                if (actor.fashions.Exists(IsGuuIdentifiable))
                {
                    hasData = true;
                    StripByMatch(actor.fashions, newActor.fashions, IsGuuIdentifiable);
                }

                //# Strip Region Set && Position

                if (hasData)
                {
                    gameState.actors.Add(newActor);
                }
            }

            //& Strip Pedia
            //# Strip Unlocked IDs
            //# Strip Completed Tuts
            //# Strip Popup Queue

            //& Strip Achievements
            //# Strip Float Stats
            //# Strip Double Stats
            //# Strip Int Stats

            //# Strip ID Stats by Key
            foreach (KeyValuePair <AchievementsDirector.GameIdDictStat, Dictionary <Identifiable.Id, int> > idDictStat in original.achieve.gameIdDictStatDict.Where(pair => pair.Value.Count(pair2 => IsGuuIdentifiable(pair2.Key)) > 0))
            {
                gameState.achieve.gameIdDictStatDict[idDictStat.Key] = new Dictionary <Identifiable.Id, int>();
                StripByMatch(idDictStat.Value, gameState.achieve.gameIdDictStatDict[idDictStat.Key], IsGuuIdentifiable);
            }

            //& Strip Holidays
            StripByMatch(original.holiday.eventGordos, gameState.holiday.eventGordos, IsGuuID);
            StripByMatch(original.holiday.eventEchoNoteGordos, gameState.holiday.eventEchoNoteGordos, IsGuuID);

            //& Strip Appearances
            StripByMatch(original.appearances.unlocks, gameState.appearances.unlocks, IsGuuIdentifiable);
            //# Strip Unlocks based on Appearance Sets

            StripByMatch(original.appearances.selections, gameState.appearances.selections, IsGuuIdentifiable);
            //# Strip Selections based on Appearance Sets

            //& Strip Instruments
            //# Strip Unlocks
            //# Strip Selection

            // TODO: Strip content from the original
        }