Skip to content

Commit 2a48cc4

Browse files
committed
Added optional parameter to specify body number
1 parent 7589823 commit 2a48cc4

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

xivModdingFramework/Models/Helpers/ModelModifiers.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,7 +1182,7 @@ public static void FixUpSkinReferences(TTModel model, string newInternalPath, Ac
11821182
/// </summary>
11831183
/// <param name="model"></param>
11841184
/// <param name="newInternalPath"></param>
1185-
public static void FixUpSkinReferences(TTModel model, XivRace baseRace, Action<bool, string> loggingFunction = null)
1185+
public static void FixUpSkinReferences(TTModel model, XivRace baseRace, Action<bool, string> loggingFunction = null, string bodyReplacement = "")
11861186
{
11871187
if (loggingFunction == null)
11881188
{
@@ -1208,7 +1208,12 @@ public static void FixUpSkinReferences(TTModel model, XivRace baseRace, Action<b
12081208
m.Material = m.Material.Replace(mtrlMatch.Groups[1].Value, skinRaceString);
12091209

12101210
// Reset the body ID if we actually changed races.
1211-
m.Material = bodyRegex.Replace(m.Material, "b0001");
1211+
bodyReplacement = string.IsNullOrEmpty(bodyReplacement) ? "b0001" : bodyReplacement;
1212+
m.Material = bodyRegex.Replace(m.Material, bodyReplacement);
1213+
}
1214+
else if (bodyReplacement != "")
1215+
{
1216+
m.Material = bodyRegex.Replace(m.Material, bodyReplacement);
12121217
}
12131218
}
12141219
}

0 commit comments

Comments
 (0)