Esempio n. 1
0
        private void showLevelMenu(object sender, EventArgsShowNightEndMenus args)
        {
            Log.debug("Doing cooking menus");

            if (newCookingLevels.Count() > 0)
            {
                for (int i = newCookingLevels.Count() - 1; i >= 0; --i)
                {
                    int level = newCookingLevels[i];
                    Log.debug("Doing " + i + ": cooking level " + level + " screen");

                    Game1.endOfNightMenus.Push(new CookingLevelUpMenu(level));
                }
                newCookingLevels.Clear();
            }
            else if (getCookingLevel() >= 5 && !Game1.player.professions.Contains(PROFESSION_SELLPRICE) && !Game1.player.professions.Contains(PROFESSION_BUFFTIME))
            {
                Log.debug("Putting level 5 profession menu");
                Game1.endOfNightMenus.Push(new CookingLevelUpMenu(5));
            }
            else if (getCookingLevel() >= 10 && !Game1.player.professions.Contains(PROFESSION_CONSERVATION) && !Game1.player.professions.Contains(PROFESSION_SILVER) &&
                     !Game1.player.professions.Contains(PROFESSION_BUFFLEVEL) && !Game1.player.professions.Contains(PROFESSION_BUFFPLAIN))
            {
                Log.debug("Putting level 10 profession menu");
                Game1.endOfNightMenus.Push(new CookingLevelUpMenu(10));
            }
        }
Esempio n. 2
0
        private void OnNightMenus(object sender, EventArgsShowNightEndMenus e)
        {
            if (!this.HasMaxedSkills() || Game1.player.professions.Contains(Mod.ProfessionTime) || Game1.player.professions.Contains(Mod.ProfessionProfit))
            {
                return;
            }

            Log.Debug("Doing profession menu");

            if (Game1.endOfNightMenus.Count == 0)
            {
                Game1.endOfNightMenus.Push(new SaveGameMenu());
            }

            Game1.endOfNightMenus.Push(new CapstoneProfessionMenu());
        }
Esempio n. 3
0
        private static void showMagicLevelMenus(object sender, EventArgsShowNightEndMenus args)
        {
            if (newMagicLevels.Any())
            {
                for (int i = newMagicLevels.Count() - 1; i >= 0; --i)
                {
                    int level = newMagicLevels[i];
                    Log.debug("Doing " + i + ": magic level " + level + " screen");

                    if (Game1.activeClickableMenu != null)
                    {
                        Game1.endOfNightMenus.Push(Game1.activeClickableMenu);
                    }
                    Game1.activeClickableMenu = new MagicLevelUpMenu(level);
                }
                newMagicLevels.Clear();
            }
        }
Esempio n. 4
0
        private void OnNightMenus(object sender, EventArgsShowNightEndMenus e)
        {
            if (Game1.player.farmingLevel.Value == 10 && Game1.player.foragingLevel.Value == 10 &&
                Game1.player.fishingLevel.Value == 10 && Game1.player.miningLevel.Value == 10 &&
                Game1.player.combatLevel.Value == 10)
            {
                if (Game1.player.professions.Contains(Mod.ProfessionTime) || Game1.player.professions.Contains(Mod.ProfessionProfit))
                {
                    return;
                }

                Log.Debug("Doing profession menu");

                if (Game1.endOfNightMenus.Count == 0)
                {
                    Game1.endOfNightMenus.Push(new SaveGameMenu());
                }

                Game1.endOfNightMenus.Push(new CapstoneProfessionMenu());
            }
        }
Esempio n. 5
0
        private static void showLevelMenu(object sender, EventArgsShowNightEndMenus args)
        {
            Log.debug("Doing skill menus");

            if (Game1.endOfNightMenus.Count == 0)
            {
                Game1.endOfNightMenus.Push(new SaveGameMenu());
            }

            if (myNewLevels.Count() > 0)
            {
                for (int i = myNewLevels.Count() - 1; i >= 0; --i)
                {
                    string skill = myNewLevels[i].Key;
                    int    level = myNewLevels[i].Value;
                    Log.trace("Doing " + i + ": " + skill + " level " + level + " screen");

                    Game1.endOfNightMenus.Push(new SkillLevelUpMenu(skill, level));
                }
                myNewLevels.Clear();
            }
        }
Esempio n. 6
0
        private static void ShowEndOfNightStuffLogic()
        {
            var ev = new EventArgsShowNightEndMenus();

            SpaceEvents.InvokeShowNightEndMenus(ev);
        }
 private void SpaceEvents_ShowNightEndMenus(object sender, EventArgsShowNightEndMenus e)
 {
     //the new day hook seems to be inconsistent, so this is a full restore at the end of the night.
     Alchemy.RestoreAlkahestryEnergyForNewDay();
 }
Esempio n. 8
0
        public static void showEndOfNightStuff_mid()
        {
            var ev = new EventArgsShowNightEndMenus();

            SpaceEvents.InvokeShowNightEndMenus(ev);
        }