"Show Armor" now hides boxes appropriately

This commit is contained in:
MayNL
2026-05-11 18:13:22 -04:00
parent ec04639928
commit 7ea36185fb
3 changed files with 32 additions and 1 deletions
+15
View File
@@ -150,6 +150,21 @@ namespace PckStudio.Rendering
cubes.RemoveAt(index);
}
public void HandleArmorFlags(bool showArmor)
{
for (int i = 0; i < cubes.Count; i++)
{
if (cubes[i] is CubeMesh cubeMesh)
{
bool hasArmorFlags = cubeMesh.GetCube().ArmorFlags != 0;
bool visible = !(showArmor && hasArmorFlags);
cubes[i] = cubes[i].SetVisible(visible);
}
}
}
public void ReplaceCube(int index, Vector3 position, Vector3 size, Vector2 uv, float inflate = 0f, bool mirrorTexture = false, int armorFlags = 0)
{
if (!cubes.IndexInRange(index))