SubnauticaModding / QModManager

Config based patch management for Subnautica and Subnautica: Below Zero
https://discord.gg/UpWuWwq
Other
140 stars 51 forks source link

Improved piracy check to reduce false positives. #249

Closed FoxinTale closed 2 years ago

FoxinTale commented 3 years ago

The title says everything, really. Changes: Moved the file size of steam_api64.dll to a const so it can be easily updated in the future.

Changed the way the initial check was done. Before, it checked the size of steam_api64.dll and checked for files related to pirated versions. Replace the "and" with "then", and that's what the change is. This was done to reduce false positives, as there is the possibility someone pirates the game, then later buys it, installs to the same folder, which would leave those files behind, resulting in a false positive.

Renamed internal things to private because rider was giving me yellow squiggles and they bothered me.

Changed a datatype or two to "var" for the same reason as above.

No other changes were done, as it still has the same behavior as before. If the check succeeds, it logs it and moves on with loading, provided no other additional errors were encountered.