v1.2.6.0 (Winter Update)

This commit is contained in:
Regalis11
2023-12-14 16:11:27 +02:00
parent af8cc89fce
commit b91e85559d
375 changed files with 7771 additions and 2874 deletions
@@ -151,13 +151,13 @@ namespace Barotrauma
output[outputOffset + 10] = (byte)((g2_565 << 5) | b2_565);
}
public static Texture2D FromFile(string path, bool compress = true, bool mipmap = false)
public static Texture2D FromFile(string path, bool compress = true, bool mipmap = false, ContentPackage contentPackage = null)
{
using FileStream fileStream = File.OpenRead(path);
return FromStream(fileStream, path, compress, mipmap);
return FromStream(fileStream, path, compress, mipmap, contentPackage);
}
public static Texture2D FromStream(System.IO.Stream stream, string path = null, bool compress = true, bool mipmap = false)
public static Texture2D FromStream(System.IO.Stream stream, string path = null, bool compress = true, bool mipmap = false, ContentPackage contentPackage = null)
{
try
{
@@ -176,7 +176,8 @@ namespace Barotrauma
}
else
{
DebugConsole.AddWarning($"Could not compress a texture because the dimensions aren't a multiple of 4 (path: {path ?? "null"}, size: {width}x{height})");
DebugConsole.AddWarning($"Could not compress a texture because the dimensions aren't a multiple of 4 (path: {path ?? "null"}, size: {width}x{height})",
contentPackage);
}
}