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,12 +28,21 @@ namespace NewHorizons.External
public bool RequiresDLC()
{
var detailPaths = Config.Props.details.Select(x => x.path);
return Config.Cloak != null
|| Config.Props?.rafts != null
|| Config.Props?.slideShows != null
try
{
var detailPaths = Config?.Props?.details?.Select(x => x.path) ?? Array.Empty<string>();
return Config?.Cloak != null
|| 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
public void LoadCache()

View File

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