Exemple #1
0
 /****
 ** Event
 ****/
 /// <summary>The method to call after <see cref="Event.checkAction"/>.</summary>
 private static void After_Event_CheckAction()
 {
     if (Game1.activeClickableMenu is ShopMenu shop)
     {
         PatchCommon.DoShop($"Festival.{Game1.currentSeason}{Game1.dayOfMonth}", shop);
     }
 }
Exemple #2
0
 /// <summary>The method to call after <see cref="GameLocation.performAction"/>.</summary>
 private static void After_GameLocation_PerformAction(string action)
 {
     if ((action is "IceCreamStand" or "Theater_BoxOffice") && Game1.activeClickableMenu is ShopMenu shop)
     {
         PatchCommon.DoShop(action, shop);
     }
 }
        /*********
        ** Private methods
        *********/
        /// <summary>The method which transpiles the <see cref="CollectionsPage"/> constructor.</summary>
        private static IEnumerable <CodeInstruction> Transpile_Constructor(ILGenerator gen, MethodBase original, IEnumerable <CodeInstruction> instructions)
        {
            instructions = PatchCommon.RedirectForFakeObjectInformationCollectionTranspiler(gen, original, instructions);

            bool foundRedirect = false;
            var  ret           = new List <CodeInstruction>();

            foreach (var instruction in instructions)
            {
                if (instruction.opcode == OpCodes.Call && (instruction.operand as MethodBase) !.Name == nameof(PatchCommon.GetFakeObjectInformationCollection))
                {
                    foundRedirect = true;
                }
Exemple #4
0
 /// <summary>The method to call after <see cref="Utility.getAdventureShopStock"/>.</summary>
 private static void After_Utility_GetAdventureShopStock(Dictionary <ISalable, int[]> __result)
 {
     PatchCommon.DoShopStock("AdventurerGuild", __result);
 }
Exemple #5
0
 /// <summary>The method to call after <see cref="Utility.getHospitalStock"/>.</summary>
 private static void After_Utility_GetHospitalStock(Dictionary <ISalable, int[]> __result)
 {
     PatchCommon.DoShopStock("Hospital", __result);
 }
Exemple #6
0
 /// <summary>The method to call after <see cref="Utility.GetQiChallengeRewardStock"/>.</summary>
 private static void After_Utility_GetQiChallengeRewardStock(Dictionary <ISalable, int[]> __result)
 {
     PatchCommon.DoShopStock("QiGemShop", __result);
 }
Exemple #7
0
 /****
 ** Utility
 ****/
 /// <summary>The method to call after <see cref="Utility.generateLocalTravelingMerchantStock"/>.</summary>
 private static void After_Utility_GenerateLocalTravelingMerchantStock(Dictionary <ISalable, int[]> __result)
 {
     PatchCommon.DoShopStock("TravelingMerchant", __result);
 }
Exemple #8
0
 /****
 ** Sewer
 ****/
 /// <summary>The method to call after <see cref="Sewer.generateKrobusStock"/>.</summary>
 private static void After_Sewer_GenerateKrobusStock(Dictionary <ISalable, int[]> __result)
 {
     PatchCommon.DoShopStock("Krobus", __result);
 }
 /*********
 ** Private methods
 *********/
 /// <summary>The method which transpiles <see cref="ShippingMenu.parseItems"/>.</summary>
 public static IEnumerable <CodeInstruction> Transpile_ParseItems(ILGenerator gen, MethodBase original, IEnumerable <CodeInstruction> insns)
 {
     return(PatchCommon.RedirectForFakeObjectIdTranspiler(gen, original, insns));
 }
Exemple #10
0
 /// <summary>The method to call after <see cref="Utility.getBlacksmithStock"/>.</summary>
 private static void After_Utility_GetBlacksmithStock(Dictionary <ISalable, int[]> __result)
 {
     PatchCommon.DoShopStock("Blacksmith", __result);
 }
Exemple #11
0
 /****
 ** Game location
 ****/
 /// <summary>The method to call after <see cref="GameLocation.sandyShopStock"/>.</summary>
 private static void After_GameLocation_SandyShopStock(Dictionary <ISalable, int[]> __result)
 {
     PatchCommon.DoShopStock("Sandy", __result);
 }
Exemple #12
0
 /****
 ** Desert
 ****/
 /// <summary>The method to call after <see cref="Desert.getDesertMerchantTradeStock"/>.</summary>
 private static void After_Desert_GetDesertMerchantTradeStock(Dictionary <ISalable, int[]> __result)
 {
     PatchCommon.DoShopStock("DesertMerchant", __result);
 }
Exemple #13
0
 /// <summary>The method to call after <see cref="BeachNightMarket.geMagicShopStock"/>.</summary>
 private static void After_BeachNightMarket_GeMagicShopStock(Dictionary <ISalable, int[]> __result)
 {
     PatchCommon.DoShopStock("GeMagic", __result);
 }
Exemple #14
0
 /*********
 ** Private methods
 *********/
 /****
 ** Night market
 ****/
 /// <summary>The method to call after <see cref="BeachNightMarket.getBlueBoatStock"/>.</summary>
 private static void After_BeachNightMarker_GetBlueBoatStock(Dictionary <ISalable, int[]> __result)
 {
     PatchCommon.DoShopStock("BlueBoat", __result);
 }
Exemple #15
0
 /// <summary>The method to call after <see cref="Utility.getCarpenterStock"/>.</summary>
 private static void After_Utility_GetCarpenterStock(Dictionary <ISalable, int[]> __result)
 {
     PatchCommon.DoShopStock("Carpenter", __result);
 }
Exemple #16
0
 /****
 ** Island north
 ****/
 /// <summary>The method to call after <see cref="IslandNorth.getIslandMerchantTradeStock"/>.</summary>
 private static void After_IslandNorth_GetIslandMerchantTradeStock(Dictionary <ISalable, int[]> __result)
 {
     PatchCommon.DoShopStock("IslandMerchant", __result);
 }
Exemple #17
0
 /// <summary>The method to call after <see cref="Utility.getAnimalShopStock"/>.</summary>
 private static void After_Utility_GetAnimalShopStock(Dictionary <ISalable, int[]> __result)
 {
     PatchCommon.DoShopStock("AnimalSupplies", __result);
 }
Exemple #18
0
 /****
 ** Seed shop
 ****/
 /// <summary>The method to call after <see cref="SeedShop.shopStock"/>.</summary>
 private static void After_SeedShop_ShopStock(Dictionary <ISalable, int[]> __result)
 {
     PatchCommon.DoShopStock("SeedShop", __result);
 }
Exemple #19
0
 /// <summary>The method to call after <see cref="Utility.getDwarfShopStock"/>.</summary>
 private static void After_Utility_GetDwarfShopStock(Dictionary <ISalable, int[]> __result)
 {
     PatchCommon.DoShopStock("Dwarf", __result);
 }
Exemple #20
0
 /// <summary>The method which transpiles <see cref="Farmer.doneEating"/>.</summary>
 private static IEnumerable <CodeInstruction> Transpile_DoneEating(ILGenerator gen, MethodBase original, IEnumerable <CodeInstruction> instructions)
 {
     return(PatchCommon.RedirectForFakeObjectInformationTranspiler2(gen, original, instructions));
 }