Files
ClientModLoader/Plugin.ClientModLoader/Plugin.cs
pas2704 825094369f
All checks were successful
Build / Compute Version (push) Successful in 5s
Build / Build Nuget package (push) Successful in 37s
move config to folder
2025-06-01 19:42:47 -04:00

34 lines
850 B
C#

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", "config"));
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;
}
}