diff --git a/Directory.Build.props b/Directory.Build.props index 39676097b..6eed0ce40 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -20,7 +20,7 @@ changes! --> 3.0.26 - 48 + 49 $(NitrocidModAPIVersionMajor).$(NitrocidModAPIVersionChangeset) diff --git a/private/Nitrocid.Tests/Nitrocid.Tests.csproj b/private/Nitrocid.Tests/Nitrocid.Tests.csproj index cee1d7509..739c435ec 100644 --- a/private/Nitrocid.Tests/Nitrocid.Tests.csproj +++ b/private/Nitrocid.Tests/Nitrocid.Tests.csproj @@ -62,7 +62,7 @@ - + diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Nitrocid.Extras.Amusements.csproj b/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Nitrocid.Extras.Amusements.csproj index b7aad760f..330bba8d8 100644 --- a/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Nitrocid.Extras.Amusements.csproj +++ b/public/Nitrocid.Addons/Nitrocid.Extras.Amusements/Nitrocid.Extras.Amusements.csproj @@ -37,7 +37,7 @@ - + diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.ArchiveShell/Nitrocid.Extras.ArchiveShell.csproj b/public/Nitrocid.Addons/Nitrocid.Extras.ArchiveShell/Nitrocid.Extras.ArchiveShell.csproj index 7c97cad21..142d80905 100644 --- a/public/Nitrocid.Addons/Nitrocid.Extras.ArchiveShell/Nitrocid.Extras.ArchiveShell.csproj +++ b/public/Nitrocid.Addons/Nitrocid.Extras.ArchiveShell/Nitrocid.Extras.ArchiveShell.csproj @@ -38,7 +38,7 @@ - + diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.Contacts/Nitrocid.Extras.Contacts.csproj b/public/Nitrocid.Addons/Nitrocid.Extras.Contacts/Nitrocid.Extras.Contacts.csproj index da4508bcc..8a5cba22c 100644 --- a/public/Nitrocid.Addons/Nitrocid.Extras.Contacts/Nitrocid.Extras.Contacts.csproj +++ b/public/Nitrocid.Addons/Nitrocid.Extras.Contacts/Nitrocid.Extras.Contacts.csproj @@ -37,7 +37,7 @@ - + diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.Forecast/Forecast/Forecast.cs b/public/Nitrocid.Addons/Nitrocid.Extras.Forecast/Forecast/Forecast.cs index 13a9140f6..8b457fcf9 100644 --- a/public/Nitrocid.Addons/Nitrocid.Extras.Forecast/Forecast/Forecast.cs +++ b/public/Nitrocid.Addons/Nitrocid.Extras.Forecast/Forecast/Forecast.cs @@ -83,9 +83,8 @@ T Adjust(string dayPartData) { var dayPartArray = WeatherInfo.WeatherToken["daypart"][0][dayPartData]; var adjusted = dayPartArray[0]; - if (adjusted.Type == JTokenType.Null) - adjusted = dayPartArray[1]; - return (T)adjusted.ToObject(typeof(T)); + adjusted ??= dayPartArray[1]; + return adjusted.GetValue(); } string WeatherSpecifier = "°"; diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.Forecast/Forecast/Interactive/WeatherCli.cs b/public/Nitrocid.Addons/Nitrocid.Extras.Forecast/Forecast/Interactive/WeatherCli.cs index 72bd04890..b1d97a63b 100644 --- a/public/Nitrocid.Addons/Nitrocid.Extras.Forecast/Forecast/Interactive/WeatherCli.cs +++ b/public/Nitrocid.Addons/Nitrocid.Extras.Forecast/Forecast/Interactive/WeatherCli.cs @@ -57,9 +57,8 @@ T Adjust(string dayPartData) { var dayPartArray = WeatherInfo.WeatherToken["daypart"][0][dayPartData]; var adjusted = dayPartArray[0]; - if (adjusted.Type == JTokenType.Null) - adjusted = dayPartArray[1]; - return (T)adjusted.ToObject(typeof(T)); + adjusted ??= dayPartArray[1]; + return adjusted.GetValue(); } // Print them to a string diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.NameGen/Nitrocid.Extras.NameGen.csproj b/public/Nitrocid.Addons/Nitrocid.Extras.NameGen/Nitrocid.Extras.NameGen.csproj index f94aaaf19..89dbd64bf 100644 --- a/public/Nitrocid.Addons/Nitrocid.Extras.NameGen/Nitrocid.Extras.NameGen.csproj +++ b/public/Nitrocid.Addons/Nitrocid.Extras.NameGen/Nitrocid.Extras.NameGen.csproj @@ -41,7 +41,7 @@ - + diff --git a/public/Nitrocid.Addons/Nitrocid.Extras.UnitConv/Nitrocid.Extras.UnitConv.csproj b/public/Nitrocid.Addons/Nitrocid.Extras.UnitConv/Nitrocid.Extras.UnitConv.csproj index 450f46e8d..4c48002e5 100644 --- a/public/Nitrocid.Addons/Nitrocid.Extras.UnitConv/Nitrocid.Extras.UnitConv.csproj +++ b/public/Nitrocid.Addons/Nitrocid.Extras.UnitConv/Nitrocid.Extras.UnitConv.csproj @@ -39,7 +39,7 @@ - + diff --git a/public/Nitrocid.Addons/Nitrocid.ScreensaverPacks/Nitrocid.ScreensaverPacks.csproj b/public/Nitrocid.Addons/Nitrocid.ScreensaverPacks/Nitrocid.ScreensaverPacks.csproj index 757e734bf..2c207cd7e 100644 --- a/public/Nitrocid.Addons/Nitrocid.ScreensaverPacks/Nitrocid.ScreensaverPacks.csproj +++ b/public/Nitrocid.Addons/Nitrocid.ScreensaverPacks/Nitrocid.ScreensaverPacks.csproj @@ -41,7 +41,7 @@ - + diff --git a/public/Nitrocid/Nitrocid.csproj b/public/Nitrocid/Nitrocid.csproj index 2ef3368d9..f6441d465 100644 --- a/public/Nitrocid/Nitrocid.csproj +++ b/public/Nitrocid/Nitrocid.csproj @@ -52,12 +52,12 @@ - - + + global,TextifyDep - - + +