-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMain.cs
More file actions
68 lines (56 loc) · 1.83 KB
/
Main.cs
File metadata and controls
68 lines (56 loc) · 1.83 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
59
60
61
62
63
64
65
66
67
68
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using System.IO;
using System.Reflection;
using UnityEngine;
using UnityEngine.Events;
using System.Collections;
using System;
using System.Collections.Generic;
using BepInEx.Configuration;
using UnityEngine.SceneManagement;
namespace BlacksmithTools
{
[BepInPlugin(GUID, MODNAME, VERSION)]
public class Main : BaseUnityPlugin
{
#region[Declarations]
public const string
MODNAME = "BlacksmithTools",
AUTHOR = "GoldenJude",
GUID = AUTHOR + "_" + MODNAME,
VERSION = "2.0.1";
public static ManualLogSource log;
public static Harmony harmony;
public static Assembly assembly;
public static string modFolder;
public static ConfigFile configFile;
public static ConfigEntry<bool> reorderEnabled;
public static ConfigEntry<bool> bodyHidingEnabled;
public static ConfigEntry<bool> loggingEnabled;
#endregion
public Main()
{
log = Logger;
harmony = new Harmony(GUID);
assembly = Assembly.GetExecutingAssembly();
modFolder = Path.GetDirectoryName(assembly.Location);
}
public void Start()
{
harmony.PatchAll(assembly);
}
public void Awake()
{
configFile = Config;
reorderEnabled = configFile.Bind("bone reorder", "enabled", true, new ConfigDescription("", null));
bodyHidingEnabled = configFile.Bind("bodypart hiding", "enabled", true, new ConfigDescription("", null));
loggingEnabled = configFile.Bind("logging", "enabled", false, new ConfigDescription("", null));
if (bodyHidingEnabled.Value)
{
BodypartSystem.BindConfigs();
}
}
}
}