private void AreaCompleteDrawHash(On.Celeste.AreaComplete.orig_VersionNumberAndVariants orig, string version, float ease, float alpha)
        {
            orig(version, ease, alpha);

            var settings = this.endingSettings;
            var session  = SaveData.Instance?.CurrentSession;

            if (settings != null)
            {
                var text = settings.Seed;
                if (settings.Rules != Ruleset.Custom)
                {
                    text += " " + settings.Rules.ToString();
                    if (session?.SeedCleanRandom() ?? false)
                    {
                        text += "!";
                    }
                }

                text += "\n#" + settings.Hash;
                text += "\nrando " + this.VersionString;
                var variants = SaveData.Instance?.VariantMode ?? false;
                ActiveFont.DrawOutline(text, new Vector2(1820f + 300f * (1f - Ease.CubeOut(ease)), variants ? 810f : 894f), new Vector2(0.5f, 0f), Vector2.One * 0.5f, settings.SpawnGolden ? Calc.HexToColor("fad768") : Color.White, 2f, Color.Black);
            }
        }
Esempio n. 2
0
        public void AreaCompleteDrawHash(On.Celeste.AreaComplete.orig_VersionNumberAndVariants orig, string version, float ease, float alpha)
        {
            if (this.InRandomizer)
            {
                SaveData.Instance.VariantMode = false;
            }
            orig(version, ease, alpha);

            if (this.InRandomizer)
            {
                var text = this.Settings.Seed;
                if (this.Settings.Rules != Ruleset.Custom)
                {
                    text += " " + this.Settings.Rules.ToString();
                }
                text += "\n#" + this.Settings.Hash.ToString();
                ActiveFont.DrawOutline(text, new Vector2(1820f + 300f * (1f - Ease.CubeOut(ease)), 925f), new Vector2(0.5f, 0f), Vector2.One * 0.5f, Color.White, 2f, Color.Black);
            }
        }
Esempio n. 3
0
        /// <summary>
        /// Wraps the VersionNumberAndVariants in the base game in order to add the Variant Mode logo if Extended Variants are enabled.
        /// </summary>
        private void modVersionNumberAndVariants(On.Celeste.AreaComplete.orig_VersionNumberAndVariants orig, string version, float ease, float alpha)
        {
            if (Session.ExtendedVariantsWereUsed)
            {
                // The "if" conditioning the display of the Variant Mode logo is in an "orig_" method, we can't access it with IL.Celeste.
                // The best we can do is turn on Variant Mode, run the method then restore its original value.
                bool oldVariantModeValue = SaveData.Instance.VariantMode;
                SaveData.Instance.VariantMode = true;

                orig.Invoke(version, ease, alpha);

                SaveData.Instance.VariantMode = oldVariantModeValue;
            }
            else
            {
                // Extended Variants are disabled so just keep the original behaviour
                orig.Invoke(version, ease, alpha);
            }
        }