Decompiled source of MoreFishStackSize v1.2.2

BepInEx/plugins/MoreFishStackSize.dll

Decompiled 3 weeks ago
using System;
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 BepInEx.Configuration;
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("MoreFishStackSize")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MoreFishStackSize")]
[assembly: AssemblyCopyright("Copyright ©  2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("42D80A55-FAD7-4191-871C-B4381D898B3C")]
[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")]
[BepInPlugin("com.lan.MoreFishStackSize", "更多鱼类堆叠", "1.2.0")]
public class MoreFishStackSize : BaseUnityPlugin
{
	private ConfigEntry<int> stackSize;

	public static List<long> items = new List<long>
	{
		1723336388391L, 1722973328525L, 1735761921479L, 1723370825279L, 1735761244928L, 1723331124528L, 1723399554098L, 1723154087003L, 1723372579859L, 1722976258583L,
		1723393402346L, 1735761826502L, 1735761659853L
	};

	public static List<long> luomaItems = new List<long>
	{
		1761501487012L, 1761501480720L, 1761501255168L, 1761501560334L, 1761501307667L, 1761501331898L, 1761501331898L, 1761501336091L, 1761501395201L, 1761501630173L,
		1761750585216L, 1761501266324L
	};

	private void Awake()
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Expected O, but got Unknown
		//IL_0035: Unknown result type (might be due to invalid IL or missing references)
		//IL_003b: Expected O, but got Unknown
		ConfigDescription val = new ConfigDescription("鱼类堆叠数量 --Fish Stack Limit", (AcceptableValueBase)null, Array.Empty<object>());
		stackSize = ((BaseUnityPlugin)this).Config.Bind<int>("基本设置", "鱼类堆叠数量 --fish Stack Limit", 30, val);
		Harmony val2 = new Harmony("com.lan.MoreFishStackSize");
		val2.PatchAll();
		Debug.LogWarning((object)"更多鱼类堆叠 --作者:她说缝上都不给我");
		SceneManager.sceneLoaded += OnSceneLoaded;
	}

	private void OnSceneLoaded(Scene scene, LoadSceneMode mode)
	{
		if ((Object)(object)GameManager.Instance == (Object)null)
		{
			return;
		}
		items.AddRange(luomaItems);
		foreach (long item in items)
		{
			ItemSO itemById = GameManager.Instance.GetItemById(item);
			if (!((Object)(object)itemById == (Object)null))
			{
				itemById.stackSize = stackSize.Value;
			}
		}
	}
}