예제 #1
0
        private void RecalculateModifierAvailability()
        {
            if (!NetworkServer.active)
            {
                Debug.LogWarning("[Server] function 'System.Void RoR2.PreGameController::RecalculateModifierAvailability()' called on client");
                return;
            }
            for (int i = 0; i < RuleCatalog.choiceCount; i++)
            {
                RuleChoiceDef choiceDef = RuleCatalog.GetChoiceDef(i);
                bool          flag      = string.IsNullOrEmpty(choiceDef.unlockableName);
                if (!flag)
                {
                    UnlockableDef unlockableDef = UnlockableCatalog.GetUnlockableDef(choiceDef.unlockableName);
                    if (unlockableDef != null)
                    {
                        flag = PreGameController.AnyUserHasUnlockable(unlockableDef);
                    }
                }
                this.unlockedChoiceMask[i] = flag;
            }
            this.ResolveChoiceMask();
            Action <PreGameController> action = PreGameController.onServerRecalculatedModifierAvailability;

            if (action == null)
            {
                return;
            }
            action(this);
        }
예제 #2
0
        public void GrantUnlock(Interactor interactor)
        {
            if (!NetworkServer.active)
            {
                Debug.LogWarning("[Server] function 'System.Void RoR2.BlueprintTerminal::GrantUnlock(RoR2.Interactor)' called on client");
                return;
            }
            this.SetHasBeenPurchased(true);
            string unlockableName = this.unlockableOptions[this.unlockableChoice].unlockableName;

            EffectManager.SpawnEffect(this.unlockEffect, new EffectData
            {
                origin = base.transform.position
            }, true);
            if (Run.instance)
            {
                Util.PlaySound(this.unlockSoundString, interactor.gameObject);
                CharacterBody component = interactor.GetComponent <CharacterBody>();
                Run.instance.GrantUnlockToSinglePlayer(unlockableName, component);
                string        pickupToken   = "???";
                UnlockableDef unlockableDef = UnlockableCatalog.GetUnlockableDef(unlockableName);
                if (unlockableDef != null)
                {
                    pickupToken = unlockableDef.nameToken;
                }
                Chat.SendBroadcastChat(new Chat.PlayerPickupChatMessage
                {
                    subjectAsCharacterBody = component,
                    baseToken      = "PLAYER_PICKUP",
                    pickupToken    = pickupToken,
                    pickupColor    = ColorCatalog.GetColor(ColorCatalog.ColorIndex.Unlockable),
                    pickupQuantity = 1U
                });
            }
        }
예제 #3
0
 public void GrantUnlock(Interactor interactor)
 {
     if (!NetworkServer.active)
     {
         Debug.LogWarning("[Server] function 'System.Void RoR2.RadiotowerTerminal::GrantUnlock(RoR2.Interactor)' called on client");
         return;
     }
     EffectManager.instance.SpawnEffect(this.unlockEffect, new EffectData
     {
         origin = base.transform.position
     }, true);
     this.SetHasBeenPurchased(true);
     if (Run.instance)
     {
         Util.PlaySound(this.unlockSoundString, interactor.gameObject);
         Run.instance.GrantUnlockToAllParticipatingPlayers(this.unlockableName);
         string        pickupToken   = "???";
         UnlockableDef unlockableDef = UnlockableCatalog.GetUnlockableDef(this.unlockableName);
         if (unlockableDef != null)
         {
             pickupToken = unlockableDef.nameToken;
         }
         Chat.SendBroadcastChat(new Chat.PlayerPickupChatMessage
         {
             subjectCharacterBodyGameObject = interactor.gameObject,
             baseToken      = "PLAYER_PICKUP",
             pickupToken    = pickupToken,
             pickupColor    = ColorCatalog.GetColor(ColorCatalog.ColorIndex.Unlockable),
             pickupQuantity = 1u
         });
     }
 }
예제 #4
0
 // Token: 0x06000B81 RID: 2945 RVA: 0x0004C07C File Offset: 0x0004A27C
 private void Awake()
 {
     this.unlockableProgressionDefs = new UnlockableDef[this.unlockableProgression.Length];
     for (int i = 0; i < this.unlockableProgressionDefs.Length; i++)
     {
         this.unlockableProgressionDefs[i] = UnlockableCatalog.GetUnlockableDef(this.unlockableProgression[i]);
     }
 }
예제 #5
0
        // Token: 0x06001B2E RID: 6958 RVA: 0x00073E9C File Offset: 0x0007209C
        public static int GetUnlockableSortScore(string unlockableName)
        {
            UnlockableDef unlockableDef = UnlockableCatalog.GetUnlockableDef(unlockableName);

            if (unlockableDef == null)
            {
                return(0);
            }
            return(unlockableDef.sortScore);
        }
