Skip to content

Commit

Permalink
Add support for regenerating the parameter database
Browse files Browse the repository at this point in the history
  • Loading branch information
shibbo committed Nov 8, 2023
1 parent 65334a8 commit 89038bc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Fushigi/param/ParamDB.cs
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,15 @@ public static void Load()
sIsInit = true;
}

public static void Reload()
{
sActors.Clear();
sComponents.Clear();
sRails.Clear();
sRailParamList.Clear();
Load();
}

static Component ReadByml(Byml.Byml byml)
{
var root = (BymlHashTable)byml.Root;
Expand Down
8 changes: 8 additions & 0 deletions Fushigi/ui/MainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
using System.Numerics;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using static System.Net.Mime.MediaTypeNames;
using System.Reflection;
using System.Diagnostics;

namespace Fushigi.ui
{
Expand Down Expand Up @@ -179,6 +182,11 @@ void DrawMainMenu(GL gl)
mIsChoosingPreferences = true;
}

if (ImGui.MenuItem("Regenerate Parameter Database", ParamDB.sIsInit)) {
ParamDB.sIsInit = false;
ParamDB.Reload();
}

/* end Edit menu */
ImGui.EndMenu();
}
Expand Down

0 comments on commit 89038bc

Please sign in to comment.