From d8a50f4dbc77a92a60b1221aeb4723cf50b52e0f Mon Sep 17 00:00:00 2001 From: Timerix Date: Sat, 27 Dec 2025 00:10:55 +0500 Subject: [PATCH] load all plugins from Plugins/Local --- README.md | 11 ++++++++++- UplinkLauncher/UplinkLauncher.cs | 15 ++++++--------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 9e1dd2e..aeb9788 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,13 @@ # UplinkSE Менеджер плагинов для компьютерной видеоигры Space Engineers, созданной студией Keen Software House, не имеющий фатальных недостатков, присущих другим аналогичным менеджерам плагинов -![](https://media.discordapp.net/stickers/1322141759257706508.webp) \ No newline at end of file +# How to: +Put your plugin dlls in `SpaceEngineers/Bin64/Plugins/Local`. +```sh +ln -s "XXX/SpaceEngineers/Bin64 ./" +./build.sh +./install.sh +./launch.sh +``` + +![](https://media.discordapp.net/stickers/1322141759257706508.webp) diff --git a/UplinkLauncher/UplinkLauncher.cs b/UplinkLauncher/UplinkLauncher.cs index 75b135e..420ebf7 100644 --- a/UplinkLauncher/UplinkLauncher.cs +++ b/UplinkLauncher/UplinkLauncher.cs @@ -17,20 +17,17 @@ internal static class UplinkLauncher Console.WriteLine("Starting Uplink SE"); Console.WriteLine(new string('-', Console.WindowWidth)); - //MANUALLY ADDED, REMOVE LATER - string[] enabledPlugins = - { - "ModelSwap.dll", - "DontTellMeWhatToBuild.dll" - }; - List plugins = new List(); + if (!Directory.Exists(PluginsLocalDir)) Directory.CreateDirectory(PluginsLocalDir); - foreach (string plugin in enabledPlugins) + string[] localPlugins = Directory.GetFiles( + PluginsLocalDir, "*.dll", SearchOption.AllDirectories); + + foreach (string plugin in localPlugins) { Console.WriteLine("Adding plugin: " + plugin); - plugins.Add(Path.GetFullPath(Path.Combine(PluginsLocalDir, plugin))); + plugins.Add(Path.GetFullPath(plugin)); } MyPlugins.RegisterUserAssemblyFiles(plugins);