diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-07-06 15:17:47 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-07-06 15:17:47 -0400 |
commit | e2b9a4bab3e078851a289ad0a19b555dde09308e (patch) | |
tree | 335df3774e8bdb26bf09663296219df3eb1cea82 /src/StardewModdingAPI/Framework/Serialisation | |
parent | f14b3399a42336000f32a72f7674791896f03cb7 (diff) | |
download | SMAPI-e2b9a4bab3e078851a289ad0a19b555dde09308e.tar.gz SMAPI-e2b9a4bab3e078851a289ad0a19b555dde09308e.tar.bz2 SMAPI-e2b9a4bab3e078851a289ad0a19b555dde09308e.zip |
serialise SButtons as string in config.json (#316)
Diffstat (limited to 'src/StardewModdingAPI/Framework/Serialisation')
-rw-r--r-- | src/StardewModdingAPI/Framework/Serialisation/JsonHelper.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/StardewModdingAPI/Framework/Serialisation/JsonHelper.cs b/src/StardewModdingAPI/Framework/Serialisation/JsonHelper.cs index 6431394c..3193aa3c 100644 --- a/src/StardewModdingAPI/Framework/Serialisation/JsonHelper.cs +++ b/src/StardewModdingAPI/Framework/Serialisation/JsonHelper.cs @@ -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)) } }; |