/**** ** 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); } }
/// <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; }
/// <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); }
/// <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); }
/// <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); }
/**** ** 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); }
/**** ** 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)); }
/// <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); }
/**** ** 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); }
/**** ** 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); }
/// <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); }
/********* ** 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); }
/// <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); }
/**** ** 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); }
/// <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); }
/**** ** 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); }
/// <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); }
/// <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)); }