load all plugins from Plugins/Local
This commit is contained in:
11
README.md
11
README.md
@@ -1,4 +1,13 @@
|
||||
# UplinkSE
|
||||
Менеджер плагинов для компьютерной видеоигры Space Engineers, созданной студией Keen Software House, не имеющий фатальных недостатков, присущих другим аналогичным менеджерам плагинов
|
||||
|
||||

|
||||
# How to:
|
||||
Put your plugin dlls in `SpaceEngineers/Bin64/Plugins/Local`.
|
||||
```sh
|
||||
ln -s "XXX/SpaceEngineers/Bin64 ./"
|
||||
./build.sh
|
||||
./install.sh
|
||||
./launch.sh
|
||||
```
|
||||
|
||||

|
||||
|
||||
@@ -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<string> plugins = new List<string>();
|
||||
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user