示例#1
0
        public override void ProcessTriggers(TriggersSet triggersSet)
        {
            base.ProcessTriggers(triggersSet);

            if (DepositAll.JustPressed)
            {
                ChestUI.DepositAll();
            }
            if (LootAll.JustPressed)
            {
                ChestUI.LootAll();
            }
            if (QuickStack.JustPressed)
            {
                player.QuickStackAllChests();
                ChestUI.QuickStack();
            }
            if (Restock.JustPressed)
            {
                ChestUI.Restock();
            }
            if (SortChest.JustPressed)
            {
                ItemSorting.SortChest();
            }
            if (SortInventory.JustPressed)
            {
                ItemSorting.SortInventory();
            }
        }
示例#2
0
        private static void OpenDepositConfirmation()
        {
            var ui = new ConfirmationUI
            {
                buttonID  = ChestUI.ButtonID.DepositAll,
                topOffset = 55,
                onclick   = (evt, elm) =>
                {
                    ChestUI.DepositAll();
                    ConfirmationUI.visible = false;
                }
            };

            BetterChests.instance.ConfirmationUserInterface.SetState(ui);
            ConfirmationUI.visible = true;
        }