The Variation of Magnesium Depletion with Line-of-Sight Conditions