Esempio n. 1
0
        // Token: 0x06000002 RID: 2 RVA: 0x00002184 File Offset: 0x00000384
        public static void AddSurvivors(ref SurvivorDef[] catalog)
        {
            if (BaseFramework.SurvivorMods.Count == 0)
            {
                return;
            }
            Debug.LogFormat("[ROR2ML] Attempting to load {0} mod survivors.", new object[]
            {
                BaseFramework.SurvivorMods.Count
            });

            foreach (SurvivorModInfo survivorModInfo in BaseFramework.SurvivorMods)
            {
                int index = SurvivorMods.IndexOf(survivorModInfo);
                Debug.LogFormat("[ROR2ML] Adding mod survivor... (Body: {0}, Index Order: {1})", new object[]
                {
                    survivorModInfo.bodyPrefabString,
                    index
                });
                if (survivorModInfo.toReplace > -1 && survivorModInfo.toReplace < VanillaCount)
                {
                    catalog[survivorModInfo.toReplace] = survivorModInfo.RegisterModSurvivor();
                }
                else
                {
                    catalog[VanillaCount + index] = survivorModInfo.RegisterModSurvivor();
                }
            }
        }
Esempio n. 2
0
        public static SurvivorIndex[] BuildIdealOrder(SurvivorIndex[] og_order)
        {
            List <SurvivorIndex> Order = og_order.TakeWhile(x => x.ToString() != "Count").ToList();

            foreach (SurvivorModInfo S in SurvivorMods)
            {
                Order.Add((SurvivorIndex)SurvivorMods.IndexOf(S));
            }
            return(Order.Count >= 24 ? Order.Take(24).ToArray() : Order.ToArray());
        }
Esempio n. 3
0
        // Token: 0x06000002 RID: 2 RVA: 0x00002184 File Offset: 0x00000384
        public static void addSurvivors()
        {
            Debug.LogFormat("[ROR2ML] Attempting to load {0} mod survivors.", new object[]
            {
                BaseFramework.SurvivorMods.Count
            });

            foreach (SurvivorModInfo survivorModInfo in BaseFramework.SurvivorMods)
            {
                int index = SurvivorMods.IndexOf(survivorModInfo);
                Debug.LogFormat("[ROR2ML] Adding mod survivor... (Body: {0}, Index Order: {1})", new object[]
                {
                    survivorModInfo.bodyPrefabString,
                    index
                });
                SurvivorCatalog.RegisterSurvivor((SurvivorIndex)VanillaSurvivorCount + index, survivorModInfo.RegisterModSurvivor());
            }
        }
Esempio n. 4
0
        // Token: 0x06000002 RID: 2 RVA: 0x00002184 File Offset: 0x00000384
        public static void AddSurvivors(ref SurvivorDef[] catalog)
        {
            if (ModLoader.SurvivorMods.Count == 0)
            {
                return;
            }
            Debug.LogFormat("[ROR2ML] Attempting to load {0} mod survivors.", new object[]
            {
                ModLoader.SurvivorMods.Count
            });

            foreach (SurvivorModInfo survivorModInfo in ModLoader.SurvivorMods)
            {
                int index = SurvivorMods.IndexOf(survivorModInfo);
                Debug.LogFormat("[ROR2ML] Adding mod survivor... (Body: {0}, Index Order: {1})", new object[]
                {
                    survivorModInfo.bodyPrefabString,
                    index
                });
                catalog[VanillaCount + index] = survivorModInfo.RegisterModSurvivor();
            }
        }