Пример #1
0
        static void Postfix(Panel_BreakDown __instance)
        {
            if (!__instance.IsEnabled() || InterfaceManager.ShouldImmediatelyExitOverlay() ||
                InputManager.GetEscapePressed() || __instance.IsBreakingDown())
            {
                return;
            }

            int framesInPanel = (int)AccessTools.Field(typeof(Panel_BreakDown), "m_FramesInPanel").GetValue(__instance);

            if (framesInPanel > 1 && Utils.IsMouseActive())
            {
                float movement = Utils.GetMenuMovementHorizontal(true, true);
                if (movement < 0)
                {
                    __instance.OnPrevTool();
                }
                else if (movement > 0)
                {
                    __instance.OnNextTool();
                }
                else if (InputManager.GetRadialButton())
                {
                    __instance.OnBreakDown();
                }
            }
        }
Пример #2
0
        public static void Postfix(Panel_BreakDown __instance)
        {
            if (!__instance.IsEnabled() || __instance.IsBreakingDown() || Utils.IsMouseActive())
            {
                return;
            }

            if (InputManager.GetInventoryExaminePressed())
            {
                Panel_BreakDown_Enable.OnPickup();
            }
        }
Пример #3
0
        public static bool Prefix(Panel_BreakDown __instance)
        {
            if (!Cooking.IsCookware(__instance.m_BreakDown))
            {
                return(true);
            }

            __instance.m_ButtonLegendContainer.BeginUpdate();
            __instance.m_ButtonLegendContainer.UpdateButton("Inventory_Examine", "GAMEPLAY_PickUp", !__instance.IsBreakingDown(), 2, true);
            __instance.m_ButtonLegendContainer.UpdateButton("Continue", "GAMEPLAY_BreakDown", !__instance.IsBreakingDown(), 1, true);
            __instance.m_ButtonLegendContainer.UpdateButton("Escape", "GAMEPLAY_ButtonBack", !__instance.IsBreakingDown(), 0, true);
            __instance.m_ButtonLegendContainer.EndUpdate();

            return(false);
        }