use cs package from backup packages
This commit is contained in:
@@ -36,7 +36,7 @@ namespace Barotrauma
|
||||
? (Core as ContentPackage).ToEnumerable().CollectionConcat(Regular)
|
||||
: Enumerable.Empty<ContentPackage>();
|
||||
|
||||
private static class BackupPackages
|
||||
public static class BackupPackages
|
||||
{
|
||||
public static CorePackage? Core;
|
||||
public static ImmutableArray<RegularPackage>? Regular;
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace Barotrauma
|
||||
}
|
||||
|
||||
|
||||
public static ContentPackage GetPackage(Identifier name, bool fallbackToAll = true)
|
||||
public static ContentPackage GetPackage(Identifier name, bool fallbackToAll = true, bool useBackup = false)
|
||||
{
|
||||
foreach (ContentPackage package in ContentPackageManager.EnabledPackages.All)
|
||||
{
|
||||
@@ -113,6 +113,17 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
if (useBackup)
|
||||
{
|
||||
foreach (ContentPackage package in ContentPackageManager.EnabledPackages.BackupPackages.Regular)
|
||||
{
|
||||
if (package.NameMatches(name))
|
||||
{
|
||||
return package;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -435,7 +446,7 @@ namespace Barotrauma
|
||||
lua.Globals["CLIENT"] = IsClient;
|
||||
|
||||
|
||||
if (GetPackage("CsForBarotrauma", false) != null)
|
||||
if (GetPackage("CsForBarotrauma", false, true) != null)
|
||||
{
|
||||
PrintMessage("Cs! Version " + AssemblyInfo.GitRevision);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user