mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-19 15:51:48 +00:00
oops fix bad code
This commit is contained in:
1 parent
3b7b247ac0
commit
130236e899
2 files changed
+12
-5
No files matched your search
@@ -87,8 +87,6 @@ internal static class GamePresetsTabPatches
|
||||
_newDivider.SetActive(GameSettingMenuPatches.SelectedModIdx != 0);
|
||||
}
|
||||
|
||||
Refresh();
|
||||
|
||||
var prefab = GameSettingMenu.Instance.GameSettingsButton;
|
||||
|
||||
foreach (var preset in MiraPluginManager.Instance.RegisteredPlugins.SelectMany(x => x.Presets))
|
||||
@@ -333,7 +331,7 @@ internal static class GamePresetsTabPatches
|
||||
}
|
||||
}
|
||||
|
||||
private static void Refresh()
|
||||
public static void Refresh()
|
||||
{
|
||||
Logger<MiraApiPlugin>.Error("Refreshing presets");
|
||||
if (GameSettingMenuPatches.SelectedMod == null)
|
||||
|
||||
@@ -40,7 +40,11 @@ internal static class GameSettingMenuPatches
|
||||
{
|
||||
if ((previewOnly && Controller.currentTouchType == Controller.TouchType.Joystick) || !previewOnly)
|
||||
{
|
||||
if (_modifiersTab) _modifiersTab!.gameObject.SetActive(tabNum == 3);
|
||||
if (_modifiersTab)
|
||||
{
|
||||
_modifiersTab!.gameObject.SetActive(tabNum == 3);
|
||||
}
|
||||
|
||||
_modifiersButton?.SelectButton(tabNum == 3);
|
||||
_smallRolesButton?.SelectButton(tabNum == 2);
|
||||
if (tabNum == 3)
|
||||
@@ -64,7 +68,10 @@ internal static class GameSettingMenuPatches
|
||||
_modifiersButton?.SelectButton(tabNum == 3);
|
||||
_smallRolesButton?.SelectButton(tabNum == 2);
|
||||
|
||||
if (tabNum != 3) return;
|
||||
if (tabNum != 3)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (__instance.RoleSettingsButton.gameObject.active)
|
||||
{
|
||||
@@ -223,6 +230,8 @@ internal static class GameSettingMenuPatches
|
||||
|
||||
_modifierBtnOgPos = _modifiersButton.transform.localPosition;
|
||||
|
||||
GamePresetsTabPatches.Refresh();
|
||||
|
||||
UpdateText(__instance, __instance.GameSettingsTab, __instance.RoleSettingsTab);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user