Exemplo n.º 1
0
    private void CheckBeltUsage()
    {
        if (UIUnityEvents.shouldBlockButtonInput)
        {
            return;
        }
        if (!base.enabled)
        {
            return;
        }
        if (ConsoleWindow.IsVisible())
        {
            return;
        }
        Inventory inventory = this.inventory;

        if (!inventory)
        {
            return;
        }
        InventoryHolder inventoryHolder = inventory.inventoryHolder;

        if (!inventoryHolder)
        {
            return;
        }
        int num = HumanController.InputSample.PollItemButtons();

        if (num != -1)
        {
            inventoryHolder.BeltUse(num);
        }
    }
Exemplo n.º 2
0
 private void CheckBeltUsage()
 {
     if ((!UIUnityEvents.shouldBlockButtonInput && base.enabled) && !ConsoleWindow.IsVisible())
     {
         Inventory inventory = this.inventory;
         if (inventory != null)
         {
             InventoryHolder inventoryHolder = inventory.inventoryHolder;
             if (inventoryHolder != null)
             {
                 int beltNum = InputSample.PollItemButtons();
                 if (beltNum != -1)
                 {
                     inventoryHolder.BeltUse(beltNum);
                 }
             }
         }
     }
 }