Decompiled source of TooManyStudent v1.2.0

BepInEx/plugins/TooManyStudent.dll

Decompiled a day ago
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;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("TooManyStudent")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("TooManyStudent")]
[assembly: AssemblyCopyright("Copyright ©  2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("46a625bc-6e97-4243-aee4-fe606edf06ae")]
[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")]
namespace TooManyStudent;

[BepInPlugin("cc.lymone.HoL.TooManyStudent", "TooManyStudent", "1.2.0")]
public class TooManyStudent : BaseUnityPlugin
{
	private static ConfigEntry<int> TeacherConfig;

	private static ConfigEntry<int> StudentConfig;

	private void Start()
	{
		TeacherConfig = ((BaseUnityPlugin)this).Config.Bind<int>("配置 Config", "教师数量乘数 Teacher Multiplier", 2, "对两个学校都适用 Applicable to both schools");
		StudentConfig = ((BaseUnityPlugin)this).Config.Bind<int>("配置 Config", "学生容量乘数 Student Multiplier", 2, "对两个学校都适用 Applicable to both schools");
		Harmony.CreateAndPatchAll(typeof(TooManyStudent), (string)null);
	}

	[HarmonyPostfix]
	[HarmonyPatch(typeof(FormulaData), "SiShuTSnum")]
	public static void Multi_TSnum(ref List<int> __result)
	{
		__result[0] *= TeacherConfig.Value;
		__result[1] *= StudentConfig.Value;
	}
}