internal ArtifactImmigration()
        {
            Instance     = this;
            carePackages = new List <CarePackageInfo>();
            var tiers = new ArtifactTier[] { TIER0, TIER1, TIER2, TIER3, TIER4, TIER5 };
            int a     = ArtifactCarePackageOptions.Instance.CyclesUntilTier0;
            int b     = ArtifactCarePackageOptions.Instance.CyclesUntilTierNext;

            DropTableSlots = ArtifactCarePackageOptions.Instance.RandomArtifactDropTableSlots;
            var artifactItems = new List <string>();

            foreach (var artifactType in ArtifactConfig.artifactItems.Keys)
            {
                artifactItems.AddRange(ArtifactConfig.artifactItems[artifactType]);
            }
            artifactItems = artifactItems.Distinct().ToList();
            foreach (string artifactID in artifactItems)
            {
                var artifactTier = Assets.GetPrefab(artifactID.ToTag()).GetComponent <SpaceArtifact>().GetArtifactTier();
                int tier         = -1;
                for (int i = 0; i < tiers.Length; i++)
                {
                    if (artifactTier == tiers[i])
                    {
                        tier = i;
                        break;
                    }
                }
                if (tier >= 0) // пропускаем добавленные модами артифакты с нестандартной ArtifactTier
                {
                    carePackages.Add(new CarePackageInfo(artifactID, 1, () => CycleCondition(a + b * tier)));
                }
            }
            carePackages.Add(new CarePackageInfo(GeneShufflerRechargeConfig.ID, 1, () => CycleCondition(a + b * tiers.Length)));
        }
Exemple #2
0
 private static void OnEndGame()
 {
     ArtifactImmigration.DestroyInstance();
 }