From 34288374173ba4199ced8438e70dcbadadd24d3a Mon Sep 17 00:00:00 2001 From: Hydraxous Date: Sat, 18 Mar 2023 03:48:10 -0700 Subject: [PATCH 1/2] UI fix done. CyberGrind fix. Version helper back-ported. --- Components/InventoryControllerDeployer.cs | 164 +++++++++++++--------- Components/UFGWeaponManager.cs | 72 ++++++++++ Components/UI/InventoryController.cs | 37 +++-- Components/UI/InventoryDataManager.cs | 9 +- Patches/CyberGrindPatch.cs | 35 +++++ Plugin.cs | 63 +++++++-- Properties/Resources.Designer.cs | 8 +- UltraFunGuns.csproj | 8 +- Util/LevelCheck.cs | 148 +++++++++++++++++++ 9 files changed, 447 insertions(+), 97 deletions(-) create mode 100644 Patches/CyberGrindPatch.cs create mode 100644 Util/LevelCheck.cs diff --git a/Components/InventoryControllerDeployer.cs b/Components/InventoryControllerDeployer.cs index b3d36d0..7b8bbef 100644 --- a/Components/InventoryControllerDeployer.cs +++ b/Components/InventoryControllerDeployer.cs @@ -4,6 +4,7 @@ using System.Collections; using UnityEngine; using UnityEngine.UI; +using System.Runtime.CompilerServices; namespace UltraFunGuns { @@ -25,89 +26,122 @@ public class InventoryControllerDeployer : MonoBehaviour private void Awake() { - inventoryKey = UltraFunGuns.INVENTORY_KEY.Value; - om = MonoSingleton.Instance; - canvas = GetComponent(); - pauseMenu = transform.Find("PauseMenu").gameObject; - HydraLoader.prefabRegistry.TryGetValue("UFGInventoryUI", out GameObject controllerObject); - HydraLoader.prefabRegistry.TryGetValue("UFGInventoryButton", out GameObject pauseMenuInvButton); - invControllerButton = GameObject.Instantiate(pauseMenuInvButton, canvas).GetComponent