updated project files and created scripts
This commit is contained in:
@@ -1,38 +1,58 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VRage.Plugins;
|
||||
using SpaceEngineers;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using DTLib.Demystifier;
|
||||
|
||||
namespace UplinkLauncher;
|
||||
|
||||
namespace Lunar.UplinkLauncher
|
||||
internal static class UplinkLauncher
|
||||
{
|
||||
internal class UplinkLauncher
|
||||
public static readonly string PluginsLocalDir = "Plugins\\Local";
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
public static int Main(string[] args)
|
||||
try
|
||||
{
|
||||
string exeLocation = Path.GetDirectoryName(Path.GetFullPath(Assembly.GetExecutingAssembly().Location));
|
||||
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>();
|
||||
//MANUALLY ADDED, REMOVE LATER
|
||||
plugins.Add("C:\\Users\\Lunar\\Games\\Steam\\steamapps\\common\\SpaceEngineers\\Bin64\\Plugins\\Local\\ModelSwap.dll");
|
||||
plugins.Add("C:\\Users\\Lunar\\Games\\Steam\\steamapps\\common\\SpaceEngineers\\Bin64\\Plugins\\Local\\DontTellMeWhatToBuild.dll");
|
||||
if (!Directory.Exists(PluginsLocalDir))
|
||||
Directory.CreateDirectory(PluginsLocalDir);
|
||||
foreach (string plugin in enabledPlugins)
|
||||
{
|
||||
Console.WriteLine("Adding plugin: " + plugin);
|
||||
plugins.Add(Path.GetFullPath(Path.Combine(PluginsLocalDir, plugin)));
|
||||
}
|
||||
|
||||
MyPlugins.RegisterUserAssemblyFiles(plugins);
|
||||
|
||||
string appIdFile = Path.Combine(exeLocation, "steam_appid.txt");
|
||||
// why this file isn't created automatically?
|
||||
// how game handles this without this magnificent launcher???
|
||||
string appIdFile = "steam_appid.txt";
|
||||
if (!File.Exists(appIdFile))
|
||||
{
|
||||
Console.WriteLine($"Could not find '{appIdFile}', creating new file");
|
||||
File.WriteAllText(appIdFile, "244850");
|
||||
}
|
||||
|
||||
// finally start ze game!!!
|
||||
MyProgram.Main(args);
|
||||
return 0;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine("Crashed with exception:");
|
||||
Console.WriteLine(e.ToStringDemystified());
|
||||
Console.WriteLine("\nPress enter to exit...");
|
||||
Console.ReadLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user