private static Boolean OnHoverPrefix(Action action, HoverData hoverData, GameModeProcessor __instance)
        {
            if (!(__instance is PeaceModeProcessor))
            {
                return(HarmonyPrefix.CallOriginal);
            }

            Boolean flag = action.Data.IsPossible();

            if (flag)
            {
                if (action.Ability != null)
                {
                    hoverData.CursorType = action.Data.GetCursor(action.BlockReasons);
                }
                else if (action.Tool != null)
                {
                    hoverData.CursorType = CursorType.Variants;
                }
            }

            SetSilhouette(hoverData, action.Data);

            if (action.TargetEntity != null)
            {
                SetBadge(hoverData, action.TargetEntity);
                if (flag && action.Ability != null)
                {
                    hoverData.AddCommand(ActionTooltipBuilder.GetBanner(action, RestrictionStrategy.DefaultTooltip));
                }
            }

            return(HarmonyPrefix.SkipOriginal);
        }
Example #2
0
        //private static Visualizer LootRange;
        private static Boolean OnKeyEventPrefix(Action action, InputEvent inputEvent)
        {
            switch (inputEvent.Code)
            {
            case KeyCode.LeftShift:
                OnShift(inputEvent);
                break;

            case KeyCode.Space:
                OnSpace(inputEvent);
                break;
            }

            return(HarmonyPrefix.CallOriginal);
        }