Skip to content

Commit 2469e19

Browse files
committed
Test setting texid "properly"?
1 parent 32e0778 commit 2469e19

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

altClothTool.App/Builders/Base/ResourceBuilderBase.cs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ private List<MUnk_254518642> GetTexDataForCloth(ClothData clothData)
6363
return items;
6464
}
6565

66-
/// TODO DURTY: verify if its really based on index? Shouldnt be like this actually, because its connected to skin tone or something
67-
private static byte GetTexIdByDrawableType(ClothData clothData, int index)
66+
// TODO DURTY: verify if its really based on index? Shouldnt be like this actually, because its connected to skin tone or something
67+
private byte GetTexIdByDrawableType(ClothData clothData, int index = 1)
6868
{
6969
byte texId = (byte) index;
7070
switch (clothData.DrawableType)
@@ -75,6 +75,9 @@ private static byte GetTexIdByDrawableType(ClothData clothData, int index)
7575
case ClothNameResolver.DrawableTypes.Shoes:
7676
texId = 0;
7777
break;
78+
case ClothNameResolver.DrawableTypes.Mask:
79+
texId = 1;
80+
break;
7881
}
7982
return texId;
8083
}
@@ -169,13 +172,7 @@ protected MCComponentInfo GenerateYmtPedComponentItem(ClothData clothData, ref M
169172
}
170173
};
171174

172-
byte texId = (byte) (clothData.MainPath.EndsWith("_u.ydd") ? 0 : 1);
173-
174-
if (clothData.DrawableType == ClothNameResolver.DrawableTypes.Mask)
175-
{
176-
texId = 1;
177-
}
178-
175+
byte texId = GetTexIdByDrawableType(clothData);
179176
foreach (string texPath in clothData.Textures)
180177
{
181178
MUnk_1036962405 texInfo = new MUnk_1036962405

0 commit comments

Comments
 (0)