using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using HarmonyLib; using UnityEngine; using UnityEngine.SceneManagement; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("JamRecipesTomatoCan")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("JamRecipesTomatoCan")] [assembly: AssemblyCopyright("Copyright © 2025")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("4C3D4F13-7B10-4D0D-8A86-0CAC0B82F361")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyVersion("1.0.0.0")] [HarmonyPatch(typeof(RecipePaper))] public static class RecipePaperPatch { [HarmonyPrefix] [HarmonyPatch("__initializeVariables")] private static bool Prefix(RecipePaper __instance) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) Scene activeScene = SceneManager.GetActiveScene(); string name = ((Scene)(ref activeScene)).name; if (name == "BazaarRome") { return true; } RecipeSO val = null; for (int i = 0; i < __instance.recipes.Count; i++) { if (__instance.recipes[i].output.itemName.Contains("cherry_jam")) { val = __instance.recipes[i]; break; } } if ((Object)(object)val == (Object)null) { return true; } RecipeSO item = InputItem.createRecipeSO(1713302845396L, 1, 0, new List { new InputItem(1710868111250L, 1), new InputItem(1725560196919L, 1), new InputItem(1730656174037L, 1) }); __instance.recipes.Add(item); return true; } } [HarmonyPatch(typeof(BlockJamMachine))] public class BlockOvenPatch { [HarmonyPostfix] [HarmonyPatch("__initializeVariables")] private static void Postfix(BlockJamMachine __instance) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) Scene activeScene = SceneManager.GetActiveScene(); string name = ((Scene)(ref activeScene)).name; if (!(name == "BazaarRome2")) { RecipeSO item = InputItem.createRecipeSO(1713302845396L, 1, 0, new List { new InputItem(1710868111250L, 1), new InputItem(1725560196919L, 1), new InputItem(1730656174037L, 1) }); __instance.recipes.Add(item); } } } [BepInPlugin("com.lan.JamRecipesTomatoCan", "番茄制作罐头", "1.3.0")] public class CustomFishStack : BaseUnityPlugin { private void Awake() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown Harmony val = new Harmony("com.lan.JamRecipesTomatoCan"); val.PatchAll(); Debug.LogWarning((object)"果酱机食谱:番茄罐头 --作者:她说缝上都不给我"); } } public class InputItem { public long inputItemid; public int inputAmount; public InputItem(long inputItemId, int inputAmount) { inputItemid = inputItemId; this.inputAmount = inputAmount; } public static RecipeSO createRecipeSO(long outputItemId, int outputAmount, int requiredDays, List inputItems) { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown RecipeSO val = ScriptableObject.CreateInstance(); ItemSO itemById = GameManager.Instance.GetItemById(outputItemId); val.output = itemById; val.amount = outputAmount; val.requiredDays = requiredDays; List list = new List(); foreach (InputItem inputItem in inputItems) { ItemSO itemById2 = GameManager.Instance.GetItemById(inputItem.inputItemid); Ingredient item = new Ingredient { itemSO = itemById2, amount = inputItem.inputAmount }; list.Add(item); } val.ingredients = list; return val; } }