UnderminersTeam / UndertaleModTool

The most complete tool for modding, decompiling and unpacking Undertale (and other GameMaker games!)
GNU General Public License v3.0
1.19k stars 233 forks source link

Fix erroneous 2022.1 detection #1838

Closed colinator27 closed 4 months ago

colinator27 commented 4 months ago

Description

This fixes erroneous detection in 2.3 games prior to 2.3.2, where a field was removed from room asset layers. Fixes https://github.com/UnderminersTeam/UndertaleModTool/issues/1837.

Caveats

The only possible caveat is that, in the worst case, some 2022.1 games specifically may no longer get detected. However, I very much doubt that will happen, and I tested multiple games to make sure they still load.

Notes

Also includes some changes to BufferBinaryReader, getting rid of debug build checks. While investigating this issue, an out of bounds exception was hit. I think such exceptions should also occur in release builds, to help us track down issues where they first happen. This has a minimal performance hit in release builds, especially as most of the checks were already occurring (but just didn't throw an exception in release builds).

github-actions[bot] commented 4 months ago

Download the artifacts for this pull request here:

GUI:

CLI:

colinator27 commented 4 months ago

Should we then also remove the Debug.Assert class?

I think that's still fine, it just throws an exception always too, I think.