private static void OnButtonPressed(object sender, ButtonPressedEventArgs e)
        {
            // ignore if player hasn't loaded a save yet
            if (!Context.IsWorldReady)
            {
                return;
            }

            if (Game1.eventUp && !Game1.currentLocation.currentEvent.playerControlSequence ||
                Game1.currentBillboard != 0 || Game1.activeClickableMenu != null || Game1.menuUp || Game1.nameSelectUp ||
                Game1.IsChatting || Game1.dialogueTyping || Game1.dialogueUp ||
                Game1.player.UsingTool || Game1.pickingTool || Game1.numberOfSelectedItems != -1 || Game1.fadeToBlack || e.Button != SButton.MouseRight)
            {
                return;
            }

            if (!Game1.currentLocation.Objects.ContainsKey(e.Cursor.GrabTile))
            {
                return;
            }
            var craftable = Game1.currentLocation.Objects[e.Cursor.GrabTile];

            if (!craftable.bigCraftable.Value && craftable.Name == "Raff.AgricultureAssociationJson")
            {
                return;
            }

            BoardMainMenu.Update();
            Game1.activeClickableMenu = BoardMainMenu.Menu;
        }
Ejemplo n.º 2
0
 public static void Init()
 {
     BoardMainMenu.Init();
     BoardShopMenu.Init();
     BoardHelpMenu.Init();
 }