Updates teleporter generator (#105)

This commit is contained in:
Kamron Batman 2020-04-12 23:04:44 -07:00 • committed by GitHub
parent 141ec11330
commit be0c33bc8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 15228 additions and 1440 deletions

View file

@ -0,0 +1,15 @@
using System;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Server.Json
{
public class MapConverter : JsonConverter<Map>
{
public override Map Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
=> Map.Parse(reader.GetString());
public override void Write(Utf8JsonWriter writer, Map value, JsonSerializerOptions options)
=> writer.WriteStringValue(value.Name);
}
}