mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-19 15:51:48 +00:00
Improve role option garbage collection further
This commit is contained in:
1 parent
ff658db6f1
commit
57e3f20cba
2 files changed
+12
-10
No files matched your search
@@ -178,6 +178,7 @@ public static class RoleSettingMenuPatches
|
||||
.ThenBy(x => x.Key.Name);
|
||||
|
||||
var quotaThing = __instance.categoryHeaderEditRoleOrigin.transform.FindChild("QuotaHeader");
|
||||
var usingNewQuota = false;
|
||||
var template = __instance.transform.parent.parent.GetComponent<GameSettingMenu>().GameSettingsTab.categoryHeaderOrigin;
|
||||
|
||||
foreach (var grouping in sortedRoleGroups)
|
||||
@@ -216,12 +217,17 @@ public static class RoleSettingMenuPatches
|
||||
var countText = quotaInst.transform.FindChild("# Text");
|
||||
countText.transform.localPosition = new Vector3(1.9f, 0.0993f, 0f);
|
||||
|
||||
var blankLabel = quotaInst.transform.FindChild("BlankLabel").gameObject;
|
||||
var chanceLabel = quotaInst.transform.FindChild("Chance Label").gameObject;
|
||||
var countLabel = quotaInst.transform.FindChild("# Label").gameObject;
|
||||
blankLabel.DeepDestroy(false);
|
||||
chanceLabel.DeepDestroy(false);
|
||||
countLabel.DeepDestroy(false);
|
||||
if (!usingNewQuota)
|
||||
{
|
||||
var blankLabel = quotaInst.transform.FindChild("BlankLabel").gameObject;
|
||||
var chanceLabel = quotaInst.transform.FindChild("Chance Label").gameObject;
|
||||
var countLabel = quotaInst.transform.FindChild("# Label").gameObject;
|
||||
blankLabel.DeepDestroy(false);
|
||||
chanceLabel.DeepDestroy(false);
|
||||
countLabel.DeepDestroy(false);
|
||||
usingNewQuota = true;
|
||||
quotaThing = quotaInst;
|
||||
}
|
||||
|
||||
categoryHeaderMasked.Background.sprite = MiraAssets.CategoryHeader.LoadAsset();
|
||||
categoryHeaderMasked.Background.sprite.texture.filterMode = FilterMode.Bilinear;
|
||||
|
||||
@@ -335,10 +335,6 @@ public static class Extensions
|
||||
/// </summary>
|
||||
public static void ClearGarbageCollector()
|
||||
{
|
||||
if (!MainMenuManagerPatches.NeedsDeepDestroy)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Coroutines.Start(CoFreeResources());
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user