Fix custom data in game.prefs breaking Notify management window #6044
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the proposed changes
Fixes a Discord bug report (Notify menu missing Seraphim T4) by adding a nil check.
Cause:
Nomads makes Notify save the following data in
game.prefs
:When back in FA, Notify fails to create the setting lines past the Novax line for the experimentals tab in the "Notify Management" window because it fails to find an alias for the Nomads blueprint ids from ClarityTable. This could be solved by adding the data to the
defaultmessages.lua
file (Nomads does), but then the Nomads experimentals would appear as options despite the units not being in the current session, so I opted for a nil check instead.Testing done on the proposed changes
Add the data into my game.prefs, and go to the in-game menu -> Notify Management -> Experimentals window. All the FA experimentals display correctly and you can scroll down if you open more tabs.
Checklist