Esempio n. 1
0
        private static void RegisterBandit()
        {
            var characterObject = Object.Instantiate(BodyCatalog.FindBodyPrefab("BanditBody"));

            Object.DontDestroyOnLoad(characterObject);
            characterObject.SetActive(false);
            var skillLocator = characterObject.GetComponent <SkillLocator>();

            skillLocator.primary.skillNameToken        = "Blast";
            skillLocator.primary.skillDescriptionToken =
                "Fire a powerful slug for <style=cIsDamage>150% damage</style>.";

            skillLocator.secondary.skillNameToken        = "Lights Out";
            skillLocator.secondary.skillDescriptionToken =
                "Take aim for a headshot, dealing <style=cIsDamage>600% damage</style>. If the ability <style=cIsDamage>kills an enemy</style>, the Bandit's <style=cIsUtility>Cooldowns are all reset to 0</style>.";

            skillLocator.utility.skillNameToken        = "Smokebomb";
            skillLocator.utility.skillDescriptionToken =
                "Turn invisible for <style=cIsDamage>3 seconds</style>, gaining <style=cIsUtility>increased movement speed</style>.";

            skillLocator.special.skillNameToken        = "Thermite Toss";
            skillLocator.special.skillDescriptionToken =
                "Fire off a burning Thermite grenade, dealing <style=cIsDamage>damage over time</style>.";

            SurvivorCatalog.RegisterSurvivor(SurvivorIndex.Bandit, new SurvivorDef
            {
                bodyPrefab       = characterObject,
                displayPrefab    = Resources.Load <GameObject>("Prefabs/Characters/BanditDisplay"),
                descriptionToken = "BANDIT_DESCRIPTION",
                primaryColor     = new Color(0.8039216f, 0.482352942f, 0.843137264f)
            });
        }
Esempio n. 2
0
 public void CmdRespawn(string bodyName)
 {
     if (this.preventRespawnUntilNextStageServer)
     {
         return;
     }
     if (!string.IsNullOrEmpty(bodyName))
     {
         this.bodyPrefab = BodyCatalog.FindBodyPrefab(bodyName);
     }
     if (Stage.instance)
     {
         Stage.instance.RespawnCharacter(this);
     }
 }
Esempio n. 3
0
        private static void RegisterMage()
        {
            var bodyPrefab   = BodyCatalog.FindBodyPrefab("MageBody");
            var skillLocator = bodyPrefab.GetComponent <SkillLocator>();

            var passiveSkill = skillLocator.passiveSkill;

            passiveSkill.skillNameToken        = "Arcane Affinity";
            passiveSkill.skillDescriptionToken = "Absorb energy from all current items. Gaining <style=cIsUtility>1-3% bonus damage</style> per item, depending on its tier.";
            passiveSkill.enabled      = true;
            passiveSkill.icon         = passiveSkill.icon;
            skillLocator.passiveSkill = passiveSkill;

            SurvivorCatalog.RegisterSurvivor(SurvivorIndex.Mage, new SurvivorDef
            {
                bodyPrefab       = bodyPrefab,
                displayPrefab    = Resources.Load <GameObject>("Prefabs/CharacterDisplays/MageDisplay"),
                descriptionToken = "MAGE_DESCRIPTION",
                primaryColor     = new Color(0.968627453f, 0.75686276f, 0.992156863f),
                unlockableName   = "Characters.Mage"
            });
        }
