Files
BepInEx/Projects/NightRaider/Class1.cs
2024-12-31 15:21:57 +01:00

38 lines
1.4 KiB
C#

using System.Linq;
using BepInEx;
using BepInEx.Configuration;
using HarmonyLib;
using HarmonyLib.Tools;
namespace CykaRaider {
[BepInPlugin(pluginGuid, pluginName, pluginVersion)]
public class Main : BaseUnityPlugin {
private const string pluginGuid = "CykaRaider";
private const string pluginName = "CykaRaider";
private const string pluginVersion = "1.0.0";
public static ConfigEntry<int> lootTimeAdder;
public static ConfigEntry<float> maxStackMultiplier;
public static ConfigEntry<bool> autoLoot;
public static ConfigEntry<bool> debugMode;
public void Awake() {
debugMode = Config.Bind("General", "Debug Mode", false, new ConfigDescription("Debug Mode"));
lootTimeAdder = Config.Bind("General", "Loot Time Adder", 0, new ConfigDescription("Loot Time Adder"));
maxStackMultiplier = Config.Bind("General", "Max Stack Multiplier", 1f, new ConfigDescription("Max Stack Multiplier"));
autoLoot = Config.Bind("General", "Auto Loot", false, new ConfigDescription("Auto Loot"));
Logger.LogInfo("Cyka mod loaded");
HarmonyFileLog.Enabled = true;
Harmony harmony = new Harmony(pluginGuid);
harmony.PatchAll();
var originalMethods = harmony.GetPatchedMethods();
Logger.LogInfo("Patched " + originalMethods.Count() + " methods");
foreach (var method in originalMethods) {
Logger.LogInfo("Patched " + method.Name);
}
}
}
}