Updates teleporter generator (#105)
This commit is contained in:
parent
141ec11330
commit
be0c33bc8a
5 changed files with 15228 additions and 1440 deletions
15
Projects/Server/JsonConverters/MapConverter.cs
Normal file
15
Projects/Server/JsonConverters/MapConverter.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue