forked from ButteryStancakes/Chameleon
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlugin.cs
More file actions
40 lines (32 loc) · 1.29 KB
/
Copy pathPlugin.cs
File metadata and controls
40 lines (32 loc) · 1.29 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
35
36
37
38
39
40
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using UnityEngine.SceneManagement;
using BepInEx.Bootstrap;
using Chameleon.Overrides;
namespace Chameleon
{
[BepInPlugin(PLUGIN_GUID, PLUGIN_NAME, PLUGIN_VERSION)]
[BepInDependency(GUID_ARTIFICE_BLIZZARD, BepInDependency.DependencyFlags.SoftDependency)]
public class Plugin : BaseUnityPlugin
{
const string PLUGIN_GUID = "butterystancakes.lethalcompany.chameleon", PLUGIN_NAME = "Chameleon", PLUGIN_VERSION = "2.0.0";
internal static new ManualLogSource Logger;
const string GUID_ARTIFICE_BLIZZARD = "butterystancakes.lethalcompany.artificeblizzard";
void Awake()
{
Logger = base.Logger;
if (Chainloader.PluginInfos.ContainsKey(GUID_ARTIFICE_BLIZZARD))
{
Common.INSTALLED_ARTIFICE_BLIZZARD = true;
Logger.LogInfo("CROSS-COMPATIBILITY - Artifice Blizzard detected");
}
Configuration.Init(Config);
new Harmony(PLUGIN_GUID).PatchAll();
SceneManager.sceneLoaded += SceneOverrides.LoadNewScene;
SceneManager.sceneUnloaded += SceneOverrides.UnloadScene;
SceneOverrides.Init();
Logger.LogInfo($"{PLUGIN_NAME} v{PLUGIN_VERSION} loaded");
}
}
}