Updates Data to JSON (#159)

This commit is contained in:
Kamron Batman 2020-06-19 13:53:18 -07:00 • committed by GitHub
parent d2f7e08de4
commit 1246a135f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
61 changed files with 18005 additions and 9152 deletions

View file

@ -14,12 +14,6 @@ namespace Server
{
var path = Path.Join(Core.BaseDirectory, "Data/regions.json");
// Json Deserialization options for custom objects
JsonSerializerOptions options = new JsonSerializerOptions();
options.Converters.Add(new MapConverterFactory());
options.Converters.Add(new Point3DConverterFactory());
options.Converters.Add(new Rectangle3DConverterFactory());
List<string> failures = new List<string>();
int count = 0;
@ -38,7 +32,7 @@ namespace Server
continue;
}
var region = ActivatorUtil.CreateInstance(type, json, options) as Region;
var region = ActivatorUtil.CreateInstance(type, json, JsonConfig.DefaultOptions) as Region;
region?.Register();
count++;
}