public bool CheckTile(TileSlot tile) { EquipManager equipManager = EquipManager.GetInstance; if (tile.GetTileAbst is GatherableTileSO gatherable) { return(equipManager.GetToolActive(gatherable.GetToolType) && gatherable.GetSourceTier <= equipManager.GetTierByEnum(gatherable.GetToolType) && tile.IsGatherable); } return(false); }
void SlotAction() { if (!inventoryUI.GetSetIsUiClosed && slotType == SlotChestType.Tools) { equipManager.SetActiveStateTool(equipManager.GetToolTypeByIndex(slotPosition), !equipManager.GetToolActive(equipManager.GetToolTypeByIndex(slotPosition))); SetToggleOutline(equipManager.GetToolActive(equipManager.GetToolTypeByIndex(slotPosition))); } else { inventoryUI.OnPressedInventoryButton(); } }