diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-07-09 22:30:13 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-07-09 22:30:13 -0400 |
commit | 8f96a97f070d654764de3b138678d8f62707f485 (patch) | |
tree | 9a59953e01bfc27d0f124579ae897fabec46092f /src/SMAPI.Toolkit/Serialization | |
parent | 7dd3e37dec6924b1acd3f3045aefe5ebc8f91e8f (diff) | |
parent | 60af28760a6edc509b16e7c62aa8b00ba9798793 (diff) | |
download | SMAPI-8f96a97f070d654764de3b138678d8f62707f485.tar.gz SMAPI-8f96a97f070d654764de3b138678d8f62707f485.tar.bz2 SMAPI-8f96a97f070d654764de3b138678d8f62707f485.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI.Toolkit/Serialization')
-rw-r--r-- | src/SMAPI.Toolkit/Serialization/Models/Manifest.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/SMAPI.Toolkit/Serialization/Models/Manifest.cs b/src/SMAPI.Toolkit/Serialization/Models/Manifest.cs index 99e85cbd..46b654a5 100644 --- a/src/SMAPI.Toolkit/Serialization/Models/Manifest.cs +++ b/src/SMAPI.Toolkit/Serialization/Models/Manifest.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Runtime.Serialization; using Newtonsoft.Json; using StardewModdingAPI.Toolkit.Serialization.Converters; @@ -70,5 +71,14 @@ namespace StardewModdingAPI.Toolkit.Serialization.Models this.UpdateKeys = new string[0]; this.ContentPackFor = new ManifestContentPackFor { UniqueID = contentPackFor }; } + + /// <summary>Normalize the model after it's deserialized.</summary> + /// <param name="context">The deserialization context.</param> + [OnDeserialized] + public void OnDeserialized(StreamingContext context) + { + this.Dependencies ??= new IManifestDependency[0]; + this.UpdateKeys ??= new string[0]; + } } } |