-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPlugin.cs
More file actions
49 lines (42 loc) · 1.5 KB
/
Plugin.cs
File metadata and controls
49 lines (42 loc) · 1.5 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
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
namespace ShowCombatEncounterDetail;
[BepInPlugin(PluginInfo.PLUGIN_GUID, PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)]
public class ShowCombatEncounterDetail : BaseUnityPlugin
{
private static ConfigEntry<float> _configRelativePosX;
private static ConfigEntry<float> _configRelativePosY;
internal static ManualLogSource _logger;
public static TooltipManager TooltipManager { get; private set; }
private void Awake()
{
_logger = base.Logger;
_logger.LogInfo($"Plugin {PluginInfo.PLUGIN_GUID} is loaded!");
_configRelativePosX = Config.Bind(
"General",
"relativePosX",
0.0f,
new ConfigDescription(
"Relative X position of the encounter card as a ratio between [-1, 1]",
new AcceptableValueRange<float>(-1f, 1f)
)
);
_configRelativePosY = Config.Bind(
"General",
"relativePosY",
-.125f,
new ConfigDescription(
"Relative Y position of the encounter card as a ratio between [-1, 1]",
new AcceptableValueRange<float>(-1f, 1f)
)
);
TooltipManager = new TooltipManager(_configRelativePosX, _configRelativePosY, _logger);
Hooks.Hooks.InitializeHooks();
}
private void OnDestroy()
{
Hooks.Hooks.UninitializeHooks();
TooltipManager.CleanDestroy();
}
}