Esempio n. 4
0
        private static void Init()
        {
            SurvivorCatalog.idealSurvivorOrder = new[]
            {
                SurvivorIndex.Commando,
                SurvivorIndex.Toolbot,
                SurvivorIndex.Huntress,
                SurvivorIndex.Engineer,
                SurvivorIndex.Mage,
                SurvivorIndex.Merc,
                SurvivorIndex.Bandit
            };

            SurvivorCatalog.survivorMaxCount = SurvivorCatalog.idealSurvivorOrder.Length;

            SurvivorCatalog.survivorDefs = new SurvivorDef[SurvivorCatalog.survivorMaxCount];

            Debug.LogFormat("[Debug] Defined Survivor Array with {0} survivor slots and max survivor count of {1}",
                            SurvivorCatalog.survivorDefs.Length, SurvivorCatalog.survivorMaxCount);

            SurvivorCatalog.RegisterSurvivor(SurvivorIndex.Commando, new SurvivorDef
            {
                bodyPrefab       = BodyCatalog.FindBodyPrefab("CommandoBody"),
                displayPrefab    = Resources.Load <GameObject>("Prefabs/CharacterDisplays/CommandoDisplay"),
                descriptionToken = "COMMANDO_DESCRIPTION",
                primaryColor     = new Color(0.929411769f, 0.5882353f, 0.07058824f)
            });

            SurvivorCatalog.RegisterSurvivor(SurvivorIndex.Huntress, new SurvivorDef
            {
                bodyPrefab       = BodyCatalog.FindBodyPrefab("HuntressBody"),
                displayPrefab    = Resources.Load <GameObject>("Prefabs/CharacterDisplays/HuntressDisplay"),
                primaryColor     = new Color(0.8352941f, 0.235294119f, 0.235294119f),
                descriptionToken = "HUNTRESS_DESCRIPTION",
                unlockableName   = "Characters.Huntress"
            });

            SurvivorCatalog.RegisterSurvivor(SurvivorIndex.Toolbot, new SurvivorDef
            {
                bodyPrefab       = BodyCatalog.FindBodyPrefab("ToolbotBody"),
                displayPrefab    = Resources.Load <GameObject>("Prefabs/CharacterDisplays/ToolbotDisplay"),
                descriptionToken = "TOOLBOT_DESCRIPTION",
                primaryColor     = new Color(0.827451f, 0.768627465f, 0.3137255f),
                unlockableName   = "Characters.Toolbot"
            });

            SurvivorCatalog.RegisterSurvivor(SurvivorIndex.Engineer, new SurvivorDef
            {
                bodyPrefab       = BodyCatalog.FindBodyPrefab("EngiBody"),
                displayPrefab    = Resources.Load <GameObject>("Prefabs/CharacterDisplays/EngiDisplay"),
                descriptionToken = "ENGI_DESCRIPTION",
                primaryColor     = new Color(0.372549027f, 0.8862745f, 0.5254902f),
                unlockableName   = "Characters.Engineer"
            });

            RegisterMage();

            SurvivorCatalog.RegisterSurvivor(SurvivorIndex.Merc, new SurvivorDef
            {
                bodyPrefab       = BodyCatalog.FindBodyPrefab("MercBody"),
                displayPrefab    = Resources.Load <GameObject>("Prefabs/CharacterDisplays/MercDisplay"),
                descriptionToken = "MERC_DESCRIPTION",
                primaryColor     = new Color(0.423529416f, 0.819607854f, 0.917647064f),
                unlockableName   = "Characters.Mercenary"
            });

            RegisterBandit();

            for (var survivorIndex = 0; survivorIndex < SurvivorCatalog.survivorDefs.Length; survivorIndex++)
            {
                Debug.LogFormat("[Debug] Survivor index {0}: {1}", survivorIndex,
                                SurvivorCatalog.survivorDefs.ElementAt(survivorIndex).bodyPrefab);
                if (SurvivorCatalog.survivorDefs[survivorIndex] == null)
                {
                    Debug.LogWarningFormat("Unregistered survivor {0}!", survivorIndex);
                }
            }

            SurvivorCatalog._allSurvivorDefs = (from v in SurvivorCatalog.survivorDefs
                                                where v != null
                                                select v).ToArray();

            var node = new ViewablesCatalog.Node("Survivors", true);

            using (var enumerator = SurvivorCatalog.allSurvivorDefs.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    var survivor = enumerator.Current;

                    if (survivor == null)
                    {
                        continue;
                    }

                    Debug.LogFormat("[DEBUG] Creating node for {0}.", survivor.displayNameToken);

                    var survivorEntryNode =
                        new ViewablesCatalog.Node(survivor.displayNameToken, false, node);

                    survivorEntryNode.shouldShowUnviewed = userProfile =>
                                                           !userProfile.HasViewedViewable(survivorEntryNode.fullName) &&
                                                           userProfile.HasSurvivorUnlocked(survivor.survivorIndex) &&
                                                           !string.IsNullOrEmpty(survivor.unlockableName);

                    Debug.LogFormat("[DEBUG] Created node {0}", survivorEntryNode.name);
                }
            }

            ViewablesCatalog.AddNodeToRoot(node);
        }
