(9122340aa) Fixed inability to enable content packages if some of the files included in the package are already in the game folder (which may happen, for example, if enabling a content package fails)
This commit is contained in:
@@ -162,6 +162,23 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the file paths of all files of the given type in the content packages.
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="searchAllContentPackages">If true, also returns files in content packages that are installed but not currently selected.</param>
|
||||
public IEnumerable<string> GetFilesOfType(ContentType type, bool searchAllContentPackages = false)
|
||||
{
|
||||
if (searchAllContentPackages)
|
||||
{
|
||||
return ContentPackage.GetFilesOfType(ContentPackage.List, type);
|
||||
}
|
||||
else
|
||||
{
|
||||
return ContentPackage.GetFilesOfType(SelectedPackages, type);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the file paths of all files of the given type in the currently selected content packages.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user