To my understanding, when a player selects an underground belt entity and presses 'R', the following happens:
- belt_to_ground_type is changed to the opposite value
- the entity's direction is set to the opposite direction
- the same two operations are performed on the entity's neighbours (a single partner underground belt), if it is non-nil