mirror of
https://github.com/BepInEx/BepInEx.git
synced 2026-10-20 01:46:13 +00:00
Accomodate breaking changes in preparation for api refactors
This commit is contained in:
1 parent
24cf635e65
commit
0a4f1d6d73
5 files changed
+11
-11
No files matched your search
@@ -11,7 +11,7 @@ public abstract class BasePlugin : IPlugin
|
||||
{
|
||||
protected BasePlugin()
|
||||
{
|
||||
var metadata = MetadataHelper.GetPluginMetadata(this);
|
||||
var metadata = MetadataHelper.GetMetadata(this);
|
||||
|
||||
if (BaseChainloader<BasePlugin>.Instance.Plugins.TryGetValue(metadata.GUID, out var pluginInfo))
|
||||
{
|
||||
@@ -23,14 +23,14 @@ public abstract class BasePlugin : IPlugin
|
||||
throw new InvalidOperationException($"The plugin information for {metadata.GUID} couldn't be found on the chainloader");
|
||||
}
|
||||
|
||||
Logger = BepInEx.Logging.Logger.CreateLogSource(metadata.Name);
|
||||
Log = BepInEx.Logging.Logger.CreateLogSource(metadata.Name);
|
||||
|
||||
Config = new ConfigFile(Utility.CombinePaths(Paths.ConfigPath, metadata.GUID + ".cfg"), false, metadata);
|
||||
}
|
||||
|
||||
public PluginInfo Info { get; }
|
||||
|
||||
public ManualLogSource Logger { get; }
|
||||
public ManualLogSource Log { get; }
|
||||
|
||||
public ConfigFile Config { get; }
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BepInEx.Unity.Mono;
|
||||
/// <summary>
|
||||
/// The base plugin type that is used by the BepInEx plugin loader.
|
||||
/// </summary>
|
||||
public abstract class BaseUnityPlugin : MonoBehaviour, IPlugin
|
||||
public abstract class BaseUnityPlugin : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// Create a new instance of a plugin and all of its tied in objects.
|
||||
@@ -18,7 +18,7 @@ public abstract class BaseUnityPlugin : MonoBehaviour, IPlugin
|
||||
/// <exception cref="InvalidOperationException">BepInPlugin attribute is missing.</exception>
|
||||
protected BaseUnityPlugin()
|
||||
{
|
||||
var metadata = MetadataHelper.GetPluginMetadata(this);
|
||||
var metadata = MetadataHelper.GetMetadata(this);
|
||||
if (metadata == null)
|
||||
throw new InvalidOperationException("Can't create an instance of " + GetType().FullName +
|
||||
" because it inherits from BaseUnityPlugin and the BepInPlugin attribute is missing.");
|
||||
|
||||
Reference in new issue
Block a user