예제 #6
0
        public void CmdReportUnlock(UnlockableIndex unlockIndex)
        {
            Debug.LogFormat("NetworkUser.CmdReportUnlock({0})", new object[]
            {
                unlockIndex
            });
            UnlockableDef unlockableDef = UnlockableCatalog.GetUnlockableDef(unlockIndex);

            if (unlockableDef != null)
            {
                this.ServerHandleUnlock(unlockableDef);
            }
        }
예제 #7
0
        // Token: 0x06000B85 RID: 2949 RVA: 0x0004C150 File Offset: 0x0004A350
        private static bool ActivatorHasUnlockable(Interactor activator, string unlockableName)
        {
            NetworkUser networkUser = Util.LookUpBodyNetworkUser(activator.gameObject);

            if (!networkUser)
            {
                return(true);
            }
            LocalUser localUser = networkUser.localUser;

            if (localUser != null)
            {
                return(localUser.userProfile.HasUnlockable(unlockableName));
            }
            return(networkUser.unlockables.Contains(UnlockableCatalog.GetUnlockableDef(unlockableName)));
        }
예제 #8
0
 // Token: 0x06000390 RID: 912 RVA: 0x0000DF50 File Offset: 0x0000C150
 private static void SortAchievements(AchievementDef[] achievementDefsArray)
 {
     AchievementManager.AchievementSortPair[] array = new AchievementManager.AchievementSortPair[achievementDefsArray.Length];
     for (int i = 0; i < array.Length; i++)
     {
         array[i] = new AchievementManager.AchievementSortPair
         {
             score          = UnlockableCatalog.GetUnlockableSortScore(achievementDefsArray[i].unlockableRewardIdentifier),
             achievementDef = achievementDefsArray[i]
         };
     }
     Array.Sort <AchievementManager.AchievementSortPair>(array, (AchievementManager.AchievementSortPair a, AchievementManager.AchievementSortPair b) => a.score - b.score);
     for (int j = 0; j < array.Length; j++)
     {
         achievementDefsArray[j] = array[j].achievementDef;
     }
 }
예제 #9
0
        // Token: 0x06001B91 RID: 7057 RVA: 0x00081100 File Offset: 0x0007F300
        private static int GuessUnlockableSortScore(string unlockableName)
        {
            int           num           = 0;
            UnlockableDef unlockableDef = UnlockableCatalog.GetUnlockableDef(unlockableName);

            if (unlockableDef == null)
            {
                return(num);
            }
            num += 200;
            ItemDef itemDef = ItemCatalog.allItems.Select(new Func <ItemIndex, ItemDef>(ItemCatalog.GetItemDef)).FirstOrDefault((ItemDef v) => v.unlockableName == unlockableDef.name);

            if (itemDef != null)
            {
                return((int)(num + itemDef.tier));
            }
            num += 200;
            EquipmentDef equipmentDef = EquipmentCatalog.allEquipment.Select(new Func <EquipmentIndex, EquipmentDef>(EquipmentCatalog.GetEquipmentDef)).FirstOrDefault((EquipmentDef v) => v.unlockableName == unlockableDef.name);

            if (equipmentDef != null)
            {
                if (equipmentDef.isBoss)
                {
                    return(num + 1);
                }
                if (equipmentDef.isLunar)
                {
                    return(num - 1);
                }
                return(num);
            }
            else
            {
                num += 200;
                if (SurvivorCatalog.allSurvivorDefs.FirstOrDefault((SurvivorDef v) => v.unlockableName == unlockableDef.name) != null)
                {
                    return(num);
                }
                return(num + 200);
            }
        }
예제 #10
0
        // Token: 0x06000674 RID: 1652 RVA: 0x0001A624 File Offset: 0x00018824
        private void Rebuild()
        {
            BlueprintTerminal.UnlockableOption unlockableOption = this.unlockableOptions[this.unlockableChoice];
            if (this.displayInstance)
            {
                UnityEngine.Object.Destroy(this.displayInstance);
            }
            this.displayBaseTransform.gameObject.SetActive(!this.hasBeenPurchased);
            if (!this.hasBeenPurchased && this.displayBaseTransform)
            {
                Debug.Log("Found base");
                UnlockableDef unlockableDef = UnlockableCatalog.GetUnlockableDef(unlockableOption.unlockableName);
                if (unlockableDef != null)
                {
                    Debug.Log("Found unlockable");
                    GameObject gameObject = Resources.Load <GameObject>(unlockableDef.displayModelPath);
                    if (gameObject)
                    {
                        Debug.Log("Found prefab");
                        this.displayInstance = UnityEngine.Object.Instantiate <GameObject>(gameObject, this.displayBaseTransform.position, this.displayBaseTransform.transform.rotation, this.displayBaseTransform);
                        Renderer componentInChildren = this.displayInstance.GetComponentInChildren <Renderer>();
                        float    num = 1f;
                        if (componentInChildren)
                        {
                            this.displayInstance.transform.rotation = Quaternion.identity;
                            Vector3 size = componentInChildren.bounds.size;
                            float   f    = size.x * size.y * size.z;
                            num *= Mathf.Pow(this.idealDisplayVolume, 0.33333334f) / Mathf.Pow(f, 0.33333334f);
                        }
                        this.displayInstance.transform.localScale = new Vector3(num, num, num);
                    }
                }
            }
            PurchaseInteraction component = base.GetComponent <PurchaseInteraction>();

            if (component)
            {
                component.Networkcost = unlockableOption.cost;
            }
        }
