Пример #1
0
        /// <summary>Check what player is missing.</summary>
        private void AwardPlayer()
        {
            if (Game1.stats.DaysPlayed == 0)
            {
                return;                              // freshly created game before init cutscene - it would be called once again afterwards
            }
            if (Config.GetConfig("professions"))
            {
                AwardProfessions();
            }
            if (Config.GetConfig("stardrops"))
            {
                AwardStardrops();
            }
            if (Config.GetConfig("crafting_recipes"))
            {
                AwardCraftingRecipes();
            }
            if (Config.GetConfig("cooking_recipes"))
            {
                AwardCookingRecipes();
            }
            if (Config.GetConfig("experience"))
            {
                AwardExperience();
            }

            // Some bonuses only can be granted on a new game start. Mostly matherial rewards.
            if (Game1.stats.DaysPlayed == 1)
            {
                AwardNewGame();
            }
        }
Пример #2
0
 /// <summary> Five player some starting stuff. Only used for a freshly started games. </summary>
 private void AwardNewGame()
 {
     //Monitor.Log("Awarding new game stuff...", LogLevel.Trace);
     if (ModConfig.GetConfig("newgame_tools"))
     {
         if (ModConfig.GetFlagBoolean("ccJunimo"))
         {
             UpgradeTool("Watering Can");
             UpgradeTool("Hoe");
             Monitor.Log("Local Legend: Awarding a farming tools upgrade for a new game.", LogLevel.Info);
         }
         if (ModConfig.GetFlagBoolean("ccJoja"))
         {
             UpgradeTool("Axe");
             UpgradeTool("Pickaxe");
             Monitor.Log("Joja Co. Member Of The Year: Awarding a gathering tools upgrade for a new game.", LogLevel.Info);
         }
         if (ModConfig.GetFlagBoolean("fullShipment"))
         {
             Game1.player.increaseBackpackSize(12);
             Monitor.Log("Full Shipment: Awarding backpack upgrade for a new game.", LogLevel.Info);
         }
     }
     if (ModConfig.GetConfig("newgame_assets"))
     {
         int moneyBonus = Decimal.ToInt32(ModConfig.GetFlagDecimal("money", 0) / 1000);
         if (moneyBonus > 0)
         {
             Game1.player.money += moneyBonus;
             Monitor.Log($"Hoarder: Awarding {moneyBonus} money for a new game.", LogLevel.Info);
         }
         if (Decimal.ToInt32(ModConfig.GetFlagDecimal("grandpaScore", 0)) == 4)
         {
             Game1.player.addItemToInventory((Item) new StardewValley.Object(628, 1));
             Game1.player.addItemToInventory((Item) new StardewValley.Object(629, 1));
             Game1.player.addItemToInventory((Item) new StardewValley.Object(630, 1));
             Game1.player.addItemToInventory((Item) new StardewValley.Object(631, 1));
             Game1.player.addItemToInventory((Item) new StardewValley.Object(632, 1));
             Game1.player.addItemToInventory((Item) new StardewValley.Object(633, 1));
             Monitor.Log("Perfection: Awarding a set of the tree saplings for a new game.", LogLevel.Info);
         }
         // Burglar's Ring for "Qi's Challenge"
         if (ModConfig.GetFlagBoolean("QiChallengeComplete"))
         {
             Game1.player.leftRing.Value = new Ring(526);
             Game1.player.leftRing.Value.onEquip(Game1.player, Game1.player.currentLocation);
             Monitor.Log("Qi's Challenge: Awarding the Burglar's Ring for a new game.", LogLevel.Info);
         }
         // Iridium Band for "Protector Of The Valley"
         if (ModConfig.GetFlagBoolean("areAllMonsterSlayerQuestsComplete"))
         {
             Game1.player.leftRing.Value = new Ring(527);
             Game1.player.leftRing.Value.onEquip(Game1.player, Game1.player.currentLocation);
             Monitor.Log("Protector Of The Valley: Awarding the Iridium Band for a new game.", LogLevel.Info);
         }
         // TODO:
         // Bonus 2 starting hearts with everyone for "Popular"?
         // Statue of Perfection for "Fector's Challenge"?
     }
     //Monitor.Log("Awarding new game stuff - completed.", LogLevel.Trace);
 }