Esempio n. 5
0
        private static void Init()
        {
            SurvivorCatalog.idealSurvivorOrder = ModLoader.BuildIdealOrder(SurvivorCatalog.idealSurvivorOrder);
            if (ModLoader.SurvivorCount > SurvivorCatalog.survivorMaxCount)
            {
                SurvivorCatalog.survivorMaxCount = ModLoader.SurvivorCount;
            }
            SurvivorCatalog.survivorDefs = new SurvivorDef[ModLoader.SurvivorCount];
            Debug.LogFormat("[Debug] Defined Survivor Array with {0} survivor slots and max survivor count of {1}",
                            new object[]
                            { SurvivorCatalog.survivorDefs.Length, SurvivorCatalog.survivorMaxCount });
            SurvivorCatalog.RegisterSurvivor((SurvivorIndex)0, new SurvivorDef
            {
                bodyPrefab       = BodyCatalog.FindBodyPrefab("CommandoBody"),
                displayPrefab    = Resources.Load <GameObject>("Prefabs/CharacterDisplays/CommandoDisplay"),
                descriptionToken = "COMMANDO_DESCRIPTION",
                primaryColor     = new Color(0.929411769f, 0.5882353f, 0.07058824f)
            });
            SurvivorCatalog.RegisterSurvivor((SurvivorIndex)1, new SurvivorDef
            {
                bodyPrefab       = BodyCatalog.FindBodyPrefab("HuntressBody"),
                displayPrefab    = Resources.Load <GameObject>("Prefabs/CharacterDisplays/HuntressDisplay"),
                primaryColor     = new Color(0.8352941f, 0.235294119f, 0.235294119f),
                descriptionToken = "HUNTRESS_DESCRIPTION",
                unlockableName   = "Characters.Huntress"
            });
            SurvivorCatalog.RegisterSurvivor((SurvivorIndex)2, new SurvivorDef
            {
                bodyPrefab       = BodyCatalog.FindBodyPrefab("ToolbotBody"),
                displayPrefab    = Resources.Load <GameObject>("Prefabs/CharacterDisplays/ToolbotDisplay"),
                descriptionToken = "TOOLBOT_DESCRIPTION",
                primaryColor     = new Color(0.827451f, 0.768627465f, 0.3137255f),
                unlockableName   = "Characters.Toolbot"
            });
            SurvivorCatalog.RegisterSurvivor((SurvivorIndex)3, new SurvivorDef
            {
                bodyPrefab       = BodyCatalog.FindBodyPrefab("EngiBody"),
                displayPrefab    = Resources.Load <GameObject>("Prefabs/CharacterDisplays/EngiDisplay"),
                descriptionToken = "ENGI_DESCRIPTION",
                primaryColor     = new Color(0.372549027f, 0.8862745f, 0.5254902f),
                unlockableName   = "Characters.Engineer"
            });
            SurvivorCatalog.RegisterSurvivor((SurvivorIndex)4, new SurvivorDef
            {
                bodyPrefab       = BodyCatalog.FindBodyPrefab("MageBody"),
                displayPrefab    = Resources.Load <GameObject>("Prefabs/CharacterDisplays/MageDisplay"),
                descriptionToken = "MAGE_DESCRIPTION",
                primaryColor     = new Color(0.968627453f, 0.75686276f, 0.992156863f),
                unlockableName   = "Characters.Mage"
            });
            SurvivorCatalog.RegisterSurvivor((SurvivorIndex)5, new SurvivorDef
            {
                bodyPrefab       = BodyCatalog.FindBodyPrefab("MercBody"),
                displayPrefab    = Resources.Load <GameObject>("Prefabs/CharacterDisplays/MercDisplay"),
                descriptionToken = "MERC_DESCRIPTION",
                primaryColor     = new Color(0.423529416f, 0.819607854f, 0.917647064f),
                unlockableName   = "Characters.Mercenary"
            });

            ModLoader.AddSurvivors(ref SurvivorCatalog.survivorDefs);
            for (int survivorIndex = 0; survivorIndex < SurvivorCatalog.survivorDefs.Length; survivorIndex++)
            {
                Debug.LogFormat("[Debug] Survivor index {0}: {1}", new object[]
                {
                    survivorIndex,
                    SurvivorCatalog.survivorDefs.ElementAt(survivorIndex).bodyPrefab
                });
                if (SurvivorCatalog.survivorDefs[survivorIndex] == null)
                {
                    Debug.LogWarningFormat("Unregistered survivor {0}!", new object[]
                    {
                        survivorIndex
                    });
                }
            }
            SurvivorCatalog._allSurvivorDefs = (from v in SurvivorCatalog.survivorDefs
                                                where v != null
                                                select v).ToArray <SurvivorDef>();
            ViewablesCatalog.Node node = new ViewablesCatalog.Node("Survivors", true, null);
            using (IEnumerator <SurvivorDef> enumerator = SurvivorCatalog.allSurvivorDefs.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    SurvivorDef survivor = new SurvivorDef();
                    survivor = enumerator.Current;
                    Debug.LogFormat("[DEBUG] Creating node for {0}.", new object[] { survivor.displayNameToken });
                    ViewablesCatalog.Node survivorEntryNode = new ViewablesCatalog.Node(survivor.displayNameToken, false, node);
                    survivorEntryNode.shouldShowUnviewed = ((UserProfile userProfile) => !userProfile.HasViewedViewable(survivorEntryNode.fullName) && userProfile.HasSurvivorUnlocked(survivor.survivorIndex) && !string.IsNullOrEmpty(survivor.unlockableName));
                    Debug.LogFormat("[DEBUG] Created node {0}", new object[] { survivorEntryNode.name });
                }
            }
            ViewablesCatalog.AddNodeToRoot(node);
        }
