mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-19 15:51:48 +00:00
Merge branch 'dev' into phone-menu-extension
This commit is contained in:
9 files changed
+16
-15
No files matched your search
@@ -254,6 +254,12 @@ public static class TaskAdderPatches
|
||||
.ToArray()
|
||||
.Any(x => x.FolderName == child.FolderName);
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(nameof(TaskAdderGame.OnDisable))]
|
||||
public static void ClosePatch()
|
||||
{
|
||||
Utilities.Extensions.ClearGarbageCollector();
|
||||
}
|
||||
// yes it might be crazy patching the entire method, but i tried so many other methods and only this works :cry:
|
||||
// true -chip
|
||||
[HarmonyPrefix]
|
||||
@@ -278,7 +284,6 @@ public static class TaskAdderPatches
|
||||
|
||||
__instance.ActiveItems.ToArray().Do(x => x.gameObject.DeepDestroy(false));
|
||||
__instance.ActiveItems.Clear();
|
||||
Utilities.Extensions.ClearGarbageCollector();
|
||||
|
||||
float num = 0f;
|
||||
float num2 = 0f;
|
||||
|
||||
@@ -103,7 +103,6 @@ public static class HatsTabPatches
|
||||
foreach (var instanceColorChip in __instance.ColorChips) instanceColorChip.gameObject.DeepDestroy(false);
|
||||
__instance.ColorChips.Clear();
|
||||
__instance.scroller.Inner.GetComponentsInChildren<TextMeshPro>().Do(x => x.gameObject.DeepDestroy(false));
|
||||
Utilities.Extensions.ClearGarbageCollector();
|
||||
|
||||
var groupNameText = __instance.GetComponentInChildren<TextMeshPro>(false);
|
||||
var group = sortedHats.Where(x => x.Key == storeNames[page]);
|
||||
|
||||
@@ -84,7 +84,6 @@ public static class NameplatesTabPatches
|
||||
foreach (var instanceColorChip in __instance.ColorChips) instanceColorChip.gameObject.DeepDestroy(false);
|
||||
__instance.ColorChips.Clear();
|
||||
__instance.scroller.Inner.GetComponentsInChildren<TextMeshPro>().Do(x => x.gameObject.DeepDestroy(false));
|
||||
Utilities.Extensions.ClearGarbageCollector();
|
||||
|
||||
var groupNameText = __instance.GetComponentInChildren<TextMeshPro>(false);
|
||||
|
||||
|
||||
@@ -86,7 +86,6 @@ public static class SkinsTabPatches
|
||||
foreach (var instanceColorChip in __instance.ColorChips) instanceColorChip.gameObject.DeepDestroy(false);
|
||||
__instance.ColorChips.Clear();
|
||||
__instance.scroller.Inner.GetComponentsInChildren<TextMeshPro>().Do(x => x.gameObject.DeepDestroy(false));
|
||||
Utilities.Extensions.ClearGarbageCollector();
|
||||
|
||||
var groupNameText = __instance.GetComponentInChildren<TextMeshPro>(false);
|
||||
|
||||
|
||||
@@ -83,7 +83,6 @@ public static class VisorsTabPatches
|
||||
foreach (var instanceColorChip in __instance.ColorChips) instanceColorChip.gameObject.DeepDestroy(false);
|
||||
__instance.ColorChips.Clear();
|
||||
__instance.scroller.Inner.GetComponentsInChildren<TextMeshPro>().Do(x => x.gameObject.DeepDestroy(false));
|
||||
Utilities.Extensions.ClearGarbageCollector();
|
||||
|
||||
var groupNameText = __instance.GetComponentInChildren<TextMeshPro>(false);
|
||||
|
||||
|
||||
@@ -35,6 +35,13 @@ internal static class GameOptionsMenuPatch
|
||||
HudManager.Instance.PlayerCam.OverrideScreenShakeEnabled = true;
|
||||
}
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(nameof(GameOptionsMenu.CloseMenu))]
|
||||
public static void FullMenuClosePatch(GameOptionsMenu __instance)
|
||||
{
|
||||
Utilities.Extensions.ClearGarbageCollector();
|
||||
}
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(nameof(GameOptionsMenu.Update))]
|
||||
// ReSharper disable once InconsistentNaming
|
||||
|
||||
@@ -76,7 +76,6 @@ public static class RoleSettingMenuPatches
|
||||
|
||||
__instance.roleChances = new Il2CppSystem.Collections.Generic.List<RoleOptionSetting>();
|
||||
__instance.advancedSettingChildren = new Il2CppSystem.Collections.Generic.List<OptionBehaviour>();
|
||||
Utilities.Extensions.ClearGarbageCollector();
|
||||
|
||||
var maskBg = __instance.scrollBar.transform.FindChild("MaskBg");
|
||||
var hitbox = __instance.scrollBar.transform.FindChild("Hitbox");
|
||||
@@ -328,7 +327,6 @@ public static class RoleSettingMenuPatches
|
||||
obj.gameObject.DeepDestroy(false);
|
||||
}
|
||||
RoleOptionSettings.Clear();
|
||||
Utilities.Extensions.ClearGarbageCollector();
|
||||
__instance.SetQuotaTab();
|
||||
}));
|
||||
headerBtn.SetButtonEnableState(true);
|
||||
@@ -456,7 +454,6 @@ public static class RoleSettingMenuPatches
|
||||
|
||||
CurrentRole = role;
|
||||
__instance.advancedSettingChildren.Clear();
|
||||
Utilities.Extensions.ClearGarbageCollector();
|
||||
|
||||
// TODO: create sub groups under the role settings.
|
||||
var filteredOptions = GameSettingMenuPatches.SelectedMod?.InternalOptionGroups
|
||||
|
||||
@@ -208,13 +208,6 @@ internal static class MeetingHudPatches
|
||||
public static bool PopulateResultsPatch(MeetingHud __instance, ref Il2CppStructArray<MeetingHud.VoterState> states)
|
||||
{
|
||||
var votes = states.Select(x=> new CustomVote(x.VoterId, x.VotedForId)).ToList();
|
||||
var @event = new PopulateResultsEvent(votes);
|
||||
MiraEventManager.InvokeEvent(@event);
|
||||
|
||||
if (@event.IsCancelled)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
VotingUtils.HandlePopulateResults(votes);
|
||||
return false;
|
||||
|
||||
@@ -207,6 +207,9 @@ public static class VotingUtils
|
||||
return;
|
||||
}
|
||||
|
||||
// If modified, these will visually change.
|
||||
votes = @event.Votes;
|
||||
|
||||
MeetingHud.Instance.TitleText.text =
|
||||
TranslationController.Instance.GetString(
|
||||
StringNames.MeetingVotingResults,
|
||||
|
||||
Reference in new issue
Block a user