Adds assemblies config, fixes crash bugs. (#134)
This commit is contained in:
parent
0140eb73b4
commit
8ec166bcd0
3223 changed files with 191 additions and 191 deletions
|
|
@ -32,6 +32,7 @@ using System.Threading.Tasks;
|
|||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Server.Json;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server
|
||||
|
|
@ -117,8 +118,6 @@ namespace Server
|
|||
|
||||
public static Thread Thread { get; private set; }
|
||||
|
||||
public static MultiTextWriter MultiConsoleOut { get; private set; }
|
||||
|
||||
public static bool UsingHighResolutionTiming => m_HighRes && !Unix;
|
||||
|
||||
public static long TickCount => (long)Ticks;
|
||||
|
|
@ -309,6 +308,8 @@ namespace Server
|
|||
m_Signal.Set();
|
||||
}
|
||||
|
||||
private static string assembliesConfiguration = "Configuration/assemblies.json";
|
||||
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
|
||||
|
|
@ -382,8 +383,13 @@ namespace Server
|
|||
|
||||
ServerConfiguration.Load();
|
||||
|
||||
// Load Assembly Scripts.CS.dll
|
||||
AssemblyHandler.LoadScripts();
|
||||
// Load UOContent.dll
|
||||
string[] assemblyFiles = JsonConfig.Deserialize<List<string>>(
|
||||
Path.Join(BaseDirectory, assembliesConfiguration)
|
||||
).Select(t => Path.Join(BaseDirectory, "Assemblies", t)).ToArray();
|
||||
AssemblyHandler.LoadScripts(assemblyFiles);
|
||||
|
||||
VerifySerialization();
|
||||
|
||||
AssemblyHandler.Invoke("Configure");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue