From 06c7e4e2b92849858002835ed41c7e9cce60fde4 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Tue, 29 Dec 2020 23:58:54 -0500 Subject: show details in TRACE logs when a mod is blocked by compatibility list --- src/SMAPI.Toolkit/Framework/ModData/ModDataField.cs | 1 + src/SMAPI.Toolkit/Framework/ModData/ModDataFieldKey.cs | 5 ++++- src/SMAPI.Toolkit/Framework/ModData/ModDataRecord.cs | 5 +++++ src/SMAPI.Toolkit/Framework/ModData/ModDataRecordVersionedFields.cs | 3 +++ 4 files changed, 13 insertions(+), 1 deletion(-) (limited to 'src/SMAPI.Toolkit/Framework/ModData') diff --git a/src/SMAPI.Toolkit/Framework/ModData/ModDataField.cs b/src/SMAPI.Toolkit/Framework/ModData/ModDataField.cs index b3954693..44422f01 100644 --- a/src/SMAPI.Toolkit/Framework/ModData/ModDataField.cs +++ b/src/SMAPI.Toolkit/Framework/ModData/ModDataField.cs @@ -71,6 +71,7 @@ namespace StardewModdingAPI.Toolkit.Framework.ModData // non-manifest fields case ModDataFieldKey.AlternativeUrl: case ModDataFieldKey.StatusReasonPhrase: + case ModDataFieldKey.StatusReasonDetails: case ModDataFieldKey.Status: return false; diff --git a/src/SMAPI.Toolkit/Framework/ModData/ModDataFieldKey.cs b/src/SMAPI.Toolkit/Framework/ModData/ModDataFieldKey.cs index 09dd0cc5..068291aa 100644 --- a/src/SMAPI.Toolkit/Framework/ModData/ModDataFieldKey.cs +++ b/src/SMAPI.Toolkit/Framework/ModData/ModDataFieldKey.cs @@ -13,6 +13,9 @@ namespace StardewModdingAPI.Toolkit.Framework.ModData Status, /// A reason phrase for the , or null to use the default reason. - StatusReasonPhrase + StatusReasonPhrase, + + /// Technical details shown in TRACE logs for the , or null to omit it. + StatusReasonDetails } } diff --git a/src/SMAPI.Toolkit/Framework/ModData/ModDataRecord.cs b/src/SMAPI.Toolkit/Framework/ModData/ModDataRecord.cs index 3201c421..f28f6afe 100644 --- a/src/SMAPI.Toolkit/Framework/ModData/ModDataRecord.cs +++ b/src/SMAPI.Toolkit/Framework/ModData/ModDataRecord.cs @@ -107,6 +107,11 @@ namespace StardewModdingAPI.Toolkit.Framework.ModData case ModDataFieldKey.StatusReasonPhrase: parsed.StatusReasonPhrase = field.Value; break; + + // status technical reason + case ModDataFieldKey.StatusReasonDetails: + parsed.StatusReasonDetails = field.Value; + break; } } diff --git a/src/SMAPI.Toolkit/Framework/ModData/ModDataRecordVersionedFields.cs b/src/SMAPI.Toolkit/Framework/ModData/ModDataRecordVersionedFields.cs index 598da66a..f0282eb4 100644 --- a/src/SMAPI.Toolkit/Framework/ModData/ModDataRecordVersionedFields.cs +++ b/src/SMAPI.Toolkit/Framework/ModData/ModDataRecordVersionedFields.cs @@ -24,6 +24,9 @@ namespace StardewModdingAPI.Toolkit.Framework.ModData /// A reason phrase for the , or null to use the default reason. public string StatusReasonPhrase { get; set; } + /// Technical details shown in TRACE logs for the , or null to omit it. + public string StatusReasonDetails { get; set; } + /// The upper version for which the applies (if any). public ISemanticVersion StatusUpperVersion { get; set; } } -- cgit