OBT/1.2.0(Spring Update)

Sync with Upstream
This commit is contained in:
NotAlwaysTrue
2026-04-25 13:25:41 +08:00
committed by GitHub
parent 5207b381b7
commit 59bc21973a
421 changed files with 24090 additions and 11391 deletions
@@ -106,9 +106,10 @@ namespace Barotrauma
void AddTexturePath(string path)
{
if (string.IsNullOrEmpty(path)) { return; }
var contentPath = ContentPath.FromRaw(characterPrefab.ContentPackage, ragdollParams.Texture);
//if the path contains a gender variable, we can't load it yet because we don't know which gender we need
if (path.Contains("[GENDER]")) { return; }
texturePaths.Add(ContentPath.FromRaw(characterPrefab.ContentPackage, ragdollParams.Texture));
if (contentPath.FullPath.Contains("[GENDER]")) { return; }
texturePaths.Add(contentPath);
}
}
#endif
@@ -199,9 +199,16 @@ namespace Barotrauma
try
{
return success(doc.Root.GetAttributeBool("corepackage", false)
ContentPackage contentPackage = doc.Root.GetAttributeBool("corepackage", false)
? new CorePackage(doc, path)
: new RegularPackage(doc, path));
: new RegularPackage(doc, path);
if (System.IO.Path.GetFileNameWithoutExtension(path)?.Any(char.IsUpper) is true)
{
DebugConsole.ThrowError($"Invalid filename casing. Please rename \"filelist.xml\" so it is entirely lowercase.", contentPackage: contentPackage);
}
return success(contentPackage);
}
catch (Exception e)
{
@@ -9,8 +9,10 @@ using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Xml.Linq;
using Barotrauma.IO;
using Barotrauma.LuaCs.Events;
using Barotrauma.Steam;
using Microsoft.Xna.Framework;
using OneOf.Types;
namespace Barotrauma
{
@@ -48,7 +50,10 @@ namespace Barotrauma
public static ImmutableArray<RegularPackage>? Regular;
}
public static void SetCore(CorePackage newCore) => SetCoreEnumerable(newCore).Consume();
public static void SetCore(CorePackage newCore)
{
SetCoreEnumerable(newCore).Consume();
}
public static IEnumerable<LoadProgress> SetCoreEnumerable(CorePackage newCore)
{
@@ -85,7 +90,9 @@ namespace Barotrauma
}
public static void SetRegular(IReadOnlyList<RegularPackage> newRegular)
=> SetRegularEnumerable(newRegular).Consume();
{
SetRegularEnumerable(newRegular).Consume();
}
public static IEnumerable<LoadProgress> SetRegularEnumerable(IReadOnlyList<RegularPackage> inNewRegular)
{
@@ -583,6 +590,11 @@ namespace Barotrauma
package.UgcId.TryUnwrap(out var ugcId) && ugcId is SteamWorkshopId workshopId && workshopId.Value == childUgcItemId.Value));
foreach (var missingChild in missingChildren)
{
if (missingChild.ToString() == "2559634234" ||
missingChild.ToString() == "2795927223")
{
continue;
}
enabledPackage.AddMissingDependency(missingChild);
}
});
@@ -597,4 +609,4 @@ namespace Barotrauma
}
}
}
}
}
@@ -99,12 +99,13 @@ namespace Barotrauma
public static ContentPath FromRaw(ContentPackage? contentPackage, string? rawValue)
{
var newRaw = new ContentPath(contentPackage, rawValue);
if (prevCreatedRaw is not null && prevCreatedRaw.ContentPackage == contentPackage &&
// Removed as this almost never happens but makes the constructor not thread-safe.
/*if (prevCreatedRaw is not null && prevCreatedRaw.ContentPackage == contentPackage &&
prevCreatedRaw.RawValue == rawValue)
{
newRaw.cachedValue = prevCreatedRaw.Value;
}
prevCreatedRaw = newRaw;
prevCreatedRaw = newRaw;*/
return newRaw;
}
@@ -158,4 +159,4 @@ namespace Barotrauma
public override string? ToString() => Value;
}
}
}