HomeWildfire Games

Wrap game settings initialisation from persistent data in a try-catch block.

Description

Wrap game settings initialisation from persistent data in a try-catch block.

Summary:
The persistent settings have historically often led to bugs (see A26, but that's far from the only example).
The trouble is that this usually leads to the game setup being completely unusable, often requiring clearing the MatchSettings.json file (or de-activating it in the settings if one knows that is there).
Furthermore, mods can make the persistentSettings take 'bad' values, and in general this behaviour is prone to unexpected breakage and difficult to defend against.

This wraps it in a try-catch block to ensure the game remains usable. It still relays the error with a more useful error message.

Differential Revision: https://code.wildfiregames.com/D4794