Equivalent to my first design, but this time with transistors.
Update: It turns out that my engine oil becomes conductive when very hot, falsely giving ground to all gears with about a 1-2 kOhm resistance. Therefore, I'll put 100-200 Ohm resistors to each gear sensor, providing a pull-up effect on the transistors and making sure they get the correct signals.