fix(core): Updates expansion and map configurations (fixes map issues) (#570)
- [X] Adds question about expansion at start of server - [X] Adds question about client version to determine old have and map diffs - [X] Adds config setting "maps.enablePre6000Trammel" - [X] Rearranges some of the loading order. - [X] Added support for deserializing nullable enums from json TODO: Expand the nullable enums deserialization factory to work with any type by pulling the factory and creating an instance of the converter.
This commit is contained in:
parent
151eef470f
commit
98ce65083a
14 changed files with 324 additions and 92 deletions
|
|
@ -297,7 +297,7 @@ namespace Server
|
|||
_ => "CTRL+C"
|
||||
};
|
||||
|
||||
Console.WriteLine("Core: Detected {0} pressed.", keypress);
|
||||
WriteConsoleLine($"Detected {keypress} pressed.");
|
||||
e.Cancel = true;
|
||||
Kill();
|
||||
}
|
||||
|
|
@ -410,7 +410,7 @@ namespace Server
|
|||
".TrimMultiline());
|
||||
Utility.PopColor();
|
||||
|
||||
Console.WriteLine("Core: Running on {0}", RuntimeInformation.FrameworkDescription);
|
||||
WriteConsoleLine($"Running on {RuntimeInformation.FrameworkDescription}");
|
||||
|
||||
var ttObj = new Timer.TimerThread();
|
||||
_timerThread = new Thread(ttObj.TimerMain)
|
||||
|
|
@ -422,7 +422,7 @@ namespace Server
|
|||
|
||||
if (s.Length > 0)
|
||||
{
|
||||
Console.WriteLine("Core: Running with arguments: {0}", s);
|
||||
WriteConsoleLine($"Running with arguments: {s}");
|
||||
}
|
||||
|
||||
ProcessorCount = Environment.ProcessorCount;
|
||||
|
|
@ -434,20 +434,17 @@ namespace Server
|
|||
|
||||
if (MultiProcessor)
|
||||
{
|
||||
Console.WriteLine("Core: Optimizing for {0} processor{1}", ProcessorCount, ProcessorCount == 1 ? "" : "s");
|
||||
WriteConsoleLine($"Optimizing for {ProcessorCount} processor{(ProcessorCount == 1 ? "" : "s")}");
|
||||
}
|
||||
|
||||
Console.CancelKeyPress += Console_CancelKeyPressed;
|
||||
|
||||
if (GCSettings.IsServerGC)
|
||||
{
|
||||
Console.WriteLine("Core: Server garbage collection mode enabled");
|
||||
WriteConsoleLine(": Server garbage collection mode enabled");
|
||||
}
|
||||
|
||||
Console.WriteLine(
|
||||
"Core: High resolution timing ({0})",
|
||||
Stopwatch.IsHighResolution ? "Supported" : "Unsupported"
|
||||
);
|
||||
WriteConsoleLine($"High resolution timing ({(Stopwatch.IsHighResolution ? "Supported" : "Unsupported")})");
|
||||
|
||||
ServerConfiguration.Load();
|
||||
|
||||
|
|
@ -469,7 +466,6 @@ namespace Server
|
|||
|
||||
VerifySerialization();
|
||||
|
||||
MapLoader.LoadMaps();
|
||||
AssemblyHandler.Invoke("Configure");
|
||||
|
||||
TileMatrixLoader.LoadTileMatrix();
|
||||
|
|
@ -609,5 +605,17 @@ namespace Server
|
|||
Parallel.ForEach(assembly.GetTypes(), VerifyType);
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal static void WriteConsole(string message)
|
||||
{
|
||||
Console.Write("Core: {0}", message);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal static void WriteConsoleLine(string message)
|
||||
{
|
||||
Console.WriteLine("Core: {0}", message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue