eDonnes124 / Town-Of-Us-R

An Among Us mod containing a bunch of roles
GNU General Public License v3.0
364 stars 143 forks source link

check among us version at start to determine compatibility #189

Closed whichtwix closed 5 months ago

whichtwix commented 12 months ago

This pr adds another task to be done when the updater comes on.

Now the version of among us that is returned by Constants.GetBroadCastVersion and GetVersion when it is provided the internal version can be compared to check if the mod should allow it. The broadcast version doesnt appear to change between hotfixes while it does for major updates, which are the ones which usually break the mod, so the checking should be reliable for the most part.

Its probably better to get the user's attention as early as possible rather than later when they try to play. It also stops and alerts before they get the chance to use the ingame updater when it wont work. Ive tried to put the most helpful text that could fit.

the last internal version that is supported is kept stored online in the repo so it can be easily updated

also a small refractor:

MyDragonBreath commented 5 months ago

merged in next release