Do not run needless patreon auth checks #10136
Merged
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.
A large majority of players will likely never even have subscribed to Patreon, hence we can try to reduce network traffic on our servers by simply not allowing the mod to make a call to our auth system.
If players do want to play with features enabled, they will have to turn on the config value in the server config in order to start running these checks again.
This is merely a proposal, if we don't want this I'll remove it again.
The secondary check I added is something that prevents running the auth check again if features were previously unlocked already, that should also result in unnecessary calls being removed upon secondary opening of the town hall GUI.
(It seems highly unlikely that a Patreon subscription would expire in the middle of a session)
[X] Yes I tested this before submitting it.
[ ] I also did a multiplayer test.
Review please