1
This commit is contained in:
34
Plugin.ClientModLoader/Plugin.cs
Normal file
34
Plugin.ClientModLoader/Plugin.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using CringePlugins.Render;
|
||||
using HarmonyLib;
|
||||
using VRage.Plugins;
|
||||
|
||||
namespace Plugin.ClientModLoader;
|
||||
|
||||
public class Plugin : IPlugin
|
||||
{
|
||||
private ModListComponent? _component;
|
||||
|
||||
private readonly DirectoryInfo _dir =
|
||||
new(Path.Join(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
|
||||
"CringeLauncher"));
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
public void Init(object gameInstance)
|
||||
{
|
||||
new Harmony("Plugin.ClientModLoader").PatchAll(typeof(Plugin).Assembly);
|
||||
RenderHandler.Current.RegisterComponent(_component = new ModListComponent(Path.Join(_dir.FullName, "mods.json")));
|
||||
ModInjector.Mods = _component.Installed;
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
}
|
||||
|
||||
public void OpenConfigDialog()
|
||||
{
|
||||
if (_component != null) _component.Visible = true;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user