ID:2423409
 
BYOND Version:512
Operating System:Windows 7 Ultimate 64-bit
Web Browser:Firefox 64.0
Applies to:Dream Maker
Status: Open

Issue hasn't been assigned a status value.
Descriptive Problem Summary:

This is no doubt considered minor, but I'm leaning towards putting it in "bugs" because it constantly causes buggy behavior when the code changes.

The naive expectation is that the "Generate Instances from Directions" command will create palette entries facing the other three dirs, but these palette entries also have the "icon_state" var set (bolded) rather than defaulted. Mappers are thus constantly setting brittle and meaningless varedits in the map, which causes problems when the code-side "icon_state" of those objects are changed. The only workaround is careful mass find-and-replace, which is exactly what writing the "icon_state" in the code is supposed to prevent.

Numbered Steps to Reproduce Problem:
1. Create some object with an icon_state set to a state with multiple directions.
2. Use "Generate Instances from Directions" to place copies of this object facing every direction.
3. Later, change the icon_state in the code.
4. South-facing objects in the map are fine, but the others now have the wrong icon_state.

Expected Results:
"Generate Instances from Directions" should only dirty the var it actually changes, "dir".

Actual Results:
"Generate Instances from Directions" dirties both "dir" and "icon_state".

I've been looking at this but want to mull over the fix some more. The logic in this area has been with us a long time so I'm not sure a quick fix would do the right thing. Just wanted to let you know it hasn't been forgotten.