ID:2289124
 
Applies to:DM Language
Status: Open

Issue hasn't been assigned a status value.
Whenever you have an overlay, the dir var of the overlay is always overriden by the parent object. I would like to see an appearance flag called RESET_DIR or something that prevents this behavior, and the overlay would select it's own dir.
If you set the overlays's dir explicitly, this should prevent the parent dir from coming through. There's actually an internal flag for this.
How do you set the overlays dir explicitly?
If you're simply adding an icon state like "active", or an icon, or a type path, that won't do it. But this ought to:

var/obj/O = new
O.icon = 'halo.dmi'
O.dir = EAST
src.overlays += O

Because O.dir was set explicitly, the appropriate flag should be set for that appearance when it's used as an overlay.
This doesn't seem to work for me. I've tried this with a mutable_appearance, image object, and a normal object and none of them work.
Can you post some code you're using for this purpose?
    var/list/L = list()
overlays.Cut()
for(var/IDX in 1 to 20)
var/mutable_appearance/A = new /mutable_appearance()
A.icon = 'icon.dmi'
A.icon_state = "arrow"
A.dir = pick(1,2,4,8)
A.transform = new /matrix(1, 0, rand(-32,32), 0, 1, rand(-32,32))
L += A
overlays = L
It only works correctly if you use the image() proc and set the dir as an arg in that.
Well lummox should expose the internal flag.
Because O.dir was set explicitly, the appropriate flag should be set for that appearance when it's used as an overlay.

DM has never obeyed this rule.

It has always ignored the overlay dir in favor of the parent object's dir. Always.
(unless you set it in image in the image() proc)