fix(core): Fixes errors from missing files (#511)

This commit is contained in:
Kamron Batman 2021-02-14 18:30:53 -08:00 • committed by GitHub
parent ea5d09a7d7
commit 8006fa20df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 54 additions and 14 deletions

View file

@ -17,6 +17,7 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Text.Json;
using System.Text.Json.Serialization;
using Server.Json;
@ -51,6 +52,10 @@ namespace Server
var stopwatch = Stopwatch.StartNew();
var maps = JsonConfig.Deserialize<List<MapDefinition>>(path);
if (maps == null)
{
throw new JsonException($"Failed to deserialize {path}.");
}
foreach (var def in maps)
{