summaryrefslogtreecommitdiff
path: root/src/SMAPI.Toolkit/Framework/ModData/ModDataRecord.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-05-01 18:16:09 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-05-01 18:16:09 -0400
commitc8ad50dad1d706a1901798f9396f6becfea36c0e (patch)
tree28bd818a5db39ec5ece1bd141a28de955950463b /src/SMAPI.Toolkit/Framework/ModData/ModDataRecord.cs
parent451b70953ff4c0b1b27ae0de203ad99379b45b2a (diff)
parentf78093bdb58d477b400cde3f19b70ffd6ddf833d (diff)
downloadSMAPI-c8ad50dad1d706a1901798f9396f6becfea36c0e.tar.gz
SMAPI-c8ad50dad1d706a1901798f9396f6becfea36c0e.tar.bz2
SMAPI-c8ad50dad1d706a1901798f9396f6becfea36c0e.zip
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI.Toolkit/Framework/ModData/ModDataRecord.cs')
-rw-r--r--src/SMAPI.Toolkit/Framework/ModData/ModDataRecord.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/SMAPI.Toolkit/Framework/ModData/ModDataRecord.cs b/src/SMAPI.Toolkit/Framework/ModData/ModDataRecord.cs
index 5dd32acf..ab0e4377 100644
--- a/src/SMAPI.Toolkit/Framework/ModData/ModDataRecord.cs
+++ b/src/SMAPI.Toolkit/Framework/ModData/ModDataRecord.cs
@@ -20,7 +20,7 @@ namespace StardewModdingAPI.Toolkit.Framework.ModData
public string[] FormerIDs { get; }
/// <summary>The mod warnings to suppress, even if they'd normally be shown.</summary>
- public ModWarning SuppressWarnings { get; set; }
+ public ModWarning SuppressWarnings { get; }
/// <summary>The versioned field data.</summary>
public ModDataField[] Fields { get; }
@@ -70,9 +70,9 @@ namespace StardewModdingAPI.Toolkit.Framework.ModData
}
/// <summary>Get the default update key for this mod, if any.</summary>
- public string GetDefaultUpdateKey()
+ public string? GetDefaultUpdateKey()
{
- string updateKey = this.Fields.FirstOrDefault(p => p.Key == ModDataFieldKey.UpdateKey && p.IsDefault)?.Value;
+ string? updateKey = this.Fields.FirstOrDefault(p => p.Key == ModDataFieldKey.UpdateKey && p.IsDefault)?.Value;
return !string.IsNullOrWhiteSpace(updateKey)
? updateKey
: null;
@@ -80,9 +80,9 @@ namespace StardewModdingAPI.Toolkit.Framework.ModData
/// <summary>Get a parsed representation of the <see cref="ModDataRecord.Fields"/> which match a given manifest.</summary>
/// <param name="manifest">The manifest to match.</param>
- public ModDataRecordVersionedFields GetVersionedFields(IManifest manifest)
+ public ModDataRecordVersionedFields GetVersionedFields(IManifest? manifest)
{
- ModDataRecordVersionedFields parsed = new ModDataRecordVersionedFields { DisplayName = this.DisplayName, DataRecord = this };
+ ModDataRecordVersionedFields parsed = new(this);
foreach (ModDataField field in this.Fields.Where(field => field.IsMatch(manifest)))
{
switch (field.Key)