There's a question i never asked because i assumed that your inability to reproduce the bug meant it was more complex than i thought.
However, now that i know that you never actually tried to reproduce the bug in a non-debug environment, and that the bug is otherwise perfectly consistent as far as i can tell, it might actually be relevant.
Apologies if it's a dumb question, but is there actually a check for identified branch exits when
entering a map?
To clarify, all my encounters with this bug have led me to the following conclusion on how the exit sprites works :
When you enter an area, the exits are all by default set to "stairs".
The only two things that can change this are :
-Identifying a branch exit. This explains why access(branch) "fixes" the bug; Unlike Signal Interpreters, it always causes an identification even, even when that exit is already identified.
-Launching the game (and other similar "reload" actions). During that process, the game checks if a branch exit is already identified, and if it has, its sprite gets set to the branch exit sprite. This explains why restarting the game fixes the issue.
If some part of the setup or some of your tools like the thing that "teleported" you near the spot in the gif above causes the game to "reload", then this would explain why your attempts at debugging failed.
If what i've described is accurate to how the game handles exit sprites, then that might be where the bug comes from;
When entering an area, you can never have any branch exits identified
unless said area is a garrison leading to a branch or a "main map" that you looped back to from a submap.
Even some derelict intel that identifies branch exits can only apply after at least a turn has passed.
And given that you previously wrote the following :
I tried this and you do get instant on-sight identification of previously known exits on seeing them again after looping back to the same map (which is something I was always wondering about before),
Maybe you just... never added a check so that when entering a map, already identified branch exits would be set to the "branch exit" sprite?
That check does exists when
loading an area after quitting the game and the such, but maybe it doesn't when
entering an area?
Again, apologies if that's a dumb question; I don't want to cause you to waste more of your time with this bug, but i also didn't want to have just never asked that question.