-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMod.cs
More file actions
34 lines (30 loc) · 1.18 KB
/
Mod.cs
File metadata and controls
34 lines (30 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
namespace PaceRef
{
[BepInPlugin(Constants.PluginGuid, Constants.PluginName, "1.0.0")]
public sealed class Mod : BaseUnityPlugin
{
internal new static ManualLogSource Logger { get; private set; }
internal static ConfigEntry<int> SampleSizeConfig { get; set; }
private void Awake()
{
Logger = BepInEx.Logging.Logger.CreateLogSource(Constants.PluginName);
ConfigDescription configDescription = new ConfigDescription(
description: Constants.Config.SampleSizeDescription,
acceptableValues: new AcceptableValueRange<int>(10, 1000)
);
SampleSizeConfig = Config.Bind(
section: Constants.Config.SectionName,
key: Constants.Config.SampleSize,
defaultValue: 100,
configDescription: configDescription);
Harmony harmony = new Harmony(Constants.HarmonyId);
Logger.LogInfo("Loading PaceRef...");
harmony.PatchAll();
Logger.LogInfo("PaceRef loaded successfully!");
}
}
}