Skip to content

Commit

Permalink
move post-load fmginfo edits
Browse files Browse the repository at this point in the history
  • Loading branch information
Philiquaz committed May 24, 2024
1 parent 64d97b6 commit 6980550
Showing 1 changed file with 13 additions and 17 deletions.
30 changes: 13 additions & 17 deletions src/StudioCore/TextEditor/FMGBank.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,23 +101,6 @@ private bool LoadItemMenuMsgBnds(AssetDescription itemMsgPath, AssetDescription
return false;
}

foreach (FMGInfo info in FmgInfoBank)
{
ApplyGameDifferences(info);
if (CFG.Current.FMG_NoGroupedFmgEntries)
{
info.EntryType = FmgEntryTextType.TextBody;
}
}

if (!CFG.Current.FMG_NoFmgPatching)
{
foreach (FMGInfo info in FmgInfoBank)
{
SetFMGInfoPatchParent(info);
}
}

if (CFG.Current.FMG_NoGroupedFmgEntries)
{
FmgInfoBank = FmgInfoBank.OrderBy(e => e.EntryCategory).ThenBy(e => e.FmgID).ToList();
Expand Down Expand Up @@ -173,6 +156,19 @@ private bool LoadMsgBnd(string path, string msgBndType = "UNDEFINED")
{
FmgInfoBank.Add(GenerateFMGInfo(file));
}
// I hate this 2 parse system. Solve game differences by including game in the get enum functions. Maybe parentage is solvable by pre-sorting binderfiles but that does seem silly. FMG patching sucks.
foreach (FMGInfo info in FmgInfoBank)
{
ApplyGameDifferences(info);
if (CFG.Current.FMG_NoGroupedFmgEntries)
{
info.EntryType = FmgEntryTextType.TextBody;
}
if (!CFG.Current.FMG_NoFmgPatching)
{
SetFMGInfoPatchParent(info);
}
}

fmgBinder.Dispose();
return true;
Expand Down

0 comments on commit 6980550

Please sign in to comment.