Esempio n. 6
0
 private static void Init()
 {
     SurvivorCatalog.survivorDefs = new SurvivorDef[BaseFramework.SurvivorCount];
     SurvivorCatalog.RegisterSurvivor(SurvivorIndex.Commando, new SurvivorDef
     {
         bodyPrefab       = BodyCatalog.FindBodyPrefab("CommandoBody"),
         displayPrefab    = Resources.Load <GameObject>("Prefabs/CharacterDisplays/CommandoDisplay"),
         descriptionToken = "COMMANDO_DESCRIPTION",
         primaryColor     = new Color(0.929411769f, 0.5882353f, 0.07058824f)
     });
     SurvivorCatalog.RegisterSurvivor(SurvivorIndex.Huntress, new SurvivorDef
     {
         bodyPrefab       = BodyCatalog.FindBodyPrefab("HuntressBody"),
         displayPrefab    = Resources.Load <GameObject>("Prefabs/CharacterDisplays/HuntressDisplay"),
         primaryColor     = new Color(0.8352941f, 0.235294119f, 0.235294119f),
         descriptionToken = "HUNTRESS_DESCRIPTION",
         unlockableName   = "Characters.Huntress"
     });
     SurvivorCatalog.RegisterSurvivor(SurvivorIndex.Toolbot, new SurvivorDef
     {
         bodyPrefab       = BodyCatalog.FindBodyPrefab("ToolbotBody"),
         displayPrefab    = Resources.Load <GameObject>("Prefabs/CharacterDisplays/ToolbotDisplay"),
         descriptionToken = "TOOLBOT_DESCRIPTION",
         primaryColor     = new Color(0.827451f, 0.768627465f, 0.3137255f),
         unlockableName   = "Characters.Toolbot"
     });
     SurvivorCatalog.RegisterSurvivor(SurvivorIndex.Engineer, new SurvivorDef
     {
         bodyPrefab       = BodyCatalog.FindBodyPrefab("EngiBody"),
         displayPrefab    = Resources.Load <GameObject>("Prefabs/CharacterDisplays/EngiDisplay"),
         descriptionToken = "ENGI_DESCRIPTION",
         primaryColor     = new Color(0.372549027f, 0.8862745f, 0.5254902f),
         unlockableName   = "Characters.Engineer"
     });
     SurvivorCatalog.RegisterSurvivor(SurvivorIndex.Mage, new SurvivorDef
     {
         bodyPrefab       = BodyCatalog.FindBodyPrefab("MageBody"),
         displayPrefab    = Resources.Load <GameObject>("Prefabs/CharacterDisplays/MageDisplay"),
         descriptionToken = "MAGE_DESCRIPTION",
         primaryColor     = new Color(0.968627453f, 0.75686276f, 0.992156863f),
         unlockableName   = "Characters.Mage"
     });
     SurvivorCatalog.RegisterSurvivor(SurvivorIndex.Merc, new SurvivorDef
     {
         bodyPrefab       = BodyCatalog.FindBodyPrefab("MercBody"),
         displayPrefab    = Resources.Load <GameObject>("Prefabs/CharacterDisplays/MercDisplay"),
         descriptionToken = "MERC_DESCRIPTION",
         primaryColor     = new Color(0.423529416f, 0.819607854f, 0.917647064f),
         unlockableName   = "Characters.Mercenary"
     });
     BaseFramework.addSurvivors();
     for (SurvivorIndex survivorIndex = 0; survivorIndex < (SurvivorIndex)SurvivorCatalog.survivorDefs.Count(); survivorIndex++)
     {
         if (SurvivorCatalog.survivorDefs[(int)survivorIndex] == null)
         {
             Debug.LogWarningFormat("Unregistered survivor {0}!", new object[]
             {
                 Enum.GetName(typeof(SurvivorIndex), survivorIndex)
             });
         }
     }
     SurvivorCatalog._allSurvivorDefs = (from v in SurvivorCatalog.survivorDefs
                                         where v != null
                                         select v).ToArray <SurvivorDef>();
     ViewablesCatalog.Node node = new ViewablesCatalog.Node("Survivors", true, null);
     using (IEnumerator <SurvivorDef> enumerator = SurvivorCatalog.allSurvivorDefs.GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             SurvivorDef survivor = new SurvivorDef();
             survivor = enumerator.Current;
             ViewablesCatalog.Node survivorEntryNode = new ViewablesCatalog.Node(survivor.survivorIndex.ToString(), false, node);
             survivorEntryNode.shouldShowUnviewed = ((UserProfile userProfile) => !userProfile.HasViewedViewable(survivorEntryNode.fullName) && userProfile.HasSurvivorUnlocked(survivor.survivorIndex) && !string.IsNullOrEmpty(survivor.unlockableName));
         }
     }
     ViewablesCatalog.AddNodeToRoot(node);
 }
