Exemplo n.º 1
0
 public static void MakeMapModifications_Postfix(
     CommunityCenter __instance)
 {
     if (!Game1.MasterPlayer.mailReceived.Contains("JojaMember") && !__instance.areAllAreasComplete())
     {
         foreach (int areaNumber in Bundles.CustomAreasComplete.Keys)
         {
             bool isAvailable = Bundles.ShouldNoteAppearInCustomArea(cc: __instance, areaNumber: areaNumber);
             bool isComplete  = Bundles.IsCustomAreaComplete(areaNumber);
             if (isAvailable)
             {
                 __instance.addJunimoNote(area: areaNumber);
             }
             else if (isComplete)
             {
                 __instance.loadArea(area: areaNumber, showEffects: false);
             }
         }
     }
 }
Exemplo n.º 2
0
        public void AddBundle(int bundleId)
        {
            CommunityCenter c = (CommunityCenter)Game1.getLocationFromName("CommunityCenter");

            // Check if the player has access to the community center
            if (!Game1.player.mailReceived.Contains("ccDoorUnlock"))
            {
                Game1.player.mailReceived.Add("ccDoorUnlock");
            }
            if (!Game1.player.mailReceived.Contains("seenJunimoNote"))
            {
                Game1.player.removeQuest(26);
                Game1.player.mailReceived.Add("seenJunimoNote");
            }
            if (!Game1.player.mailReceived.Contains("wizardJunimoNote"))
            {
                Game1.player.mailReceived.Add("wizardJunimoNote");
            }
            if (!Game1.player.mailReceived.Contains("canReadJunimoText"))
            {
                Game1.player.mailReceived.Add("canReadJunimoText");
            }


            // Check if the note is there, if not, add it.
            int area = this.BundleToAreaDictionary[bundleId];

            if (!c.isJunimoNoteAtArea(area))
            {
                c.addJunimoNote(area);
            }

            // Add the bundle.
            for (int index = 0; index < c.bundles[bundleId].Length; ++index)
            {
                c.bundles[bundleId][index] = true;
            }

            c.bundleRewards[bundleId] = true;
        }