-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBlenderAPI.cs
More file actions
58 lines (50 loc) · 1.68 KB
/
BlenderAPI.cs
File metadata and controls
58 lines (50 loc) · 1.68 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
using BepInEx;
using BepInEx.Logging;
using Blender.Content;
using Blender.Patching;
using Blender.Utility;
using HarmonyLib;
using System;
using System.Collections;
using System.IO;
using UnityEngine;
namespace Blender;
[BepInPlugin(PluginInfo.PLUGIN_GUID, PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)]
public class BlenderAPI : BaseUnityPlugin
{
public static bool HasDLC { get; private set; } = false;
private static readonly Harmony Harmony = new(PluginInfo.PLUGIN_GUID);
private static new ManualLogSource Logger = null;
private void Awake()
{
base.Logger.LogInfo($"Blender v{PluginInfo.PLUGIN_VERSION} was loaded.");
BlenderAPI.Logger = base.Logger;
string dlcBundlePath = Path.Combine(Paths.GameRootPath, "Cuphead_Data\\StreamingAssets\\AssetBundles\\atlas_world_dlc");
if (File.Exists(dlcBundlePath))
HasDLC = true;
CustomData.Initialize(Harmony);
EnumPatcher.Initialize(Harmony);
EquipMenuPatcher.Initialize(Harmony);
PropertiesPatcher.Initialize(Harmony);
PrefabsPatcher.Initialize(Harmony);
LocalizationPatcher.Initialize(Harmony);
ShopPatcher.Initialize(Harmony);
AudioPatcher.Initialize(Harmony);
AssetHelper.Initialize(Harmony);
ScenePatcher.Initialize(Harmony);
WeaponHUDPatcher.Initialize(Harmony);
EquipRegistries.Initialize();
}
internal static void LogInfo(string message)
{
Logger.LogInfo(message);
}
internal static void LogWarning(string message)
{
Logger.LogWarning(message);
}
internal static void LogError(string message)
{
Logger.LogError(message);
}
}