This commit is contained in:
JohnCorby 2022-08-05 16:56:04 -07:00
parent d3cc687d84
commit cb36eb4403

View File

@ -1,7 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using UnityEngine; using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.Handlers namespace NewHorizons.Handlers
{ {
@ -101,7 +100,7 @@ namespace NewHorizons.Handlers
public static bool IsBundleInUse(string assetBundle) public static bool IsBundleInUse(string assetBundle)
{ {
// If a sector in the list is null then it is always in use // If a sector in the list is null then it is always in use
if(_sectorCache.TryGetValue(assetBundle, out var sectors)) if (_sectorCache.TryGetValue(assetBundle, out var sectors))
foreach (var sector in sectors) foreach (var sector in sectors)
if (sector == null || sector.ContainsAnyOccupants(DynamicOccupant.Player | DynamicOccupant.Probe)) if (sector == null || sector.ContainsAnyOccupants(DynamicOccupant.Player | DynamicOccupant.Probe))
return true; return true;