serialise SButtons as string in config.json (#316)

This commit is contained in:
Jesse Plamondon-Willard 2017-07-06 15:17:47 -04:00
parent f14b3399a4
commit e2b9a4bab3
1 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.IO;
using Microsoft.Xna.Framework.Input;
using Newtonsoft.Json;
using StardewModdingAPI.Utilities;
namespace StardewModdingAPI.Framework.Serialisation
{
@ -19,7 +20,7 @@ namespace StardewModdingAPI.Framework.Serialisation
ObjectCreationHandling = ObjectCreationHandling.Replace, // avoid issue where default ICollection<T> values are duplicated each time the config is loaded
Converters = new List<JsonConverter>
{
new SelectiveStringEnumConverter(typeof(Buttons), typeof(Keys))
new SelectiveStringEnumConverter(typeof(Buttons), typeof(Keys), typeof(SButton))
}
};