Requires DLC check was NREing

This commit is contained in:
Nick 2024-02-07 11:19:22 -05:00
parent e1c23b2a84
commit 563370119a
2 changed files with 15 additions and 6 deletions

View File

@ -28,11 +28,20 @@ namespace NewHorizons.External
public bool RequiresDLC() public bool RequiresDLC()
{ {
var detailPaths = Config.Props.details.Select(x => x.path); try
return Config.Cloak != null {
|| Config.Props?.rafts != null var detailPaths = Config?.Props?.details?.Select(x => x.path) ?? Array.Empty<string>();
|| Config.Props?.slideShows != null return Config?.Cloak != null
|| detailPaths.Any(x => x.StartsWith("RingWorld_Body") || x.StartsWith("DreamWorld_Body")); || Config?.Props?.rafts != null
|| Config?.Props?.slideShows != null
|| detailPaths.Any(x => x.StartsWith("RingWorld_Body") || x.StartsWith("DreamWorld_Body"));
}
catch
{
NHLogger.LogWarning($"Failed to check if {Mod.ModHelper.Manifest.Name} requires the DLC");
return false;
}
} }
#region Cache #region Cache

View File

@ -4,7 +4,7 @@
"author": "xen, Bwc9876, clay, MegaPiggy, John, Trifid, Hawkbar, Book", "author": "xen, Bwc9876, clay, MegaPiggy, John, Trifid, Hawkbar, Book",
"name": "New Horizons", "name": "New Horizons",
"uniqueName": "xen.NewHorizons", "uniqueName": "xen.NewHorizons",
"version": "1.18.5", "version": "1.18.6",
"owmlVersion": "2.9.8", "owmlVersion": "2.9.8",
"dependencies": [ "JohnCorby.VanillaFix", "_nebula.MenuFramework", "xen.CommonCameraUtility", "dgarro.CustomShipLogModes" ], "dependencies": [ "JohnCorby.VanillaFix", "_nebula.MenuFramework", "xen.CommonCameraUtility", "dgarro.CustomShipLogModes" ],
"conflicts": [ "Raicuparta.QuantumSpaceBuddies", "PacificEngine.OW_CommonResources" ], "conflicts": [ "Raicuparta.QuantumSpaceBuddies", "PacificEngine.OW_CommonResources" ],