mirror of
https://github.com/BepInEx/BepInEx.git
synced 2026-10-20 01:46:13 +00:00
Restructure project names and folder layout
This commit is contained in:
1 parent
ae18f16803
commit
f7857c7994
84 files changed
+363
-232
No files matched your search
@@ -0,0 +1,30 @@
|
||||
using BepInEx.Configuration;
|
||||
using BepInEx.Logging;
|
||||
using HarmonyLib;
|
||||
|
||||
namespace BepInEx.NET.Common
|
||||
{
|
||||
public abstract class BasePlugin
|
||||
{
|
||||
protected BasePlugin()
|
||||
{
|
||||
var metadata = MetadataHelper.GetMetadata(this);
|
||||
|
||||
HarmonyInstance = new Harmony("BepInEx.Plugin." + metadata.GUID);
|
||||
|
||||
Log = Logger.CreateLogSource(metadata.Name);
|
||||
|
||||
Config = new ConfigFile(Utility.CombinePaths(Paths.ConfigPath, metadata.GUID + ".cfg"), false, metadata);
|
||||
}
|
||||
|
||||
public ManualLogSource Log { get; }
|
||||
|
||||
public ConfigFile Config { get; }
|
||||
|
||||
public Harmony HarmonyInstance { get; set; }
|
||||
|
||||
public abstract void Load();
|
||||
|
||||
public virtual bool Unload() => false;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user