If you use a mutable appearance as an overlay, it will ignore the dir unless the dir if the mutable_appearance has one specified. Additionally, images will also ignore their dir unless it was set as part of creation.
Code Snippet (if applicable) to Reproduce Problem:
// make sure your mob is a directional icon
var/image/I = new(icon, icon_state)
I.dir = WEST
var/mutable_appearance/MA = new(I)
loc.overlays += MA
world << MA.dir
Expected Results:
As long as the image/mutable_appearance's dir is WEST, the overlay should face WEST.
Actual Results:
Sometimes it acts as though the dir is SOUTH even though it's clearly not.
When does the problem NOT occur?
If you add an overlay that's an image and the image had its dir set as creation, then BYOND respects the dir correctly. Even if you change it later, as long as it was defined at spawn, dir is respected. Even if you copy the image as a mutable_appearance, it still respects dir. Don't define dir, however, and it will ignore dir forever.
var/image/I = new(icon, icon_state, dir = WEST)