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); } }
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); } } } } }