internal bool IsPlortShown(PlortEntry plort, int collected)
        {
            if (!(plort is ModdedPlortEntry modPlort))
            {
                return(true);
            }

            if (collected > 0 || SceneContext.Instance.GameModeConfig.GetModeSettings().assumeExperiencedUser || modPlort.toShow.Length == 0)
            {
                return(true);
            }

            if (modPlort.showOnlyWhenCollected)
            {
                return(false);
            }

            for (int i = 0; i < modPlort.toShow.Length; i++)
            {
                int count = modPlort.showCount[i];
                ProgressDirector.ProgressType type = modPlort.toShow[i];

                if (progressDir.GetProgress(type) >= count)
                {
                    return(true);
                }
            }

            return(false);
        }
        //+ PROGRESS CHECK
        internal bool IsPlortUnlocked(PlortEntry plort, int collected)
        {
            if (collected > 0 || SceneContext.Instance.GameModeConfig.GetModeSettings().assumeExperiencedUser || plort.toUnlock.Length == 0)
            {
                return(true);
            }

            if (plort is ModdedPlortEntry mPlort && mPlort.unlockOnlyWhenCollected)
            {
                return(false);
            }

            for (int i = 0; i < plort.toUnlock.Length; i++)
            {
                int count = plort is ModdedPlortEntry modPlort ? modPlort.unlockCount[i] : 1;
                ProgressDirector.ProgressType type = plort.toUnlock[i];

                if (progressDir.GetProgress(type) >= count)
                {
                    return(true);
                }
            }

            return(false);
        }
Exemplo n.º 3
0
        //+ HANDLING

        //+ SAVE HANDLING
        internal static bool IsTypeRegistered(ProgressDirector.ProgressType type) => PROGRESS_TYPES.Contains(type);