fs2open.github.com
fs2open.github.com copied to clipboard
F3 lab is reset after going to options menu
This was a known issue introduced by PR #3512 .
Now when you go from the F3 lab to the options menu and then return to the lab, the lab's state is reset, including dialogs, background, etc.
The reason it worked before was that the LabManager
was leaking its renderer/dialogs, so those dialogs shouldn't have even been used.
Fixing this is non-trivial, since LabManager
instances were not designed to be retained between visits to the F3 lab.
I would be fine with closing this as won't-fix.
The only way to solve this cleanly would be by introducing a method to serialize/deserialize the lab state, which I think is unnecessary at this stage but could be a decent project for someone new to the code.
Agreed that fixing this is not worth the current team's time but could be a good first issue. Thus I suggest adding the "good first issue" label and leaving it open (or "backlog" if we have that category).
I'm skeptical that this qualifies as a good first issue. I don't imagine saving and restoring the lab's state, and figuring out the game's state transitions, would be simple.
@Goober5000 when I tried to fix this, the issue wasn't related to game state transitions; the existing ones work fine AFAICT. It was in figuring out how to correctly preserve the lab's state.
Admittedly not super easy, but hopefully easier now that the leaks are plugged 🤞 and way easier than, e.g., fixing Issue #3127. That required understanding how Ship_obj_list
and Missile_obj_list
are managed, not to mention realizing that the root cause lay there.
Exactly, the lab save/restore code doesn't need to care about FSO's state management - All it needs to do is respond to the lab opening and closing.
How relevant is this after the recent Lab upgrade?