예제 #11
0
        private void CmdSendNewUnlockables(UnlockableIndex[] newUnlockableIndices)
        {
            this.unlockables.Clear();
            this.debugUnlockablesList.Clear();
            int i   = 0;
            int num = newUnlockableIndices.Length;

            while (i < num)
            {
                UnlockableDef unlockableDef = UnlockableCatalog.GetUnlockableDef(newUnlockableIndices[i]);
                if (unlockableDef != null)
                {
                    this.unlockables.Add(unlockableDef);
                    this.debugUnlockablesList.Add(unlockableDef.name);
                }
                i++;
            }
            NetworkUser.NetworkUserGenericDelegate onNetworkUserUnlockablesUpdated = NetworkUser.OnNetworkUserUnlockablesUpdated;
            if (onNetworkUserUnlockablesUpdated == null)
            {
                return;
            }
            onNetworkUserUnlockablesUpdated(this);
        }
 // Token: 0x06001730 RID: 5936 RVA: 0x0006E220 File Offset: 0x0006C420
 private void GrantPickup(GameObject activator)
 {
     if (Run.instance)
     {
         Util.PlaySound(UnlockPickup.itemPickupSoundString, activator);
         Run.instance.GrantUnlockToAllParticipatingPlayers(this.unlockableName);
         string        pickupToken   = "???";
         UnlockableDef unlockableDef = UnlockableCatalog.GetUnlockableDef(this.unlockableName);
         if (unlockableDef != null)
         {
             pickupToken = unlockableDef.nameToken;
         }
         Chat.SendBroadcastChat(new Chat.PlayerPickupChatMessage
         {
             subjectCharacterBodyGameObject = activator,
             baseToken      = "PLAYER_PICKUP",
             pickupToken    = pickupToken,
             pickupColor    = ColorCatalog.GetColor(ColorCatalog.ColorIndex.Unlockable),
             pickupQuantity = 1u
         });
         this.consumed = true;
         UnityEngine.Object.Destroy(base.transform.root.gameObject);
     }
 }
