From 9fcd7f802be527cd83cb2584ded12a0e3653826e Mon Sep 17 00:00:00 2001 From: miku-666 <74728189+NessieHax@users.noreply.github.com> Date: Sat, 1 Feb 2025 11:43:35 +0100 Subject: [PATCH] Move 'hasInvalidEntries' into 'MaterialExtensions.HasInvalidEntries' --- PCK-Studio/Extensions/MaterialExtensions.cs | 17 +++++++++++++++++ PCK-Studio/PckStudio.csproj | 1 + Vendor/OMI-Lib | 2 +- 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 PCK-Studio/Extensions/MaterialExtensions.cs diff --git a/PCK-Studio/Extensions/MaterialExtensions.cs b/PCK-Studio/Extensions/MaterialExtensions.cs new file mode 100644 index 00000000..38d2a45d --- /dev/null +++ b/PCK-Studio/Extensions/MaterialExtensions.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using OMI.Formats.Material; + +namespace PckStudio.Extensions +{ + internal static class MaterialExtensions + { + public static bool HasInvalidEntries(this MaterialContainer materials) + { + return materials.Any(mat => !MaterialContainer.SupportedEntities.Contains(mat.Name) || !MaterialContainer.ValidMaterialTypes.Contains(mat.Type)); + } + } +} \ No newline at end of file diff --git a/PCK-Studio/PckStudio.csproj b/PCK-Studio/PckStudio.csproj index d50b3ebd..0aa9ac3a 100644 --- a/PCK-Studio/PckStudio.csproj +++ b/PCK-Studio/PckStudio.csproj @@ -138,6 +138,7 @@ + diff --git a/Vendor/OMI-Lib b/Vendor/OMI-Lib index a41f2eec..28ffb2e0 160000 --- a/Vendor/OMI-Lib +++ b/Vendor/OMI-Lib @@ -1 +1 @@ -Subproject commit a41f2eecc5f0034555d7f3388bc038c3d9cabea1 +Subproject commit 28ffb2e05fbee427320a1ca74358881dcfea9923