Fixes data file loading (#145)
This commit is contained in:
parent
eb0f960be6
commit
5ea11cef11
10 changed files with 70 additions and 100 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue