Fixes bugs that were introduced by #5871 . Caching the preference file is significant, but apparently the existing implementation introduces all sorts of buggy behavior.
Testing done on the proposed changes
Start a skirmish game, create a template and then start a new skirmish game in the same game session. The template should now still exist.
Try to change the resolution. The message to verify the changes should now pop up.
Additional context
It was apparently a greedy change of me 😃 and we should probably hot fix this.
Checklist
[ ] Changes are annotated, including comments where useful
[ ] Changes are documented in the changelog for the next game version
Are the bugs from caching the pref file engine bugs? Templates not saving on session end sounds like prefs not saving on session end, which may be hookable with lua Exit.lua AddOnExitCallback.
Description of the proposed changes
Fixes bugs that were introduced by #5871 . Caching the preference file is significant, but apparently the existing implementation introduces all sorts of buggy behavior.
Testing done on the proposed changes
Start a skirmish game, create a template and then start a new skirmish game in the same game session. The template should now still exist.
Try to change the resolution. The message to verify the changes should now pop up.
Additional context
It was apparently a greedy change of me 😃 and we should probably hot fix this.
Checklist