예제 #13
0
 private static void Init()
 {
     UnlockableCatalog.RegisterUnlockable("Logs.BeetleBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_BEETLE"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.BeetleGuardBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_BEETLEGUARD"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.BeetleQueenBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_BEETLEQUEEN"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.BisonBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_BISON"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.ClayBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_CLAY"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.ClayBossBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_CLAYBOSS"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.GolemBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_GOLEM"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.TitanBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_TITAN"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.TitanGoldBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_TITANGOLD"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.ImpBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_IMP"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.JellyfishBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_JELLYFISH"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.VagrantBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_VAGRANT"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.LemurianBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_LEMURIAN"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.MagmaWormBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_MAGMAWORM"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.WispBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_WISP"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.GreaterWispBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_GREATERWISP"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.AncientWispBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_ANCIENTWISP"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.HermitCrabBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_HERMITCRAB"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.BellBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_BELL"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.LemurianBruiserBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_LEMURIANBRUISER"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.ImpBossBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_IMPBOSS"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.ShopkeeperBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_SHOPKEEPER"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.ElectricWormBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_ELECTRICWORM"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.ClayBruiserBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_CLAYBRUISER"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.GravekeeperBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_GRAVEKEEPER"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.VultureBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_VULTURE"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.RoboBallBossBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_ROBOBALLBOSS"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.RoboBallMiniBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_ROBOBALLMINI"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.SuperRoboBallBossBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_SUPERROBOBALLBOSS"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.Nullifier.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_NULLIFIER"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.Scav.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_SCAV"
     });
     UnlockableCatalog.RegisterUnlockable("Characters.Huntress", new UnlockableDef
     {
         nameToken = "HUNTRESS_BODY_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Characters.Bandit", new UnlockableDef
     {
         nameToken = "BANDIT_BODY_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Characters.Engineer", new UnlockableDef
     {
         nameToken = "ENGI_BODY_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Characters.Mercenary", new UnlockableDef
     {
         nameToken = "MERC_BODY_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Characters.Mage", new UnlockableDef
     {
         nameToken = "MAGE_BODY_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Characters.Toolbot", new UnlockableDef
     {
         nameToken = "TOOLBOT_BODY_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Characters.Treebot", new UnlockableDef
     {
         nameToken = "TREEBOT_BODY_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Characters.Loader", new UnlockableDef
     {
         nameToken = "LOADER_BODY_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Characters.Croco", new UnlockableDef
     {
         nameToken = "CROCO_BODY_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.ExtraLife", new UnlockableDef
     {
         nameToken = "ITEM_EXTRALIFE_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.BFG", new UnlockableDef
     {
         nameToken = "EQUIPMENT_BFG_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.ShockNearby", new UnlockableDef
     {
         nameToken = "ITEM_SHOCKNEARBY_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.AttackSpeedOnCrit", new UnlockableDef
     {
         nameToken = "ITEM_ATTACKSPEEDONCRIT_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.Infusion", new UnlockableDef
     {
         nameToken = "ITEM_INFUSION_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.Medkit", new UnlockableDef
     {
         nameToken = "ITEM_MEDKIT_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.Bear", new UnlockableDef
     {
         nameToken = "ITEM_BEAR_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.Clover", new UnlockableDef
     {
         nameToken = "ITEM_CLOVER_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.GoldGat", new UnlockableDef
     {
         nameToken = "EQUIPMENT_GOLDGAT_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.EquipmentMagazine", new UnlockableDef
     {
         nameToken = "ITEM_EQUIPMENTMAGAZINE_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.DroneBackup", new UnlockableDef
     {
         nameToken = "EQUIPMENT_DRONEBACKUP_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.Firework", new UnlockableDef
     {
         nameToken = "ITEM_FIREWORK_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.WarCryOnMultiKill", new UnlockableDef
     {
         nameToken = "ITEM_WARCRYONMULTIKILL_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.Lightning", new UnlockableDef
     {
         nameToken = "EQUIPMENT_LIGHTNING_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.PassiveHealing", new UnlockableDef
     {
         nameToken = "EQUIPMENT_PASSIVEHEALING_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.Meteor", new UnlockableDef
     {
         nameToken = "EQUIPMENT_METEOR_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.BurnNearby", new UnlockableDef
     {
         nameToken = "EQUIPMENT_BURNNEARBY_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.AutoCastEquipment", new UnlockableDef
     {
         nameToken = "ITEM_AUTOCASTEQUIPMENT_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.HealOnCrit", new UnlockableDef
     {
         nameToken = "EQUIPMENT_HEALONCRIT_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.ElementalRings", new UnlockableDef
     {
         nameToken = "ITEM_ELEMENTALRINGS_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.Scanner", new UnlockableDef
     {
         nameToken = "EQUIPMENT_SCANNER_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.Talisman", new UnlockableDef
     {
         nameToken = "ITEM_TALISMAN_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.BossDamageBonus", new UnlockableDef
     {
         nameToken = "ITEM_BOSSDAMAGEBONUS_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.KillEliteFrenzy", new UnlockableDef
     {
         nameToken = "ITEM_KILLELITEFRENZY_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.SecondarySkillMagazine", new UnlockableDef
     {
         nameToken = "ITEM_SECONDARYSKILLMAGAZINE_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.JumpBoost", new UnlockableDef
     {
         nameToken = "ITEM_JUMPBOOST_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.Crowbar", new UnlockableDef
     {
         nameToken = "ITEM_CROWBAR_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.Hoof", new UnlockableDef
     {
         nameToken = "ITEM_HOOF_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.BounceNearby", new UnlockableDef
     {
         nameToken = "ITEM_BOUNCENEARBY_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.TreasureCache", new UnlockableDef
     {
         nameToken = "ITEM_TREASURECACHE_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.RepeatHeal", new UnlockableDef
     {
         nameToken = "ITEM_REPEATHEAL_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.NovaOnHeal", new UnlockableDef
     {
         nameToken = "ITEM_NOVAONHEAL_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.CrippleWardOnLevel", new UnlockableDef
     {
         nameToken = "ITEM_CRIPPLEWARDONLEVEL_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.IncreaseHealing", new UnlockableDef
     {
         nameToken = "ITEM_INCREASEHEALING_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.Gateway", new UnlockableDef
     {
         nameToken = "EQUIPMENT_GATEWAY_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.Tonic", new UnlockableDef
     {
         nameToken = "EQUIPMENT_TONIC_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.ExecuteLowHealthElite", new UnlockableDef
     {
         nameToken = "ITEM_EXECUTELOWHEALTHELITE_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.EnergizedOnEquipmentUse", new UnlockableDef
     {
         nameToken = "ITEM_ENERGIZEDONEQUIPMENTUSE_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.Cleanse", new UnlockableDef
     {
         nameToken = "EQUIPMENT_CLEANSE_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.LunarSkillReplacements", new UnlockableDef
     {
         nameToken = "ITEM_LUNARSKILLREPLACEMENTS_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Skills.Commando.FireShotgunBlast", new UnlockableDef
     {
         nameToken = "COMMANDO_SECONDARY_ALT1_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Skills.Commando.ThrowGrenade", new UnlockableDef
     {
         nameToken = "COMMANDO_SPECIAL_ALT1_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Skills.Toolbot.Grenade", new UnlockableDef
     {
         nameToken = "TOOLBOT_PRIMARY_ALT2_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Skills.Toolbot.Buzzsaw", new UnlockableDef
     {
         nameToken = "TOOLBOT_PRIMARY_ALT3_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Skills.Merc.Uppercut", new UnlockableDef
     {
         nameToken = "MERC_SECONDARY_ALT1_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Skills.Merc.EvisProjectile", new UnlockableDef
     {
         nameToken = "MERC_SPECIAL_ALT1_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Skills.Huntress.MiniBlink", new UnlockableDef
     {
         nameToken = "HUNTRESS_UTILITY_ALT1_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Skills.Huntress.Snipe", new UnlockableDef
     {
         nameToken = "HUNTRESS_SPECIAL_ALT1_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Skills.Engi.WalkerTurret", new UnlockableDef
     {
         nameToken = "ENGI_SPECIAL_ALT1_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Skills.Engi.SpiderMine", new UnlockableDef
     {
         nameToken = "ENGI_SPIDERMINE_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Skills.Treebot.Barrage", new UnlockableDef
     {
         nameToken = "TREEBOT_SECONDARY_ALT1_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Skills.Treebot.PlantSonicBoom", new UnlockableDef
     {
         nameToken = "TREEBOT_UTILITY_ALT1_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Skills.Mage.IceBomb", new UnlockableDef
     {
         nameToken = "MAGE_SECONDARY_ICE_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Skills.Mage.FlyUp", new UnlockableDef
     {
         nameToken = "MAGE_SPECIAL_LIGHTNING_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Skills.Mage.LightningBolt", new UnlockableDef
     {
         nameToken = "MAGE_PRIMARY_ICE_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Skills.Loader.YankHook", new UnlockableDef
     {
         nameToken = "LOADER_YANKHOOK_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Skills.Loader.ZapFist", new UnlockableDef
     {
         nameToken = "LOADER_UTILITY_ALT1_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Skills.Croco.ChainableLeap", new UnlockableDef
     {
         nameToken = "CROCO_SKILL_CHAINABLELEAP_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Skins.Commando.Alt1", new UnlockableDef
     {
         nameToken = "COMMANDO_SKIN_ALT1_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Skins.Huntress.Alt1", new UnlockableDef
     {
         nameToken = "HUNTRESS_SKIN_ALT1_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Skins.Mage.Alt1", new UnlockableDef
     {
         nameToken = "MAGE_SKIN_ALT1_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Skins.Merc.Alt1", new UnlockableDef
     {
         nameToken = "MERC_SKIN_ALT1_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Skins.Toolbot.Alt1", new UnlockableDef
     {
         nameToken = "TOOLBOT_SKIN_ALT1_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Skins.Treebot.Alt1", new UnlockableDef
     {
         nameToken = "TREEBOT_SKIN_ALT1_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Skins.Loader.Alt1", new UnlockableDef
     {
         nameToken = "LOADER_SKIN_ALT1_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Skins.Croco.Alt1", new UnlockableDef
     {
         nameToken = "CROCO_SKIN_ALT1_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.ShieldOnly", new UnlockableDef
     {
         nameToken        = "UNLOCKABLE_BLUEPRINT_SHIELDONLY",
         displayModelPath = "Prefabs/PickupModels/PickupShieldBug"
     });
     UnlockableCatalog.RegisterUnlockable("Shop.BonusLunar.1", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_SHOP_BONUS_LUNAR_1"
     });
     UnlockableCatalog.RegisterUnlockable("Shop.BonusLunar.2", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_SHOP_BONUS_LUNAR_2"
     });
     UnlockableCatalog.RegisterUnlockable("Shop.BonusLunar.3", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_SHOP_BONUS_LUNAR_3"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.Stages.blackbeach", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_STAGES_BLACKBEACH"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.Stages.goolake", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_STAGES_GOOLAKE"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.Stages.bazaar", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_STAGES_BAZAAR"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.Stages.frozenwall", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_STAGES_FROZENWALL"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.Stages.golemplains", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_STAGES_GOLEMPLAINS"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.Stages.foggyswamp", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_STAGES_FOGGYSWAMP"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.Stages.dampcavesimple", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_STAGES_DAMPCAVE"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.Stages.mysteryspace", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_STAGES_MYSTERYSPACE"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.Stages.wispgraveyard", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_STAGES_WISPGRAVEYARD"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.Stages.goldshores", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_STAGES_GOLDSHORES"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.Stages.shipgraveyard", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_STAGES_SHIPGRAVEYARD"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.Stages.arena", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_STAGES_ARENA"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.Stages.limbo", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_STAGES_LIMBO"
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.blackbeach.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.blackbeach.1", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.blackbeach.2", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.goolake.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.goolake.1", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.goolake.2", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.bazaar.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.bazaar.1", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.bazaar.2", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.frozenwall.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.frozenwall.1", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.frozenwall.2", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.golemplains.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.golemplains.1", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.golemplains.2", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.foggyswamp.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.foggyswamp.1", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.foggyswamp.2", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.dampcavesimple.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.dampcavesimple.1", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.dampcavesimple.2", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.wispgraveyard.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.wispgraveyard.1", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.wispgraveyard.2", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.shipgraveyard.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.shipgraveyard.1", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.shipgraveyard.2", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.golemplains2.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.golemplains2.1", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.golemplains2.2", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.golemplains2.3", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.blackbeach2.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.blackbeach2.1", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.blackbeach2.2", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.indexToDefTable = new UnlockableDef[UnlockableCatalog.nameToDefTable.Count];
     foreach (KeyValuePair <string, UnlockableDef> keyValuePair in UnlockableCatalog.nameToDefTable)
     {
         UnlockableCatalog.indexToDefTable[keyValuePair.Value.index.value] = keyValuePair.Value;
     }
     for (int i = 0; i < UnlockableCatalog.indexToDefTable.Length; i++)
     {
         UnlockableDef unlockableDef = UnlockableCatalog.indexToDefTable[i];
         unlockableDef.sortScore = UnlockableCatalog.GuessUnlockableSortScore(unlockableDef);
     }
 }
예제 #14
0
        // Token: 0x0600038F RID: 911 RVA: 0x0000DB78 File Offset: 0x0000BD78
        public static void CollectAchievementDefs(Dictionary <string, AchievementDef> map)
        {
            List <AchievementDef> list = new List <AchievementDef>();

            map.Clear();
            foreach (Type type2 in from type in typeof(BaseAchievement).Assembly.GetTypes()
                     where type.IsSubclassOf(typeof(BaseAchievement))
                     orderby type.Name
                     select type)
            {
                RegisterAchievementAttribute registerAchievementAttribute = (RegisterAchievementAttribute)type2.GetCustomAttributes(false).FirstOrDefault((object v) => v is RegisterAchievementAttribute);
                if (registerAchievementAttribute != null)
                {
                    if (map.ContainsKey(registerAchievementAttribute.identifier))
                    {
                        Debug.LogErrorFormat("Class {0} attempted to register as achievement {1}, but class {2} has already registered as that achievement.", new object[]
                        {
                            type2.FullName,
                            registerAchievementAttribute.identifier,
                            AchievementManager.achievementNamesToDefs[registerAchievementAttribute.identifier].type.FullName
                        });
                    }
                    else
                    {
                        AchievementDef achievementDef = new AchievementDef
                        {
                            identifier = registerAchievementAttribute.identifier,
                            unlockableRewardIdentifier        = registerAchievementAttribute.unlockableRewardIdentifier,
                            prerequisiteAchievementIdentifier = registerAchievementAttribute.prerequisiteAchievementIdentifier,
                            nameToken         = "ACHIEVEMENT_" + registerAchievementAttribute.identifier.ToUpper(CultureInfo.InvariantCulture) + "_NAME",
                            descriptionToken  = "ACHIEVEMENT_" + registerAchievementAttribute.identifier.ToUpper(CultureInfo.InvariantCulture) + "_DESCRIPTION",
                            iconPath          = "Textures/AchievementIcons/tex" + registerAchievementAttribute.identifier + "Icon",
                            type              = type2,
                            serverTrackerType = registerAchievementAttribute.serverTrackerType
                        };
                        AchievementManager.achievementIdentifiers.Add(registerAchievementAttribute.identifier);
                        map.Add(registerAchievementAttribute.identifier, achievementDef);
                        list.Add(achievementDef);
                        UnlockableDef unlockableDef = UnlockableCatalog.GetUnlockableDef(achievementDef.unlockableRewardIdentifier);
                        if (unlockableDef != null)
                        {
                            unlockableDef.getHowToUnlockString = (() => Language.GetStringFormatted("UNLOCK_VIA_ACHIEVEMENT_FORMAT", new object[]
                            {
                                Language.GetString(achievementDef.nameToken),
                                Language.GetString(achievementDef.descriptionToken)
                            }));
                            unlockableDef.getUnlockedString = (() => Language.GetStringFormatted("UNLOCKED_FORMAT", new object[]
                            {
                                unlockableDef.getHowToUnlockString()
                            }));
                        }
                    }
                }
            }
            AchievementManager.achievementDefs = list.ToArray();
            AchievementManager.SortAchievements(AchievementManager.achievementDefs);
            AchievementManager.serverAchievementDefs = (from achievementDef in AchievementManager.achievementDefs
                                                        where achievementDef.serverTrackerType != null
                                                        select achievementDef).ToArray <AchievementDef>();
            for (int i = 0; i < AchievementManager.achievementDefs.Length; i++)
            {
                AchievementManager.achievementDefs[i].index = new AchievementIndex
                {
                    intValue = i
                };
            }
            for (int j = 0; j < AchievementManager.serverAchievementDefs.Length; j++)
            {
                AchievementManager.serverAchievementDefs[j].serverIndex = new ServerAchievementIndex
                {
                    intValue = j
                };
            }
            for (int k = 0; k < AchievementManager.achievementIdentifiers.Count; k++)
            {
                string currentAchievementIdentifier = AchievementManager.achievementIdentifiers[k];
                map[currentAchievementIdentifier].childAchievementIdentifiers = (from v in AchievementManager.achievementIdentifiers
                                                                                 where map[v].prerequisiteAchievementIdentifier == currentAchievementIdentifier
                                                                                 select v).ToArray <string>();
            }
            Action action = AchievementManager.onAchievementsRegistered;

            if (action == null)
            {
                return;
            }
            action();
        }
예제 #15
0
 private static void Init()
 {
     UnlockableCatalog.RegisterUnlockable("Logs.BeetleBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_BEETLE"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.BeetleGuardBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_BEETLEGUARD"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.BeetleQueenBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_BEETLEQUEEN"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.BisonBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_BISON"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.ClayBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_CLAY"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.ClayBossBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_CLAYBOSS"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.GolemBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_GOLEM"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.TitanBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_TITAN"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.TitanGoldBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_TITANGOLD"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.ImpBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_IMP"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.JellyfishBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_JELLYFISH"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.VagrantBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_VAGRANT"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.LemurianBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_LEMURIAN"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.MagmaWormBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_MAGMAWORM"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.WispBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_WISP"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.GreaterWispBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_GREATERWISP"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.AncientWispBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_ANCIENTWISP"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.HermitCrabBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_HERMITCRAB"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.BellBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_BELL"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.LemurianBruiserBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_LEMURIANBRUISER"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.ImpBossBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_IMPBOSS"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.ShopkeeperBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_SHOPKEEPER"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.ElectricWormBody.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_ELECTRICWORM"
     });
     UnlockableCatalog.RegisterUnlockable("Characters.Huntress", new UnlockableDef
     {
         nameToken = "HUNTRESS_BODY_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Characters.Bandit", new UnlockableDef
     {
         nameToken = "BANDIT_BODY_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Characters.Engineer", new UnlockableDef
     {
         nameToken = "ENGI_BODY_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Characters.Mercenary", new UnlockableDef
     {
         nameToken = "MERC_BODY_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Characters.Mage", new UnlockableDef
     {
         nameToken = "MAGE_BODY_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Characters.Toolbot", new UnlockableDef
     {
         nameToken = "TOOLBOT_BODY_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.ExtraLife", new UnlockableDef
     {
         nameToken = "ITEM_EXTRALIFE_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.BFG", new UnlockableDef
     {
         nameToken = "EQUIPMENT_BFG_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.ShockNearby", new UnlockableDef
     {
         nameToken = "ITEM_SHOCKNEARBY_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.AttackSpeedOnCrit", new UnlockableDef
     {
         nameToken = "ITEM_ATTACKSPEEDONCRIT_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.Infusion", new UnlockableDef
     {
         nameToken = "ITEM_INFUSION_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.Medkit", new UnlockableDef
     {
         nameToken = "ITEM_MEDKIT_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.Bear", new UnlockableDef
     {
         nameToken = "ITEM_BEAR_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.Clover", new UnlockableDef
     {
         nameToken = "ITEM_CLOVER_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.GoldGat", new UnlockableDef
     {
         nameToken = "EQUIPMENT_GOLDGAT_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.EquipmentMagazine", new UnlockableDef
     {
         nameToken = "ITEM_EQUIPMENTMAGAZINE_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.DroneBackup", new UnlockableDef
     {
         nameToken = "EQUIPMENT_DRONEBACKUP_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.Firework", new UnlockableDef
     {
         nameToken = "ITEM_FIREWORK_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.WarCryOnMultiKill", new UnlockableDef
     {
         nameToken = "ITEM_WARCRYONMULTIKILL_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.Lightning", new UnlockableDef
     {
         nameToken = "EQUIPMENT_LIGHTNING_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.PassiveHealing", new UnlockableDef
     {
         nameToken = "EQUIPMENT_PASSIVEHEALING_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.Meteor", new UnlockableDef
     {
         nameToken = "EQUIPMENT_METEOR_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.BurnNearby", new UnlockableDef
     {
         nameToken = "EQUIPMENT_BURNNEARBY_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.AutoCastEquipment", new UnlockableDef
     {
         nameToken = "ITEM_AUTOCASTEQUIPMENT_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.HealOnCrit", new UnlockableDef
     {
         nameToken = "EQUIPMENT_HEALONCRIT_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.ElementalRings", new UnlockableDef
     {
         nameToken = "ITEM_ELEMENTALRINGS_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.Scanner", new UnlockableDef
     {
         nameToken = "EQUIPMENT_SCANNER_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.Talisman", new UnlockableDef
     {
         nameToken = "ITEM_TALISMAN_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.BossDamageBonus", new UnlockableDef
     {
         nameToken = "ITEM_BOSSDAMAGEBONUS_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.KillEliteFrenzy", new UnlockableDef
     {
         nameToken = "ITEM_KILLELITEFRENZY_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.SecondarySkillMagazine", new UnlockableDef
     {
         nameToken = "ITEM_SECONDARYSKILLMAGAZINE_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.JumpBoost", new UnlockableDef
     {
         nameToken = "ITEM_JUMPBOOST_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.Crowbar", new UnlockableDef
     {
         nameToken = "ITEM_CROWBAR_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.Hoof", new UnlockableDef
     {
         nameToken = "ITEM_HOOF_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.BounceNearby", new UnlockableDef
     {
         nameToken = "ITEM_BOUNCENEARBY_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.TreasureCache", new UnlockableDef
     {
         nameToken = "ITEM_TREASURECACHE_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.RepeatHeal", new UnlockableDef
     {
         nameToken = "ITEM_REPEATHEAL_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.NovaOnHeal", new UnlockableDef
     {
         nameToken = "ITEM_NOVAONHEAL_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.CrippleWardOnLevel", new UnlockableDef
     {
         nameToken = "ITEM_CRIPPLEWARDONLEVEL_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.IncreaseHealing", new UnlockableDef
     {
         nameToken = "ITEM_INCREASEHEALING_NAME"
     });
     UnlockableCatalog.RegisterUnlockable("Items.ShieldOnly", new UnlockableDef
     {
         nameToken        = "UNLOCKABLE_BLUEPRINT_SHIELDONLY",
         displayModelPath = "Prefabs/PickupModels/PickupShieldBug"
     });
     UnlockableCatalog.RegisterUnlockable("Shop.BonusLunar.1", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_SHOP_BONUS_LUNAR_1"
     });
     UnlockableCatalog.RegisterUnlockable("Shop.BonusLunar.2", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_SHOP_BONUS_LUNAR_2"
     });
     UnlockableCatalog.RegisterUnlockable("Shop.BonusLunar.3", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_SHOP_BONUS_LUNAR_3"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.Stages.blackbeach", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_STAGES_BLACKBEACH"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.Stages.goolake", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_STAGES_GOOLAKE"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.Stages.bazaar", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_STAGES_BAZAAR"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.Stages.frozenwall", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_STAGES_FROZENWALL"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.Stages.golemplains", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_STAGES_GOLEMPLAINS"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.Stages.foggyswamp", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_STAGES_FOGGYSWAMP"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.Stages.dampcavesimple", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_STAGES_DAMPCAVE"
     });
     UnlockableCatalog.RegisterUnlockable("Logs.Stages.mysteryspace", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_LOG_STAGES_MYSTERYSPACE"
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.blackbeach.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.blackbeach.1", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.blackbeach.2", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.goolake.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.goolake.1", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.goolake.2", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.bazaar.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.bazaar.1", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.bazaar.2", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.frozenwall.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.frozenwall.1", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.frozenwall.2", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.golemplains.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.golemplains.1", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.golemplains.2", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.foggyswamp.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.foggyswamp.1", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.foggyswamp.2", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.dampcavesimple.0", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.dampcavesimple.1", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.RegisterUnlockable("NewtStatue.dampcavesimple.2", new UnlockableDef
     {
         nameToken = "UNLOCKABLE_NEWTSTATUE",
         hidden    = true
     });
     UnlockableCatalog.indexToDefTable = new UnlockableDef[UnlockableCatalog.nameToDefTable.Count];
     foreach (KeyValuePair <string, UnlockableDef> keyValuePair in UnlockableCatalog.nameToDefTable)
     {
         UnlockableCatalog.indexToDefTable[keyValuePair.Value.index.value] = keyValuePair.Value;
     }
     for (int i = 0; i < UnlockableCatalog.indexToDefTable.Length; i++)
     {
         UnlockableCatalog.sortScores[UnlockableCatalog.indexToDefTable[i].name] = UnlockableCatalog.GuessUnlockableSortScore(UnlockableCatalog.indexToDefTable[i].name);
     }
 }