mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 10:17:22 +01:00
Fix swapping universal hairstyles for midlanders breaking them for others.
This commit is contained in:
parent
6493394256
commit
29d01e698b
2 changed files with 6 additions and 5 deletions
|
|
@ -22,10 +22,11 @@ public static class MaterialHandling
|
|||
|
||||
// All hairstyles above 116 are shared except for Hrothgar
|
||||
if (hairId.Value is >= 116 and <= 200)
|
||||
{
|
||||
return actualGr.Split().Item1 == Gender.Female ? GenderRace.MidlanderFemale : GenderRace.MidlanderMale;
|
||||
}
|
||||
|
||||
return actualGr;
|
||||
}
|
||||
|
||||
public static bool IsSpecialCase(GenderRace gr, SetId hairId)
|
||||
=> gr is GenderRace.MidlanderMale or GenderRace.MidlanderFemale && hairId.Value is >= 101 and <= 200;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,9 +60,9 @@ public static class CustomizationSwap
|
|||
var mtrlToPath = GamePaths.Character.Mtrl.Path( race, slot, idTo, fileName, out var gameRaceTo, out var gameSetIdTo, variant );
|
||||
|
||||
var newFileName = fileName;
|
||||
newFileName = ItemSwap.ReplaceRace( newFileName, gameRaceTo, race, gameRaceTo != race );
|
||||
newFileName = ItemSwap.ReplaceBody( newFileName, slot, idTo, idFrom, idFrom.Value != idTo.Value );
|
||||
newFileName = ItemSwap.AddSuffix( newFileName, ".mtrl", $"_c{race.ToRaceCode()}", gameRaceFrom != race );
|
||||
newFileName = ItemSwap.ReplaceRace( newFileName, gameRaceTo, race, gameRaceTo != race );
|
||||
newFileName = ItemSwap.ReplaceBody( newFileName, slot, idTo, idFrom, idFrom.Value != idTo.Value );
|
||||
newFileName = ItemSwap.AddSuffix( newFileName, ".mtrl", $"_c{race.ToRaceCode()}", gameRaceFrom != race || MaterialHandling.IsSpecialCase( race, idFrom ) );
|
||||
newFileName = ItemSwap.AddSuffix( newFileName, ".mtrl", $"_{slot.ToAbbreviation()}{idFrom.Value:D4}", gameSetIdFrom.Value != idFrom.Value );
|
||||
|
||||
var actualMtrlFromPath = mtrlFromPath;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue