Skip to content

Commit 0ae6fea

Browse files
committed
- Move .rgsp files into the correct category when cleaning up the modlist.
- Pull .avfx file existence from cached index when cloning roots.
1 parent a9b392b commit 0ae6fea

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

xivModdingFramework/General/CMP.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,18 @@ internal static async Task RestoreDefaultScaling(string rgspPath, IndexFile inde
8181
await RestoreDefaultScaling(race, gender, index, modlist);
8282
}
8383

84+
internal static string GetModFileNameFromRgspPath(string path)
85+
{
86+
var match = RgspPathExtractFormat.Match(path);
87+
if (!match.Success) return null;
88+
89+
var race = (XivSubRace)Int32.Parse(match.Groups[1].Value);
90+
var gender = (XivGender)Int32.Parse(match.Groups[2].Value);
91+
92+
var name = race.GetDisplayName() + " - " + gender.ToString();
93+
return name;
94+
}
95+
8496
public static string GetRgspPath(XivSubRace race, XivGender gender)
8597
{
8698
var subraceId = (int)race;

xivModdingFramework/Mods/Modding.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -700,8 +700,17 @@ public async Task CleanUpModlist(IProgress<(int Current, int Total, string Messa
700700
root = await XivCache.GetFirstRoot(mod.fullPath);
701701
if(root == null)
702702
{
703-
mod.name = Path.GetFileName(mod.fullPath);
704-
mod.category = "Raw Files";
703+
var cmpName = CMP.GetModFileNameFromRgspPath(mod.fullPath);
704+
if (cmpName != null)
705+
{
706+
mod.name = cmpName;
707+
mod.category = "Racial Scaling";
708+
}
709+
else
710+
{
711+
mod.name = Path.GetFileName(mod.fullPath);
712+
mod.category = "Raw Files";
713+
}
705714
continue;
706715
}
707716

xivModdingFramework/Mods/RootCloner.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public static async Task<Dictionary<string, string>> CloneRoot(XivDependencyRoot
106106
if (String.IsNullOrEmpty(avfxStuff.Folder) || String.IsNullOrEmpty(avfxStuff.File)) continue;
107107

108108
var path = avfxStuff.Folder + "/" + avfxStuff.File;
109-
if (await _index.FileExists(path))
109+
if (index.FileExists(path))
110110
{
111111
originalVfxPaths.Add(path);
112112
}

0 commit comments

Comments
 (0)