Esempio n. 7
0
        private static void Init()
        {
            SurvivorCatalog.survivorDefs = new SurvivorDef[10];
            SurvivorCatalog.RegisterSurvivor(SurvivorIndex.Commando, new SurvivorDef
            {
                bodyPrefab       = BodyCatalog.FindBodyPrefab("CommandoBody"),
                displayPrefab    = Resources.Load <GameObject>("Prefabs/CharacterDisplays/CommandoDisplay"),
                descriptionToken = "COMMANDO_DESCRIPTION",
                primaryColor     = new Color(0.92941177f, 0.5882353f, 0.07058824f)
            });
            SurvivorCatalog.RegisterSurvivor(SurvivorIndex.Huntress, new SurvivorDef
            {
                bodyPrefab       = BodyCatalog.FindBodyPrefab("HuntressBody"),
                displayPrefab    = Resources.Load <GameObject>("Prefabs/CharacterDisplays/HuntressDisplay"),
                primaryColor     = new Color(0.8352941f, 0.23529412f, 0.23529412f),
                descriptionToken = "HUNTRESS_DESCRIPTION",
                unlockableName   = "Characters.Huntress"
            });
            SurvivorCatalog.RegisterSurvivor(SurvivorIndex.Toolbot, new SurvivorDef
            {
                bodyPrefab       = BodyCatalog.FindBodyPrefab("ToolbotBody"),
                displayPrefab    = Resources.Load <GameObject>("Prefabs/CharacterDisplays/ToolbotDisplay"),
                descriptionToken = "TOOLBOT_DESCRIPTION",
                primaryColor     = new Color(0.827451f, 0.76862746f, 0.3137255f),
                unlockableName   = "Characters.Toolbot"
            });
            SurvivorCatalog.RegisterSurvivor(SurvivorIndex.Engi, new SurvivorDef
            {
                bodyPrefab       = BodyCatalog.FindBodyPrefab("EngiBody"),
                displayPrefab    = Resources.Load <GameObject>("Prefabs/CharacterDisplays/EngiDisplay"),
                descriptionToken = "ENGI_DESCRIPTION",
                primaryColor     = new Color(0.37254903f, 0.8862745f, 0.5254902f),
                unlockableName   = "Characters.Engineer"
            });
            SurvivorCatalog.RegisterSurvivor(SurvivorIndex.Mage, new SurvivorDef
            {
                bodyPrefab       = BodyCatalog.FindBodyPrefab("MageBody"),
                displayPrefab    = Resources.Load <GameObject>("Prefabs/CharacterDisplays/MageDisplay"),
                descriptionToken = "MAGE_DESCRIPTION",
                primaryColor     = new Color(0.96862745f, 0.75686276f, 0.99215686f),
                unlockableName   = "Characters.Mage"
            });
            SurvivorCatalog.RegisterSurvivor(SurvivorIndex.Merc, new SurvivorDef
            {
                bodyPrefab       = BodyCatalog.FindBodyPrefab("MercBody"),
                displayPrefab    = Resources.Load <GameObject>("Prefabs/CharacterDisplays/MercDisplay"),
                descriptionToken = "MERC_DESCRIPTION",
                primaryColor     = new Color(0.42352942f, 0.81960785f, 0.91764706f),
                unlockableName   = "Characters.Mercenary"
            });
            SurvivorCatalog.RegisterSurvivor(SurvivorIndex.Treebot, new SurvivorDef
            {
                bodyPrefab       = BodyCatalog.FindBodyPrefab("TreebotBody"),
                displayPrefab    = Resources.Load <GameObject>("Prefabs/CharacterDisplays/TreebotDisplay"),
                descriptionToken = "TREEBOT_DESCRIPTION",
                primaryColor     = new Color(0.5254902f, 0.61960787f, 0.32941177f),
                unlockableName   = "Characters.Treebot"
            });
            SurvivorCatalog.RegisterSurvivor(SurvivorIndex.Loader, new SurvivorDef
            {
                bodyPrefab       = BodyCatalog.FindBodyPrefab("LoaderBody"),
                displayPrefab    = Resources.Load <GameObject>("Prefabs/CharacterDisplays/LoaderDisplay"),
                descriptionToken = "LOADER_DESCRIPTION",
                primaryColor     = new Color(0.40392157f, 0.4392157f, 0.87058824f),
                unlockableName   = "Characters.Loader"
            });
            SurvivorCatalog.RegisterSurvivor(SurvivorIndex.Croco, new SurvivorDef
            {
                bodyPrefab       = BodyCatalog.FindBodyPrefab("CrocoBody"),
                displayPrefab    = Resources.Load <GameObject>("Prefabs/CharacterDisplays/CrocoDisplay"),
                descriptionToken = "CROCO_DESCRIPTION",
                primaryColor     = new Color(0.7882353f, 0.9490196f, 0.3019608f),
                unlockableName   = "Characters.Croco"
            });
            for (SurvivorIndex survivorIndex = SurvivorIndex.Commando; survivorIndex < SurvivorIndex.Count; survivorIndex++)
            {
                if (SurvivorCatalog.survivorDefs[(int)survivorIndex] == null)
                {
                    Debug.LogWarningFormat("Unregistered survivor {0}!", new object[]
                    {
                        Enum.GetName(typeof(SurvivorIndex), survivorIndex)
                    });
                }
            }
            List <SurvivorDef>           list   = new List <SurvivorDef>();
            Action <List <SurvivorDef> > action = SurvivorCatalog.getAdditionalSurvivorDefs;

            if (action != null)
            {
                action(list);
            }
            Array.Resize <SurvivorDef>(ref SurvivorCatalog.survivorDefs, SurvivorCatalog.survivorDefs.Length + list.Count);
            for (int i = 0; i < list.Count; i++)
            {
                SurvivorCatalog.RegisterSurvivor(SurvivorIndex.Count + i, list[i]);
            }
            SurvivorCatalog.survivorIndexToBodyIndex = new int[SurvivorCatalog.survivorCount];
            SurvivorCatalog.bodyIndexToSurvivorIndex = new SurvivorIndex[BodyCatalog.bodyCount];
            HGArrayUtilities.SetAll <int>(SurvivorCatalog.survivorIndexToBodyIndex, -1);
            HGArrayUtilities.SetAll <SurvivorIndex>(SurvivorCatalog.bodyIndexToSurvivorIndex, SurvivorIndex.None);
            for (int j = 0; j < SurvivorCatalog.survivorDefs.Length; j++)
            {
                SurvivorDef survivorDef = SurvivorCatalog.survivorDefs[j];
                int         num         = (survivorDef != null) ? survivorDef.bodyPrefab.GetComponent <CharacterBody>().bodyIndex : -1;
                SurvivorCatalog.survivorIndexToBodyIndex[j] = num;
                if (num != -1)
                {
                    SurvivorCatalog.bodyIndexToSurvivorIndex[num] = (SurvivorIndex)j;
                }
            }
            SurvivorCatalog._allSurvivorDefs = (from v in SurvivorCatalog.survivorDefs
                                                where v != null
                                                select v).ToArray <SurvivorDef>();
            ViewablesCatalog.Node node = new ViewablesCatalog.Node("Survivors", true, null);
            using (IEnumerator <SurvivorDef> enumerator = SurvivorCatalog.allSurvivorDefs.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    SurvivorCatalog.< > c__DisplayClass22_0 CS$ < > 8__locals1 = new SurvivorCatalog.< > c__DisplayClass22_0();
                    CS$ < > 8__locals1.survivorDef = enumerator.Current;
                    ViewablesCatalog.Node survivorEntryNode = new ViewablesCatalog.Node(CS$ < > 8__locals1.survivorDef.survivorIndex.ToString(), false, node);
                    survivorEntryNode.shouldShowUnviewed = ((UserProfile userProfile) => !userProfile.HasViewedViewable(survivorEntryNode.fullName) && userProfile.HasSurvivorUnlocked(CS$ < > 8__locals1.survivorDef.survivorIndex) && !string.IsNullOrEmpty(CS$ < > 8__locals1.survivorDef.unlockableName));
                }
            }
            ViewablesCatalog.AddNodeToRoot(node);
        }