-
Notifications
You must be signed in to change notification settings - Fork 1
/
Plugin.cs
36 lines (29 loc) · 1.22 KB
/
Plugin.cs
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
35
36
#if BEPINEX6
using BepInEx.Unity.Mono;
#endif
using BepInEx;
using HarmonyLib;
using System.Reflection;
using BepInEx.Logging;
namespace Wayz.CS2.UnlockAllTilesMod;
[BepInPlugin("Wayz.CS2.UnlockAllTilesMod", "Unlock All Tiles Mod", "1.1.1")]
#pragma warning disable BepInEx002
public class UnlockAllTilesMod : BaseUnityPlugin
#pragma warning restore BepInEx002
{
public static ManualLogSource GameLogger { get; private set; }
internal static UnlockAllTilesSettings ModSettings { get; private set; }
private void Awake()
{
GameLogger = Logger;
ModSettings = WayzSettingsManager.GetOrInitializeSettings<UnlockAllTilesSettings>("UnlockAllTiles_Wayz", "settings");
var harmony = Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), MyPluginInfo.PLUGIN_GUID + "_Cities2Harmony");
var patchedMethods = harmony.GetPatchedMethods();
// Plugin startup logic
Logger.LogInfo($"Plugin {MyPluginInfo.PLUGIN_GUID} {MyPluginInfo.PLUGIN_VERSION} is loaded! Patched methods: " + patchedMethods.Count());
foreach (var patchedMethod in patchedMethods)
{
Logger.LogInfo($"Patched method: {patchedMethod.Module.Name}:{patchedMethod.Name}");
}
}
}