When you reach the room with the purple mineral, a bat will appear and close a gate. Talk to him and accept his offer.
Man am I dumb. I replayed it but thought it was one of the prisoned bats after I blow up the gate