-
Notifications
You must be signed in to change notification settings - Fork 0
/
Plugin.cs
56 lines (46 loc) · 1.64 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
using System;
using System.Collections;
using System.IO;
using System.Linq;
using System.Reflection;
using BepInEx;
using MonoMod;
using On;
using UnityEngine;
using Zorro.Recorder;
using BepInEx.Configuration;
using BepInEx.Logging;
namespace CWLiveLeak
{
[ContentWarningPlugin("CWLiveleak", "1.0.0", true)]
[BepInPlugin(PluginInfo.PLUGIN_GUID, PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)]
public class Plugin : BaseUnityPlugin
{
internal static ConfigEntry<string> Icon;
internal static ConfigEntry<string> ffmpegDebugging;
public static string pluginPath;
internal static ManualLogSource? LiveleakLogger;
private void Awake()
{
LiveleakLogger = base.Logger;
Icon = Config.Bind("General", // The section under which the option is shown
"Icon", // The key of the configuration option in the configuration file
"liveleak", // The default value
"What Icon is shown, available choices are: liveleak, hypercam, spookycam "); // Description of the option to show in the config file
ffmpegDebugging = Config.Bind("Debugging",
"Display FFmpeg Window",
"false",
"So you can watch ffmpeg shit itself in real time!");
LiveleakLogger.LogInfo($"Plugin {PluginInfo.PLUGIN_GUID} is loaded!");
Init();
// looks like i dont need to harmony :yay:
On.Zorro.Recorder.FfmpegEncoder.RunFfmpeg += FfmpegHook.FfmpegEncoderOnRunFfmpeg;
On.SurfaceNetworkHandler.RPCM_StartGame += SelectionManager.SurfaceNetworkHandlerOnRPCM_StartGame;
}
private void Init()
{
Assembly callingAssembly = Assembly.GetCallingAssembly();
pluginPath = Path.GetDirectoryName(callingAssembly.Location);
}
}
}