Fixes data file loading (#145)

This commit is contained in:
Kamron Batman 2020-05-25 00:37:46 -07:00 • committed by GitHub
parent eb0f960be6
commit 5ea11cef11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 70 additions and 100 deletions

View file

@ -184,20 +184,6 @@ namespace Server
{
var filePath = Core.FindDataFile("tiledata.mul");
if (!File.Exists(filePath))
{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("tiledata.mul was not found");
Console.WriteLine("Make sure your modernuo.json is properly configured");
Console.WriteLine("After pressing return an exception will be thrown and the server will terminate");
Console.ResetColor();
Utility.PushColor(ConsoleColor.Red);
Console.WriteLine($"TileData: {filePath} not found");
Utility.PopColor();
return;
}
using var fs = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.Read);
var bin = new BinaryReader(fs);